1 // File: GeomAPI_Pnt.cpp
2 // Created: 23 Apr 2014
3 // Author: Mikhail PONIKAROV
5 #include<GeomAPI_Pnt.h>
6 #include<GeomAPI_XYZ.h>
10 #define MY_PNT static_cast<gp_Pnt*>(myImpl)
12 GeomAPI_Pnt::GeomAPI_Pnt(const double theX, const double theY, const double theZ)
13 : GeomAPI_Interface(new gp_Pnt(theX, theY, theZ))
16 GeomAPI_Pnt::GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
17 : GeomAPI_Interface(new gp_Pnt(theCoords->x(), theCoords->y(), theCoords->z()))
20 double GeomAPI_Pnt::x() const
25 double GeomAPI_Pnt::y() const
30 double GeomAPI_Pnt::z() const
35 void GeomAPI_Pnt::setX(const double theX)
37 return MY_PNT->SetX(theX);
40 void GeomAPI_Pnt::setY(const double theY)
42 return MY_PNT->SetY(theY);
45 void GeomAPI_Pnt::setZ(const double theZ)
47 return MY_PNT->SetZ(theZ);
50 const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Pnt::xyz()
52 return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_PNT->X(), MY_PNT->Y(), MY_PNT->Z()));
55 double GeomAPI_Pnt::distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const
57 return MY_PNT->Distance(theOther->impl<gp_Pnt>());