1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Pnt.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
10 #include <GeomAPI_Interface.h>
20 * \brief 3D point defined by three coordinates
23 class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
26 /// Creation of point by coordinates
27 GeomAPI_Pnt(const double theX, const double theY, const double theZ);
28 /// Creation of point by coordinates
29 GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
31 /// returns X coordinate
33 /// returns Y coordinate
35 /// returns Z coordinate
39 void setX(const double theX);
41 void setY(const double theY);
43 void setZ(const double theZ);
45 /// returns coordinates of the point
46 const std::shared_ptr<GeomAPI_XYZ> xyz();
48 /// Distance between two points
49 double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
51 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
52 std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
53 const std::shared_ptr<GeomAPI_Dir>& theDirX,
54 const std::shared_ptr<GeomAPI_Dir>& theDirY);
56 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
57 std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pln>& thePln) const;
59 /// Translates the point along direction theDir on distance theDist
60 void translate(const std::shared_ptr<GeomAPI_Dir>& theDir, double theDist);