DATAKIT API  V2025.4
Dtk_pnt Class Reference

This is a mathematical point class. More...

+ Inheritance diagram for Dtk_pnt:

Public Member Functions

Dtk_pnt Affinitised (const Dtk_pnt &p, const Dtk_dir &xdir, const Dtk_dir &ydir, double f[3]) const
 
void Affinity (const Dtk_pnt &, const Dtk_dir &xdir, const Dtk_dir &ydir, double f[3])
 
void Affinity (double f[3])
 
 Dtk_pnt ()
 default constructor More...
 
 Dtk_pnt (const double d[])
 constructor from a 3 double array More...
 
 Dtk_pnt (const Dtk_pnt &s)
 copy constructor More...
 
 Dtk_pnt (double a, double b, double c=0.0)
 constructor from 3 double More...
 
void GetXYZ (Dtk_Double64 &outX, Dtk_Double64 &outY, Dtk_Double64 &outZ) const
 Retrieves to the 3 coordinates of the class. More...
 
int IsEqual (const Dtk_pnt &inPointToCompare, const double inTolerance) const
 test if 2 Dtk_pnt are equal - with a tolerance - More...
 
Dtk_pnt Multiplied (const CDtk_3dMat &matrix) const
 
Dtk_pnt MultipliedByTransposed (const CDtk_3dMat &matrix) const
 
void Multiply (const CDtk_3dMat &matrix)
 
void MultiplyByTransposed (const CDtk_3dMat &matrix)
 
Dtk_pnt operator* (const CDtk_3dMat &matrix) const
 
Dtk_pnt operator* (double a) const
 
void operator*= (const CDtk_3dMat &matrix)
 
Dtk_pntoperator*= (double)
 
Dtk_pntoperator+= (const Dtk_dir &)
 translate the Dtk_pnt with the given Dtk_dir More...
 
Dtk_pnt operator- ()
 
Dtk_pntoperator-= (const Dtk_dir &)
 translate (in the opposite direction) the Dtk_pnt with the given Dtk_dir More...
 
Dtk_pntoperator/= (double)
 
Dtk_pntoperator= (const Dtk_pnt &s)
 
double & operator[] (Dtk_Size_t i)
 access to a specified coordinate of the Dtk_pnt More...
 
const double & operator[] (Dtk_Size_t i) const
 access to a specified coordinate of the Dtk_pnt. More...
 
Dtk_pnt PostMultiplied (const CDtk_3dMat &matrix) const
 
void PostMultiply (const CDtk_3dMat &matrix)
 
double Project (const Dtk_dir &zdir, double d)
 
double Project (const Dtk_dir &zdir, double d, const Dtk_dir &zPrj)
 
double Project (const Dtk_pnt &org, const Dtk_dir &zdir)
 
double Project (const Dtk_pnt &org, const Dtk_dir &zdir, const Dtk_dir &zPrj)
 
Dtk_pnt Projected (const Dtk_dir &zdir, double d) const
 
Dtk_pnt Projected (const Dtk_dir &zdir, double d, const Dtk_dir &zPrj) const
 
Dtk_pnt Projected (const Dtk_pnt &org, const Dtk_dir &zdir) const
 
Dtk_pnt Projected (const Dtk_pnt &org, const Dtk_dir &zdir, const Dtk_dir &zPrj) const
 
Dtk_pnt ProjectedOnLine (const Dtk_pnt &org, const Dtk_dir &dir) const
 
void ProjectOnLine (const Dtk_pnt &org, const Dtk_dir &dir)
 
void Rotate (const Dtk_dir &dir, double angle, const Dtk_pnt &center)
 
void Rotate (const Dtk_pnt &p0, const CDtk_3dMat &matrix)
 
Dtk_pnt Rotated (const Dtk_dir &dir, double angle, const Dtk_pnt &center) const
 
Dtk_pnt Rotated (const Dtk_pnt &p0, const CDtk_3dMat &matrix) const
 
void Scale (const Dtk_pnt &p0, double s)
 
Dtk_pnt Scaled (const Dtk_pnt &p0, double s) const
 
void SetXYZ (const Dtk_Double64 &inX, const Dtk_Double64 &inY, const Dtk_Double64 &inZ)
 Sets the 3 coordinates of the class. More...
 
