Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into BR_coding_rules
[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 class GeomAPI_Pnt;
17
18 /**\class GeomAPI_Trsf
19  * \ingroup DataModel
20  * \brief Keep the transformation matrix coefficients
21  */
22
23 class GeomAPI_Trsf : public GeomAPI_Interface
24 {
25  public:
26   /// Keeps no transformation, it may be set by setImpl
27   GEOMAPI_EXPORT GeomAPI_Trsf();
28   /// Takes the pointer to existing transformation
29   GEOMAPI_EXPORT GeomAPI_Trsf(void* theTrsf);
30
31   /** \brief Sets a translation transformation.
32    *  \param[in] theAxis     translation axis.
33    *  \param[in] theDistance translation distance.
34    */
35   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
36                                      const double theDistance);
37
38   /** \brief Sets a translation transformation using three coordinates.
39    *  \param[in] theDx x coordinate of the translation vector
40    *  \param[in] theDy y coordinate of the translation vector
41    *  \param[in] theDz z coordinate of the translation vector
42    */
43   GEOMAPI_EXPORT void setTranslation(const double theDx,
44                                      const double theDy,
45                                      const double theDz);
46
47   /** \brief Sets a translation transformation using two points.
48    *  \param[in] theStartPoint  Start point of the translation vector.
49    *  \param[in] theEndPoint    End point of the translation vector.
50    */
51   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Pnt> theStartPoint,
52                                      const std::shared_ptr<GeomAPI_Pnt> theEndPoint);
53
54   /** \brief Sets a rotation transformation.
55    *  \param[in] theAxis  rotation axis.
56    *  \param[in] theAngle rotation angle(in degree).
57    */
58   GEOMAPI_EXPORT void setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
59                                   const double theAngle);
60 };
61
62 #endif
63