Salome HOME
Merge branch 'master' into Dev_1.1.0
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ax3.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Ax3.hxx
4 // Created:     16 February 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef GEOMAPI_AX3_H_
8 #define GEOMAPI_AX3_H_
9
10 #include "GeomAPI.h"
11 #include "GeomAPI_Pnt.h"
12 #include "GeomAPI_Dir.h"
13
14 /**
15  * \ingroup DataModel
16  * \brief The class represents a coordinate plane which is 2d plane with X and Y directions
17  * and origin
18  */ 
19 class GEOMAPI_EXPORT GeomAPI_Ax3 : public GeomAPI_Interface
20 {
21 public:
22   /// Default constructor
23   GeomAPI_Ax3();
24
25   /// Ñonstructor
26   /// \param theOrigin point of origin
27   /// \param theDirX direction of X axis
28   /// \param theDirY direction of Y axis
29   /// \param theNorm direction of normal vector
30   GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
31               std::shared_ptr<GeomAPI_Dir> theDirX,
32               std::shared_ptr<GeomAPI_Dir> theNorm);
33
34   /// Sets origin point
35   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
36
37   /// Returns the plane origin point
38   std::shared_ptr<GeomAPI_Pnt> origin() const;
39
40   /// Sets X direction vector
41   void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
42
43   /// Returns X direction vector
44   std::shared_ptr<GeomAPI_Dir> dirX() const;
45
46   /// Sets Y direction vector
47   void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
48
49   /// Returns Y direction vector
50   std::shared_ptr<GeomAPI_Dir> dirY() const;
51
52   /// Sets Z direction vector
53   void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm);
54
55   /// Returns Z direction vector
56   std::shared_ptr<GeomAPI_Dir> norm() const;
57
58   /// Converts 2d coordinates from the plane to 3d space point
59   /// \param theX X coordinate
60   /// \param theY Y coordinate
61   std::shared_ptr<GeomAPI_Pnt> to3D(double theX, double theY) const;
62
63   /// Converts 3d  to 2d coordinates of the plane
64   /// \param theX X coordinate
65   /// \param theY Y coordinate
66   /// \param theZ Z coordinate
67   std::shared_ptr<GeomAPI_Pnt2d> to2D(double theX, double theY, double theZ) const;
68
69 };
70
71
72 #endif