double Solve (const CDtk_3dMat &matrix, const Dtk_dir &col3)
 
double Solve (const Dtk_dir &col0, const Dtk_dir &col1, const Dtk_dir &col2, const Dtk_dir &col3)
 
Dtk_pnt Symetrised (const Dtk_pnt &opl, const Dtk_dir &zpl) const
 
void Symetry (const Dtk_dir &zpl)
 
void Symetry (const Dtk_pnt &opl, const Dtk_dir &zpl)
 
void Transform (const CDtk_3dMat &matrix)
 
Dtk_pnt Transformed (const CDtk_3dMat &matrix) const
 
void Translate (const Dtk_dir &dir)
 
void Translate (const Dtk_pnt &p0, const Dtk_pnt &p1)
 
Dtk_pnt Translated (const Dtk_dir &dir) const
 
Dtk_pnt Translated (const Dtk_pnt &p0, const Dtk_pnt &p1) const
 
double & x ()
 access to x coordinate of the Dtk_pnt. More...
 
const double & x () const
 access to x coordinate of the Dtk_pnt. More...
 
double & y ()
 access to y coordinate of the Dtk_pnt. More...
 
const double & y () const
 access to y coordinate of the Dtk_pnt. More...
 
double & z ()
 access to z coordinate of the Dtk_pnt. More...
 
const double & z () const
 access to z coordinate of the Dtk_pnt. More...
 
 ~Dtk_pnt ()
 

Static Public Member Functions

static Dtk_Double64 ProcessDistance (const Dtk_pnt &inPoint1, const Dtk_pnt &inPoint2)
 
static void ProcessMiddlePoint (const Dtk_pnt &inPntA, const Dtk_pnt &inPntB, Dtk_pnt &outMiddlePnt)
 

Protected Attributes

double _Coords [3]
 

Detailed Description

This is a mathematical point class.

This class provides all method about points

Constructor & Destructor Documentation

◆ Dtk_pnt() [1/4]

Dtk_pnt::Dtk_pnt ( )

default constructor

◆ ~Dtk_pnt()

Dtk_pnt::~Dtk_pnt ( )

◆ Dtk_pnt() [2/4]

Dtk_pnt::Dtk_pnt ( const Dtk_pnt s)

copy constructor

◆ Dtk_pnt() [3/4]

Dtk_pnt::Dtk_pnt ( double  a,
double  b,
double  c = 0.0 
)

constructor from 3 double

◆ Dtk_pnt() [4/4]

Dtk_pnt::Dtk_pnt ( const double  d[])

constructor from a 3 double array

Member Function Documentation

◆ Affinitised()

Dtk_pnt Dtk_pnt::Affinitised ( const Dtk_pnt p,
const Dtk_dir xdir,
const Dtk_dir ydir,
double  f[3] 
) const

◆ Affinity() [1/2]

void Dtk_pnt::Affinity ( const Dtk_pnt ,
const Dtk_dir xdir,
const Dtk_dir ydir,
double  f[3] 
)

◆ Affinity() [2/2]

void Dtk_pnt::Affinity ( double  f[3])

◆ GetXYZ()

void Dtk_pnt::GetXYZ ( Dtk_Double64 outX,
Dtk_Double64 outY,
Dtk_Double64 outZ 
) const

Retrieves to the 3 coordinates of the class.

Warning
You can't modify the returned value.

◆ IsEqual()

int Dtk_pnt::IsEqual ( const Dtk_pnt inPointToCompare,
const double  inTolerance 
) const

test if 2 Dtk_pnt are equal - with a tolerance -

Parameters
pnt2the Dtk_pnt to compare
tolthe tolerance to compare
Returns
0 if not equals != 0 else

Sample:

Dtk_pnt a(0.0,0.0,0.0);
Dtk_pnt b(15.0,0.0,0.0);
...
if(a.is_equal(b, 0.1))
{...}

◆ Multiplied()

Dtk_pnt Dtk_pnt::Multiplied ( const CDtk_3dMat &  matrix) const

◆ MultipliedByTransposed()

