Salome HOME
Merge remote-tracking branch 'remotes/origin/GeomAPI'
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pnt2d.h
1 // File:        GeomAPI_Pnt2d.h
2 // Created:     29 May 2014
3 // Author:      Artem ZHIDKOV
4
5 #ifndef GeomAPI_Pnt2d_HeaderFile
6 #define GeomAPI_Pnt2d_HeaderFile
7
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
10
11 class GeomAPI_XYZ;
12
13 /**\class GeomAPI_Pnt2d
14  * \ingroup DataModel
15  * \brief 2D point defined by two coordinates
16  */
17
18 class GEOMAPI_EXPORT GeomAPI_Pnt2d: public GeomAPI_Interface
19 {
20 public:
21   /// Creation of point by coordinates
22   GeomAPI_Pnt2d(const double theX, const double theY);
23
24   /// returns X coordinate
25   double x() const;
26   /// returns Y coordinate
27   double y() const;
28
29   /// sets X coordinate
30   void setX(const double theX);
31   /// sets Y coordinate
32   void setY(const double theY);
33
34   /// Distance between two points
35   double distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
36 };
37
38 #endif
39