1 // File: GeomAPI_Pnt.hxx
2 // Created: 23 Apr 2014
3 // Author: Mikhail PONIKAROV
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
17 * \brief 3D point defined by three coordinates
20 class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
23 /// Creation of point by coordinates
24 GeomAPI_Pnt(const double theX, const double theY, const double theZ);
25 /// Creation of point by coordinates
26 GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords);
28 /// returns X coordinate
30 /// returns Y coordinate
32 /// returns Z coordinate
36 void setX(const double theX);
38 void setY(const double theY);
40 void setZ(const double theZ);
42 /// returns coordinates of the point
43 const boost::shared_ptr<GeomAPI_XYZ> xyz();
45 /// Distance between two points
46 double distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const;
48 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
49 boost::shared_ptr<GeomAPI_Pnt2d> to2D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
50 const boost::shared_ptr<GeomAPI_Dir>& theDirX,
51 const boost::shared_ptr<GeomAPI_Dir>& theDirY);