Dtk_pnt Dtk_pnt::MultipliedByTransposed ( const CDtk_3dMat &  matrix) const

◆ Multiply()

void Dtk_pnt::Multiply ( const CDtk_3dMat &  matrix)

◆ MultiplyByTransposed()

void Dtk_pnt::MultiplyByTransposed ( const CDtk_3dMat &  matrix)

◆ operator*() [1/2]

Dtk_pnt Dtk_pnt::operator* ( const CDtk_3dMat &  matrix) const

◆ operator*() [2/2]

Dtk_pnt Dtk_pnt::operator* ( double  a) const

◆ operator*=() [1/2]

void Dtk_pnt::operator*= ( const CDtk_3dMat &  matrix)

◆ operator*=() [2/2]

Dtk_pnt& Dtk_pnt::operator*= ( double  )

◆ operator+=()

Dtk_pnt& Dtk_pnt::operator+= ( const Dtk_dir )

translate the Dtk_pnt with the given Dtk_dir

Parameters
athe translation direction

Sample:

Dtk_pnt a(0.0,0.0,0.0);
Dtk_dir b(15.0,0.0,0.0);
a += b; //Now a is (15.0,0.0,0.0)

◆ operator-()

Dtk_pnt Dtk_pnt::operator- ( )

◆ operator-=()

Dtk_pnt& Dtk_pnt::operator-= ( const Dtk_dir )

translate (in the opposite direction) the Dtk_pnt with the given Dtk_dir

Parameters
athe translation direction

Sample:

Dtk_pnt a(0.0,0.0,0.0);
Dtk_dir b(15.0,0.0,0.0);
a -= b; //Now a is (-15.0,0.0,0.0)

◆ operator/=()

Dtk_pnt& Dtk_pnt::operator/= ( double  )

◆ operator=()

Dtk_pnt& Dtk_pnt::operator= ( const Dtk_pnt s)

◆ operator[]() [1/2]

double& Dtk_pnt::operator[] ( Dtk_Size_t  i)

access to a specified coordinate of the Dtk_pnt

  • i = 0 => X coordinate
  • i = 1 => Y coordinate
  • i = 2 => Z coordinate

◆ operator[]() [2/2]

const double& Dtk_pnt::operator[] ( Dtk_Size_t  i) const

access to a specified coordinate of the Dtk_pnt.

Warning
You can't modify the returned value.
  • i = 0 => X coordinate
  • i = 1 => Y coordinate
  • i = 2 => Z coordinate

◆ PostMultiplied()

Dtk_pnt Dtk_pnt::PostMultiplied ( const CDtk_3dMat &  matrix) const

◆ PostMultiply()

void Dtk_pnt::PostMultiply ( const CDtk_3dMat &  matrix)

◆ ProcessDistance()

static Dtk_Double64 Dtk_pnt::ProcessDistance ( const Dtk_pnt inPoint1,
const Dtk_pnt inPoint2 
)
static

◆ ProcessMiddlePoint()

static void Dtk_pnt::ProcessMiddlePoint ( const Dtk_pnt inPntA,
const Dtk_pnt inPntB,
Dtk_pnt outMiddlePnt 
)
static

◆ Project() [1/4]

double Dtk_pnt::Project ( const Dtk_dir zdir,
double  d 
)

◆ Project() [2/4]

double Dtk_pnt::Project ( const Dtk_dir zdir,
double  d,
const Dtk_dir zPrj 
)

◆ Project() [3/4]

double Dtk_pnt::Project ( const Dtk_pnt org,
const Dtk_dir zdir 
)

◆ Project() [4/4]

double Dtk_pnt::Project ( const Dtk_pnt org,
const Dtk_dir zdir,
const Dtk_dir zPrj 
)

◆ Projected() [1/4]

Dtk_pnt Dtk_pnt::Projected ( const Dtk_dir zdir,
double  d 
) const

◆ Projected() [2/4]

Dtk_pnt Dtk_pnt::Projected ( const Dtk_dir zdir,
double  d,
const Dtk_dir zPrj 
) const

◆ Projected() [3/4]

Dtk_pnt Dtk_pnt::Projected ( const Dtk_pnt org,
const Dtk_dir zdir 
) const

