Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pnt.h
1 // File:        GeomAPI_Pnt.hxx
2 // Created:     23 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef GeomAPI_Pnt_H_
6 #define GeomAPI_Pnt_H_
7
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
10
11 class GeomAPI_XYZ;
12
13 /**\class GeomAPI_Pnt
14  * \ingroup DataModel
15  * \brief 3D point defined by three coordinates
16  */
17
18 class GEOMAPI_EXPORT GeomAPI_Pnt: public GeomAPI_Interface
19 {
20 public:
21   /// Creation of point by coordinates
22   GeomAPI_Pnt(const double theX, const double theY, const double theZ);
23   /// Creation of point by coordinates
24   GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords);
25
26   /// returns X coordinate
27   double x() const;
28   /// returns Y coordinate
29   double y() const;
30   /// returns Z coordinate
31   double z() const;
32
33   /// sets X coordinate
34   void setX(const double theX);
35   /// sets Y coordinate
36   void setY(const double theY);
37   /// sets Z coordinate
38   void setZ(const double theZ);
39
40   /// returns coordinates of the point
41   const boost::shared_ptr<GeomAPI_XYZ> xyz();
42
43   /// Distance between two points
44   double distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const;
45 };
46
47 #endif
48