SHAPER  9.12.0
GeomAPI_Pnt2d Class Reference

2D point defined by two coordinates More...

Inheritance diagram for GeomAPI_Pnt2d:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Pnt2d (const double theX, const double theY)
 Creation of point by coordinates. More...
 
GEOMAPI_EXPORT GeomAPI_Pnt2d (const std::shared_ptr< GeomAPI_XY > &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 void setX (const double theX)
 sets X coordinate More...
 
GEOMAPI_EXPORT void setY (const double theY)
 sets Y coordinate More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pntto3D (const std::shared_ptr< GeomAPI_Pnt > &theOrigin, const std::shared_ptr< GeomAPI_Dir > &theDirX, const std::shared_ptr< GeomAPI_Dir > &theDirY)
 Returns the 3D point. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYxy ()
 returns coordinates of the point More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Pnt2d > &theOther) const
 Distance between two points. More...
 
GEOMAPI_EXPORT bool isEqual (const std::shared_ptr< GeomAPI_Pnt2d > &theOther) const
 Returns whether the distance between two points is less then precision confusion. 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

2D point defined by two coordinates

Constructor & Destructor Documentation

◆ GeomAPI_Pnt2d() [1/2]

GeomAPI_Pnt2d::GeomAPI_Pnt2d ( const double  theX,
const double  theY 
)

Creation of point by coordinates.

◆ GeomAPI_Pnt2d() [2/2]

GeomAPI_Pnt2d::GeomAPI_Pnt2d ( const std::shared_ptr< GeomAPI_XY > &  theCoords)

Creation of point by coordinates.

Member Function Documentation

◆ x()

double GeomAPI_Pnt2d::x ( ) const

returns X coordinate

◆ y()

double GeomAPI_Pnt2d::y ( ) const

returns Y coordinate

◆ setX()

void GeomAPI_Pnt2d::setX ( const double  theX)

sets X coordinate

◆ setY()

void GeomAPI_Pnt2d::setY ( const double  theY)

sets Y coordinate

◆ to3D()

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

Returns the 3D point.

◆ xy()

const std::shared_ptr< GeomAPI_XY > GeomAPI_Pnt2d::xy ( )

returns coordinates of the point

◆ distance()

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

Distance between two points.

◆ isEqual()

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

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

◆ 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.