1 // File: GeomAPI_Dir.cpp
2 // Created: 23 Apr 2014
3 // Author: Mikhail PONIKAROV
5 #include <GeomAPI_Dir.h>
6 #include <GeomAPI_XYZ.h>
10 #define MY_DIR static_cast<gp_Dir*>(myImpl)
12 GeomAPI_Dir::GeomAPI_Dir(const double theX, const double theY, const double theZ)
13 : GeomAPI_Interface(new gp_Dir(theX, theY, theZ))
16 GeomAPI_Dir::GeomAPI_Dir(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
17 : GeomAPI_Interface(new gp_Dir(theCoords->x(), theCoords->y(), theCoords->z()))
20 double GeomAPI_Dir::x() const
25 double GeomAPI_Dir::y() const
30 double GeomAPI_Dir::z() const
35 const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::xyz()
37 return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(MY_DIR->X(), MY_DIR->Y(), MY_DIR->Z()));
40 double GeomAPI_Dir::dot(const boost::shared_ptr<GeomAPI_Dir>& theArg) const
42 return MY_DIR->Dot(theArg->impl<gp_Dir>());