20 #ifndef GeomAPI_Pnt_H_
21 #define GeomAPI_Pnt_H_
23 #include <GeomAPI_Interface.h>
42 GeomAPI_Pnt(
const double theX,
const double theY,
const double theZ);
45 GeomAPI_Pnt(
const std::shared_ptr<GeomAPI_XYZ>& theCoords);
59 void setX(
const double theX);
62 void setY(
const double theY);
65 void setZ(
const double theZ);
69 const std::shared_ptr<GeomAPI_XYZ>
xyz();
73 double distance(
const std::shared_ptr<GeomAPI_Pnt>& theOther)
const;
77 bool isEqual(
const std::shared_ptr<GeomAPI_Pnt>& theOther)
const;
84 bool isLess(
const std::shared_ptr<GeomAPI_Pnt>& theOther,
85 const double theTolerance = 1.e-7)
const;
89 std::shared_ptr<GeomAPI_Pnt2d>
to2D(
const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
90 const std::shared_ptr<GeomAPI_Dir>& theDirX,
91 const std::shared_ptr<GeomAPI_Dir>& theDirY);
95 std::shared_ptr<GeomAPI_Pnt2d>
to2D(
const std::shared_ptr<GeomAPI_Pln>& thePln)
const;
99 void translate(
const std::shared_ptr<GeomAPI_Dir>& theDir,
double theDist);
102 GEOMAPI_EXPORT
void rotate(
const std::shared_ptr<GeomAPI_Ax1>& theAxis,
double theAngle);
106 typedef std::shared_ptr<GeomAPI_Pnt> GeomPointPtr;
The class represents an axis in 3D space.
Definition: GeomAPI_Ax1.h:31
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pln.h:37
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
GEOMAPI_EXPORT void setY(const double theY)
sets Y coordinate
Definition: GeomAPI_Pnt.cpp:63
GEOMAPI_EXPORT double z() const
returns Z coordinate
Definition: GeomAPI_Pnt.cpp:53
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZ > xyz()
returns coordinates of the point
Definition: GeomAPI_Pnt.cpp:73
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.
Definition: GeomAPI_Pnt.cpp:88
GEOMAPI_EXPORT void setZ(const double theZ)
sets Z coordinate
Definition: GeomAPI_Pnt.cpp:68
GEOMAPI_EXPORT void rotate(const std::shared_ptr< GeomAPI_Ax1 > &theAxis, double theAngle)
Rotates the point along axis for the given angle (in degrees)
Definition: GeomAPI_Pnt.cpp:133
GEOMAPI_EXPORT void setX(const double theX)
sets X coordinate
Definition: GeomAPI_Pnt.cpp:58
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.
Definition: GeomAPI_Pnt.cpp:103
GEOMAPI_EXPORT double y() const
returns Y coordinate
Definition: GeomAPI_Pnt.cpp:48
GEOMAPI_EXPORT bool isEqual(const std::shared_ptr< GeomAPI_Pnt > &theOther) const
Returns whether the distance between two points is less then precision confusion.
Definition: GeomAPI_Pnt.cpp:83
GEOMAPI_EXPORT double x() const
returns X coordinate
Definition: GeomAPI_Pnt.cpp:43
GEOMAPI_EXPORT GeomAPI_Pnt(const double theX, const double theY, const double theZ)
Creation of point by coordinates.
Definition: GeomAPI_Pnt.cpp:33
GEOMAPI_EXPORT void translate(const std::shared_ptr< GeomAPI_Dir > &theDir, double theDist)
Translates the point along direction theDir on distance theDist.
Definition: GeomAPI_Pnt.cpp:115
GEOMAPI_EXPORT double distance(const std::shared_ptr< GeomAPI_Pnt > &theOther) const
Distance between two points.
Definition: GeomAPI_Pnt.cpp:78
3 coordinates: they may represent vector or point or something else
Definition: GeomAPI_XYZ.h:32