SHAPER  9.12.0
GeomAPI_Pnt Class Reference

3D point defined by three coordinates More...

Inheritance diagram for GeomAPI_Pnt:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Pnt (const double theX, const double theY, const double theZ)
 Creation of point by coordinates. More...
 
GEOMAPI_EXPORT GeomAPI_Pnt (const std::shared_ptr< GeomAPI_XYZ > &theCoords)
 Creation of point by coordinates. More...
 
GEOMAPI_EXPORT double x () const
 returns X coordinate More...
 
GEOMAPI_EXPORT double y () const
 returns Y coordinate More...
 
GEOMAPI_EXPORT double z () const
 returns Z coordinate More...
 
GEOMAPI_EXPORT void setX (const double theX)
 sets X coordinate More...
 
GEOMAPI_EXPORT void setY (const double theY)
 sets Y coordinate More...
 
GEOMAPI_EXPORT void setZ (const double theZ)
 sets Z coordinate More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZxyz ()
 returns coordinates of the point More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Pnt > &theOther) const
 Distance between two points. More...
 
GEOMAPI_EXPORT bool isEqual (const std::shared_ptr< GeomAPI_Pnt > &theOther) const
 Returns whether the distance between two points is less then precision confusion. More...
 
GEOMAPI_EXPORT bool isLess (const std::shared_ptr< GeomAPI_Pnt > &theOther, const double theTolerance=1.e-7) const
 Returns true, if the current point is less than theOther. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2dto2D (const std::shared_ptr< GeomAPI_Pnt > &theOrigin, const std::shared_ptr< GeomAPI_Dir > &theDirX, const std::shared_ptr< GeomAPI_Dir > &theDirY)
 Projects a point to the plane defined by the origin and 2 axes vectors in this plane. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2dto2D (const std::shared_ptr< GeomAPI_Pln > &thePln) const
 Projects a point to the plane defined by the origin and 2 axes vectors in this plane. More...
 
GEOMAPI_EXPORT void translate (const std::shared_ptr< GeomAPI_Dir > &theDir, double theDist)
 Translates the point along direction theDir on distance theDist. More...
 
GEOMAPI_EXPORT void rotate (const std::shared_ptr< GeomAPI_Ax1 > &theAxis, double theAngle)
 Rotates the point along axis for the given angle (in degrees) More...
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Detailed Description

3D point defined by three coordinates

Constructor & Destructor Documentation

◆ GeomAPI_Pnt() [1/2]

GeomAPI_Pnt::GeomAPI_Pnt ( const double  theX,
const double  theY,
const double  theZ 
)

Creation of point by coordinates.

◆ GeomAPI_Pnt() [2/2]

GeomAPI_Pnt::GeomAPI_Pnt ( const std::shared_ptr< GeomAPI_XYZ > &  theCoords)

Creation of point by coordinates.

Member Function Documentation

◆ x()

double GeomAPI_Pnt::x ( ) const

returns X coordinate

◆ y()

double GeomAPI_Pnt::y ( ) const

returns Y coordinate

◆ z()

double GeomAPI_Pnt::z ( ) const

returns Z coordinate

◆ setX()

void GeomAPI_Pnt::setX ( const double  theX)

sets X coordinate

◆ setY()

void GeomAPI_Pnt::setY ( const double  theY)

sets Y coordinate

◆ setZ()

void GeomAPI_Pnt::setZ ( const double  theZ)

sets Z coordinate

◆ xyz()

const std::shared_ptr< GeomAPI_XYZ > GeomAPI_Pnt::xyz ( )

returns coordinates of the point

◆ distance()

double GeomAPI_Pnt::distance ( const std::shared_ptr< GeomAPI_Pnt > &  theOther) const

Distance between two points.

◆ isEqual()

bool GeomAPI_Pnt::isEqual ( const std::shared_ptr< GeomAPI_Pnt > &  theOther) const

Returns whether the distance between two points is less then precision confusion.

◆ isLess()

bool GeomAPI_Pnt::isLess ( const std::shared_ptr< GeomAPI_Pnt > &  theOther,
const double  theTolerance = 1.e-7 
) const

Returns true, if the current point is less than theOther.

The point is less than other, if X coordinate is less. In case of X's are equal, if Y is less than other. If Y's are equal too, compare Z's.

◆ to2D() [1/2]

std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Pnt::to2D ( const std::shared_ptr< GeomAPI_Pnt > &  theOrigin,
const std::shared_ptr< GeomAPI_Dir > &  theDirX,
const std::shared_ptr< GeomAPI_Dir > &  theDirY 
)

Projects a point to the plane defined by the origin and 2 axes vectors in this plane.

◆ to2D() [2/2]

std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Pnt::to2D ( const std::shared_ptr< GeomAPI_Pln > &  thePln) const

Projects a point to the plane defined by the origin and 2 axes vectors in this plane.

◆ translate()

void GeomAPI_Pnt::translate ( const std::shared_ptr< GeomAPI_Dir > &  theDir,
double  theDist 
)

Translates the point along direction theDir on distance theDist.

◆ rotate()

void GeomAPI_Pnt::rotate ( const std::shared_ptr< GeomAPI_Ax1 > &  theAxis,
double  theAngle 
)

Rotates the point along axis for the given angle (in degrees)

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.