◆ Projected() [4/4]

Dtk_pnt Dtk_pnt::Projected ( const Dtk_pnt org,
const Dtk_dir zdir,
const Dtk_dir zPrj 
) const

◆ ProjectedOnLine()

Dtk_pnt Dtk_pnt::ProjectedOnLine ( const Dtk_pnt org,
const Dtk_dir dir 
) const

◆ ProjectOnLine()

void Dtk_pnt::ProjectOnLine ( const Dtk_pnt org,
const Dtk_dir dir 
)

◆ Rotate() [1/2]

void Dtk_pnt::Rotate ( const Dtk_dir dir,
double  angle,
const Dtk_pnt center 
)

◆ Rotate() [2/2]

void Dtk_pnt::Rotate ( const Dtk_pnt p0,
const CDtk_3dMat &  matrix 
)

◆ Rotated() [1/2]

Dtk_pnt Dtk_pnt::Rotated ( const Dtk_dir dir,
double  angle,
const Dtk_pnt center 
) const

◆ Rotated() [2/2]

Dtk_pnt Dtk_pnt::Rotated ( const Dtk_pnt p0,
const CDtk_3dMat &  matrix 
) const

◆ Scale()

void Dtk_pnt::Scale ( const Dtk_pnt p0,
double  s 
)

◆ Scaled()

Dtk_pnt Dtk_pnt::Scaled ( const Dtk_pnt p0,
double  s 
) const

◆ SetXYZ()

void Dtk_pnt::SetXYZ ( const Dtk_Double64 inX,
const Dtk_Double64 inY,
const Dtk_Double64 inZ 
)

Sets the 3 coordinates of the class.

◆ Solve() [1/2]

double Dtk_pnt::Solve ( const CDtk_3dMat &  matrix,
const Dtk_dir col3 
)

◆ Solve() [2/2]

double Dtk_pnt::Solve ( const Dtk_dir col0,
const Dtk_dir col1,
const Dtk_dir col2,
const Dtk_dir col3 
)

◆ Symetrised()

Dtk_pnt Dtk_pnt::Symetrised ( const Dtk_pnt opl,
const Dtk_dir zpl 
) const

◆ Symetry() [1/2]

void Dtk_pnt::Symetry ( const Dtk_dir zpl)

◆ Symetry() [2/2]

void Dtk_pnt::Symetry ( const Dtk_pnt opl,
const Dtk_dir zpl 
)

◆ Transform()

void Dtk_pnt::Transform ( const CDtk_3dMat &  matrix)

◆ Transformed()

Dtk_pnt Dtk_pnt::Transformed ( const CDtk_3dMat &  matrix) const

◆ Translate() [1/2]

void Dtk_pnt::Translate ( const Dtk_dir dir)

◆ Translate() [2/2]

void Dtk_pnt::Translate ( const Dtk_pnt p0,
const Dtk_pnt p1 
)

◆ Translated() [1/2]

Dtk_pnt Dtk_pnt::Translated ( const Dtk_dir dir) const

◆ Translated() [2/2]

Dtk_pnt Dtk_pnt::Translated ( const Dtk_pnt p0,
const Dtk_pnt p1 
) const

◆ x() [1/2]

double& Dtk_pnt::x ( )

access to x coordinate of the Dtk_pnt.

◆ x() [2/2]

const double& Dtk_pnt::x ( ) const

access to x coordinate of the Dtk_pnt.

Warning
You can't modify the returned value.

◆ y() [1/2]

double& Dtk_pnt::y ( )

access to y coordinate of the Dtk_pnt.

◆ y() [2/2]

const double& Dtk_pnt::y ( ) const

access to y coordinate of the Dtk_pnt.

Warning
You can't modify the returned value.

◆ z() [1/2]

double& Dtk_pnt::z ( )

access to z coordinate of the Dtk_pnt.

◆ z() [2/2]

const double& Dtk_pnt::z ( ) const

access to z coordinate of the Dtk_pnt.

Warning
You can't modify the returned value.

Field Documentation

◆ _Coords

double Dtk_pnt::_Coords[3]
protected
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:22
Dtk_dir
This is a mathematical direction class.
Definition: dtk_dir.hpp:15