1 // File: GeomAPI_Pnt2d.h
2 // Created: 29 May 2014
3 // Author: Artem ZHIDKOV
5 #ifndef GeomAPI_Pnt2d_HeaderFile
6 #define GeomAPI_Pnt2d_HeaderFile
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
13 /**\class GeomAPI_Pnt2d
15 * \brief 2D point defined by two coordinates
18 class GEOMAPI_EXPORT GeomAPI_Pnt2d: public GeomAPI_Interface
21 /// Creation of point by coordinates
22 GeomAPI_Pnt2d(const double theX, const double theY);
23 /// Creation of point by coordinates
24 GeomAPI_Pnt2d(const boost::shared_ptr<GeomAPI_XY>& theCoords);
26 /// returns X coordinate
28 /// returns Y coordinate
32 void setX(const double theX);
34 void setY(const double theY);
36 /// returns coordinates of the point
37 const boost::shared_ptr<GeomAPI_XY> xy();
39 /// Distance between two points
40 double distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;