Salome HOME
Merge branch 'Dev_1.5.0' of salome:modules/shaper into Dev_1.5.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_Ax3 : public GeomAPI_Interface
20 {
21 public:
22   /// Default constructor
23   GEOMAPI_EXPORT 
24   GeomAPI_Ax3();
25
26   /// Ñonstructor
27   /// \param theOrigin point of origin
28   /// \param theDirX direction of X axis
29   /// \param theNorm direction of normal vector
30   GEOMAPI_EXPORT 
31   GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
32               std::shared_ptr<GeomAPI_Dir> theDirX,
33               std::shared_ptr<GeomAPI_Dir> theNorm);
34
35   /// Sets origin point
36   GEOMAPI_EXPORT 
37   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
38
39   /// Returns the plane origin point
40   GEOMAPI_EXPORT 
41   std::shared_ptr<GeomAPI_Pnt> origin() const;
42
43   /// Sets X direction vector
44   GEOMAPI_EXPORT 
45   void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
46
47   /// Returns X direction vector
48   GEOMAPI_EXPORT 
49   std::shared_ptr<GeomAPI_Dir> dirX() const;
50
51   /// Sets Y direction vector
52   GEOMAPI_EXPORT 
53   void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
54
55   /// Returns Y direction vector
56   GEOMAPI_EXPORT 
57   std::shared_ptr<GeomAPI_Dir> dirY() const;
58
59   /// Sets Z direction vector
60   GEOMAPI_EXPORT 
61   void setNormal(const std::shared_ptr<GeomAPI_Dir>& theNorm);
62
63   /// Returns Z direction vector
64   GEOMAPI_EXPORT 
65   std::shared_ptr<GeomAPI_Dir> normal() const;
66
67   /// Converts 2d coordinates from the plane to 3d space point
68   /// \param theX X coordinate
69   /// \param theY Y coordinate
70   GEOMAPI_EXPORT 
71   std::shared_ptr<GeomAPI_Pnt> to3D(double theX, double theY) const;
72
73   /// Converts 3d  to 2d coordinates of the plane
74   /// \param theX X coordinate
75   /// \param theY Y coordinate
76   /// \param theZ Z coordinate
77   GEOMAPI_EXPORT 
78   std::shared_ptr<GeomAPI_Pnt2d> to2D(double theX, double theY, double theZ) const;
79
80 };
81
82
83 #endif