1 // File: GeomAPI_Pnt2d.h
2 // Created: 29 May 2014
3 // Author: Artem ZHIDKOV
5 #ifndef GeomAPI_Pnt2d_H_
6 #define GeomAPI_Pnt2d_H_
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
15 /**\class GeomAPI_Pnt2d
17 * \brief 2D point defined by two coordinates
20 class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface
23 /// Creation of point by coordinates
24 GeomAPI_Pnt2d(const double theX, const double theY);
25 /// Creation of point by coordinates
26 GeomAPI_Pnt2d(const boost::shared_ptr<GeomAPI_XY>& theCoords);
28 /// returns X coordinate
30 /// returns Y coordinate
34 void setX(const double theX);
36 void setY(const double theY);
38 /// Returns the 3D point
39 boost::shared_ptr<GeomAPI_Pnt> to3D(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin,
40 const boost::shared_ptr<GeomAPI_Dir>& theDirX,
41 const boost::shared_ptr<GeomAPI_Dir>& theDirY);
43 /// returns coordinates of the point
44 const boost::shared_ptr<GeomAPI_XY> xy();
46 /// Distance between two points
47 double distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const;