Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / GeomAPI / GeomAPI_Trsf.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_XYZ.hxx
4 // Created:     13 July 2015
5 // Author:      Mikhail PONIKAROV
6 //
7 // Modified by Clarisse Genrault (CEA) : 17 Nov 2016
8
9 #ifndef GeomAPI_Trsf_H_
10 #define GeomAPI_Trsf_H_
11
12 #include <GeomAPI_Interface.h>
13 #include <memory>
14
15 class GeomAPI_Ax1;
16
17 /**\class GeomAPI_Trsf
18  * \ingroup DataModel
19  * \brief Keep the transformation matrix coefficients
20  */
21
22 class GeomAPI_Trsf : public GeomAPI_Interface
23 {
24  public:
25   /// Keeps no transformation, it may be set by setImpl
26   GEOMAPI_EXPORT GeomAPI_Trsf();
27   /// Takes the pointer to existing transformation
28   GEOMAPI_EXPORT GeomAPI_Trsf(void* theTrsf);
29
30   /** \brief Sets a translation transformation.
31    *  \param[in] theAxis     translation axis.
32    *  \param[in] theDistance translation distance.
33    */
34   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
35                                      const double theDistance);
36
37   /** \brief Sets a translation transformation using three coordinates.
38    *  \param[in] theDx x coordinate of the translation vector
39    *  \param[in] theDy y coordinate of the translation vector
40    *  \param[in] theDz z coordinate of the translation vector
41    */
42   GEOMAPI_EXPORT void setTranslation(const double theDx,
43                                      const double theDy,
44                                      const double theDz);
45
46   /** \brief Sets a rotation transformation.
47    *  \param[in] theAxis  rotation axis.
48    *  \param[in] theAngle rotation angle(in degree).
49    */
50   GEOMAPI_EXPORT void setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
51                                   const double theAngle);
52 };
53
54 #endif
55