Salome HOME
Boost has been removed from code
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pln.cpp
1 // File:        GeomAPI_Pln.cpp
2 // Created:     23 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #include<GeomAPI_Pln.h>
6 #include <GeomAPI_Pnt.h>
7 #include <GeomAPI_Dir.h>
8
9 #include<gp_Pln.hxx>
10
11 using namespace std;
12
13 GeomAPI_Pln::GeomAPI_Pln(const std::shared_ptr<GeomAPI_Pnt>& thePoint,
14                          const std::shared_ptr<GeomAPI_Dir>& theNormal)
15     : GeomAPI_Interface(new gp_Pln(thePoint->impl<gp_Pnt>(), theNormal->impl<gp_Dir>()))
16 {
17 }
18
19 GeomAPI_Pln::GeomAPI_Pln(const double theA, const double theB, const double theC, const double theD)
20     : GeomAPI_Interface(new gp_Pln(theA, theB, theC, theD))
21 {
22 }
23
24 std::shared_ptr<GeomAPI_Pnt> GeomAPI_Pln::location()
25 {
26   gp_Pnt aLoc = impl<gp_Pln>().Location();
27   return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
28 }
29
30 std::shared_ptr<GeomAPI_Dir> GeomAPI_Pln::direction()
31 {
32   const gp_Dir& aDir = impl<gp_Pln>().Axis().Direction();
33   return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
34 }
35
36 void GeomAPI_Pln::coefficients(double& theA, double& theB, double& theC, double& theD)
37 {
38   impl<gp_Pln>().Coefficients(theA, theB, theC, theD);
39 }