Salome HOME
Merge branch 'CPPHighAPI'
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ax1.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Ax1.h
4 // Created:     12 May 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GEOMAPI_AX1_H_
8 #define GEOMAPI_AX1_H_
9
10 #include <GeomAPI.h>
11 #include <GeomAPI_Pnt.h>
12 #include <GeomAPI_Dir.h>
13
14 /** \ingroup DataModel
15  *  \brief The class represents an axis in 3D space.
16  */
17 class GeomAPI_Ax1 : public GeomAPI_Interface
18 {
19 public:
20   /// Default constructor.
21   GEOMAPI_EXPORT 
22   GeomAPI_Ax1();
23
24   /** \brief Constructor.
25    *  \param[in] theOrigin point of origin.
26    *  \param[in] theDir direction of axis.
27    */
28   GEOMAPI_EXPORT 
29   GeomAPI_Ax1(std::shared_ptr<GeomAPI_Pnt> theOrigin,
30               std::shared_ptr<GeomAPI_Dir> theDir);
31
32   /// Sets origin point.
33   GEOMAPI_EXPORT 
34   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
35
36   /// \return the plane origin point.
37   GEOMAPI_EXPORT 
38   std::shared_ptr<GeomAPI_Pnt> origin() const;
39
40   /// Sets direction vector.
41   GEOMAPI_EXPORT 
42   void setDir(const std::shared_ptr<GeomAPI_Dir>& theDir);
43
44   /// \return direction vector.
45   GEOMAPI_EXPORT 
46   std::shared_ptr<GeomAPI_Dir> dir() const;
47
48   /// Reverses the unit vector of this axis and assigns the result to this axis.
49   GEOMAPI_EXPORT 
50   void reverse();
51
52   /// \return reversed unit vector of this axis.
53   GEOMAPI_EXPORT 
54   std::shared_ptr<GeomAPI_Ax1> reversed();
55 };
56
57 #endif