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))
17 GeomAPI_Pnt::GeomAPI_Pnt(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
18 : GeomAPI_Interface(new gp_Pnt(theCoords->x(), theCoords->y(), theCoords->z()))
22 double GeomAPI_Pnt::x() const
27 double GeomAPI_Pnt::y() const
32 double GeomAPI_Pnt::z() const
37 void GeomAPI_Pnt::setX(const double theX)
39 return MY_PNT->SetX(theX);
42 void GeomAPI_Pnt::setY(const double theY)
44 return MY_PNT->SetY(theY);
47 void GeomAPI_Pnt::setZ(const double theZ)
49 return MY_PNT->SetZ(theZ);
52 const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Pnt::xyz()
54 return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_PNT->X(), MY_PNT->Y(), MY_PNT->Z()));
57 double GeomAPI_Pnt::distance(const boost::shared_ptr<GeomAPI_Pnt>& theOther) const
59 return MY_PNT->Distance(theOther->impl<gp_Pnt>());