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>
19 * \brief 3D point defined by three coordinates
22 class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
25 /// Creation of point by coordinates
26 GeomAPI_Pnt(const double theX, const double theY, const double theZ);
27 /// Creation of point by coordinates
28 GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
30 /// returns X coordinate
32 /// returns Y coordinate
34 /// returns Z coordinate
38 void setX(const double theX);
40 void setY(const double theY);
42 void setZ(const double theZ);
44 /// returns coordinates of the point
45 const std::shared_ptr<GeomAPI_XYZ> xyz();
47 /// Distance between two points
48 double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
50 /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
51 std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
52 const std::shared_ptr<GeomAPI_Dir>& theDirX,
53 const std::shared_ptr<GeomAPI_Dir>& theDirY);
55 /// Translates the point along direction theDir on distance theDist
56 void translate(const std::shared_ptr<GeomAPI_Dir>& theDir, double theDist);