// Author: Artem ZHIDKOV
#include<GeomAPI_Pnt2d.h>
-#include<GeomAPI_XYZ.h>
+#include<GeomAPI_XY.h>
#include<gp_Pnt2d.hxx>
: GeomAPI_Interface(new gp_Pnt2d(theX, theY))
{}
+GeomAPI_Pnt2d::GeomAPI_Pnt2d(const boost::shared_ptr<GeomAPI_XY>& theCoords)
+ : GeomAPI_Interface(new gp_Pnt2d(theCoords->x(), theCoords->y()))
+{}
+
double GeomAPI_Pnt2d::x() const
{
return MY_PNT2D->X();
return MY_PNT2D->SetY(theY);
}
+const boost::shared_ptr<GeomAPI_XY> GeomAPI_Pnt2d::xy()
+{
+ return boost::shared_ptr<GeomAPI_XY>(new GeomAPI_XY(MY_PNT2D->X(), MY_PNT2D->Y()));
+}
+
double GeomAPI_Pnt2d::distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const
{
return MY_PNT2D->Distance(theOther->impl<gp_Pnt2d>());