Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAPI / GeomAPI_Trsf.h
index 7a84cfd780c9028556aa7c99514cf24df0543240..1c92edc57bf9f620bead9c8954ffd04f1189b1e9 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        GeomAPI_XYZ.hxx
-// Created:     13 July 2015
-// Author:      Mikhail PONIKAROV
+// Copyright (C) 2014-2023  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef GeomAPI_Trsf_H_
 #define GeomAPI_Trsf_H_
@@ -11,6 +24,8 @@
 #include <memory>
 
 class GeomAPI_Ax1;
+class GeomAPI_Ax2;
+class GeomAPI_Pnt;
 
 /**\class GeomAPI_Trsf
  * \ingroup DataModel
@@ -22,13 +37,6 @@ class GeomAPI_Trsf : public GeomAPI_Interface
  public:
   /// Keeps no transformation, it may be set by setImpl
   GEOMAPI_EXPORT GeomAPI_Trsf();
-
-  /// Constructor by the impl pointer (used for internal needs)
-  template<class T> explicit GeomAPI_Trsf(T* theTrsf)
-  : GeomAPI_Interface(theTrsf)
-  {
-  }
-
   /// Takes the pointer to existing transformation
   GEOMAPI_EXPORT GeomAPI_Trsf(void* theTrsf);
 
@@ -39,13 +47,63 @@ class GeomAPI_Trsf : public GeomAPI_Interface
   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
                                      const double theDistance);
 
+  /** \brief Sets a translation transformation using three coordinates.
+   *  \param[in] theDx x coordinate of the translation vector
+   *  \param[in] theDy y coordinate of the translation vector
+   *  \param[in] theDz z coordinate of the translation vector
+   */
+  GEOMAPI_EXPORT void setTranslation(const double theDx,
+                                     const double theDy,
+                                     const double theDz);
+
+  /** \brief Sets a translation transformation using two points.
+   *  \param[in] theStartPoint  Start point of the translation vector.
+   *  \param[in] theEndPoint    End point of the translation vector.
+   */
+  GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                                     const std::shared_ptr<GeomAPI_Pnt> theEndPoint);
+
   /** \brief Sets a rotation transformation.
    *  \param[in] theAxis  rotation axis.
    *  \param[in] theAngle rotation angle(in degree).
    */
   GEOMAPI_EXPORT void setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
                                   const double theAngle);
+
+  /** \brief Sets a rotation transformation using three points.
+   *  \param[in] theCenterPoint  rotation center.
+   *  \param[in] theStartPoint   start rotation point.
+   *  \param[in] theEndPoint     end rotation point.
+   */
+  GEOMAPI_EXPORT void setRotation(const std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
+                                  const std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                                  const std::shared_ptr<GeomAPI_Pnt> theEndPoint);
+
+  /** \brief Sets a point symmetry transformation.
+   *  \param[in] thePoint symmetry point.
+   */
+  GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Pnt> thePoint);
+
+  /** \brief Sets an axis symmetry transformation.
+   *  \param[in] theAxis symmetry axis.
+   */
+  GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Ax1> theAxis);
+
+  /** \brief Sets a plane symmetry transformation.
+   *  \param[in] thePlane symmetry plane.
+   */
+  GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Ax2> thePlane);
+
+  /** \brief Sets the scaling transformation.
+   *  \param[in] theCenter scaling origin.
+   *  \param[in] theScale  scaling factor.
+   */
+  GEOMAPI_EXPORT void setScale(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
+                               const double theScale);
 };
 
+//! Pointer on the object
+typedef std::shared_ptr<GeomAPI_Trsf> GeomTrsfPtr;
+
 #endif