X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Trsf.cpp;h=f0775141ceb40c9c22919d747ace9f04b977b31f;hb=3d28bcbab2f3ed0e40295e64f4e836caebc19fca;hp=7a3c8c17800cc50c88910b2e7feaa22d0f76706f;hpb=0c0c2fd5b941ad2e65a0e82251dca2f796750b97;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Trsf.cpp b/src/GeomAPI/GeomAPI_Trsf.cpp index 7a3c8c178..f0775141c 100644 --- a/src/GeomAPI/GeomAPI_Trsf.cpp +++ b/src/GeomAPI/GeomAPI_Trsf.cpp @@ -6,14 +6,35 @@ #include +#include + +#include #include +#define MY_TRSF implPtr() + +//================================================================================================= GeomAPI_Trsf::GeomAPI_Trsf() - : GeomAPI_Interface() +: GeomAPI_Interface(new gp_Trsf()) { } +//================================================================================================= GeomAPI_Trsf::GeomAPI_Trsf(void* theTrsf) - : GeomAPI_Interface(theTrsf) +: GeomAPI_Interface(theTrsf) +{ +} + +//================================================================================================= +void GeomAPI_Trsf::setTranslation(const std::shared_ptr theAxis, + const double theDistance) +{ + MY_TRSF->SetTranslation(gp_Vec(theAxis->impl().Direction()) * theDistance); +} + +//================================================================================================= +void GeomAPI_Trsf::setRotation(const std::shared_ptr theAxis, + const double theAngle) { + MY_TRSF->SetRotation(theAxis->impl(), theAngle / 180.0 * M_PI); }