SHAPER
9.12.0
|
3D point defined by three coordinates More...
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_XYZ > | xyz () |
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_Pnt2d > | 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. More... | |
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > | 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. 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... | |
3D point defined by three coordinates
GeomAPI_Pnt::GeomAPI_Pnt | ( | const double | theX, |
const double | theY, | ||
const double | theZ | ||
) |
Creation of point by coordinates.
GeomAPI_Pnt::GeomAPI_Pnt | ( | const std::shared_ptr< GeomAPI_XYZ > & | theCoords | ) |
Creation of point by coordinates.
double GeomAPI_Pnt::x | ( | ) | const |
returns X coordinate
double GeomAPI_Pnt::y | ( | ) | const |
returns Y coordinate
double GeomAPI_Pnt::z | ( | ) | const |
returns Z coordinate
void GeomAPI_Pnt::setX | ( | const double | theX | ) |
sets X coordinate
void GeomAPI_Pnt::setY | ( | const double | theY | ) |
sets Y coordinate
void GeomAPI_Pnt::setZ | ( | const double | theZ | ) |
sets Z coordinate
const std::shared_ptr< GeomAPI_XYZ > GeomAPI_Pnt::xyz | ( | ) |
returns coordinates of the point
double GeomAPI_Pnt::distance | ( | const std::shared_ptr< GeomAPI_Pnt > & | theOther | ) | const |
Distance between two points.
bool GeomAPI_Pnt::isEqual | ( | const std::shared_ptr< GeomAPI_Pnt > & | theOther | ) | const |
Returns whether the distance between two points is less then precision confusion.
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.
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.
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.
void GeomAPI_Pnt::translate | ( | const std::shared_ptr< GeomAPI_Dir > & | theDir, |
double | theDist | ||
) |
Translates the point along direction theDir on distance theDist.
void GeomAPI_Pnt::rotate | ( | const std::shared_ptr< GeomAPI_Ax1 > & | theAxis, |
double | theAngle | ||
) |
Rotates the point along axis for the given angle (in degrees)
|
inlineinherited |
Returns the pointer to the impl.
|
inlineinherited |
Returns the pointer to the impl.
|
inlineinherited |
Returns the reference object of the impl.
|
inlineinherited |
Updates the impl (deletes the old one)
|
inherited |
Returns true if the impl is empty.