Salome HOME
Merge branch 'Pre_2.8.0_development'
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ax1.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef GEOMAPI_AX1_H_
22 #define GEOMAPI_AX1_H_
23
24 #include <GeomAPI.h>
25 #include <GeomAPI_Pnt.h>
26 #include <GeomAPI_Dir.h>
27
28 /** \ingroup DataModel
29  *  \brief The class represents an axis in 3D space.
30  */
31 class GeomAPI_Ax1 : public GeomAPI_Interface
32 {
33 public:
34   /// Default constructor.
35   GEOMAPI_EXPORT
36   GeomAPI_Ax1();
37
38   /** \brief Constructor.
39    *  \param[in] theOrigin point of origin.
40    *  \param[in] theDir direction of axis.
41    */
42   GEOMAPI_EXPORT
43   GeomAPI_Ax1(std::shared_ptr<GeomAPI_Pnt> theOrigin,
44               std::shared_ptr<GeomAPI_Dir> theDir);
45
46   /// Sets origin point.
47   GEOMAPI_EXPORT
48   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
49
50   /// \return the plane origin point.
51   GEOMAPI_EXPORT
52   std::shared_ptr<GeomAPI_Pnt> origin() const;
53
54   /// Sets direction vector.
55   GEOMAPI_EXPORT
56   void setDir(const std::shared_ptr<GeomAPI_Dir>& theDir);
57
58   /// \return direction vector.
59   GEOMAPI_EXPORT
60   std::shared_ptr<GeomAPI_Dir> dir() const;
61
62   /// Reverses the unit vector of this axis and assigns the result to this axis.
63   GEOMAPI_EXPORT
64   void reverse();
65
66   /// \return reversed unit vector of this axis.
67   GEOMAPI_EXPORT
68   std::shared_ptr<GeomAPI_Ax1> reversed();
69 };
70
71 #endif