X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FGeom%2FGeom_Transformation.cxx;h=480717b5b0120143df227a7ae5da29f82746fabb;hb=1f7f5a900f88772fffa7675d53f0a51512e0e99a;hpb=778cd667866a3dfd3163316424864e05ef8dff93 diff --git a/src/Geom/Geom_Transformation.cxx b/src/Geom/Geom_Transformation.cxx index ed7ed87744..480717b5b0 100644 --- a/src/Geom/Geom_Transformation.cxx +++ b/src/Geom/Geom_Transformation.cxx @@ -14,27 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Geom_Transformation,MMgt_TShared) - -typedef Geom_Transformation Transformation; -typedef gp_Ax1 Ax1; -typedef gp_Ax2 Ax2; -typedef gp_Ax3 Ax3; -typedef gp_Pnt Pnt; -typedef gp_TrsfForm TrsfForm; -typedef gp_Vec Vec; + +IMPLEMENT_STANDARD_RTTIEXT(Geom_Transformation, Standard_Transient) Geom_Transformation::Geom_Transformation () { } @@ -46,99 +28,27 @@ Geom_Transformation::Geom_Transformation (const gp_Trsf& T) Handle(Geom_Transformation) Geom_Transformation::Copy() const { Handle(Geom_Transformation) T; - T = new Transformation (gpTrsf); + T = new Geom_Transformation (gpTrsf); return T; } - -void Geom_Transformation::SetMirror (const gp_Pnt& P) { gpTrsf.SetMirror (P); } - -void Geom_Transformation::SetMirror (const gp_Ax1& A1) { gpTrsf.SetMirror (A1); } - -void Geom_Transformation::SetMirror (const gp_Ax2& A2) { gpTrsf.SetMirror (A2);} - -void Geom_Transformation::SetRotation (const gp_Ax1& A1, const Standard_Real Ang) { - - gpTrsf.SetRotation (A1, Ang); -} - -void Geom_Transformation::SetScale (const gp_Pnt& P, const Standard_Real S) { - - gpTrsf.SetScale (P, S); -} - - -void Geom_Transformation::SetTransformation (const gp_Ax3& ToAxis) { - - gpTrsf.SetTransformation (ToAxis); -} - - -void Geom_Transformation::SetTransformation ( -const gp_Ax3& FromAxis1, const gp_Ax3& ToAxis2) { - - gpTrsf.SetTransformation (FromAxis1, ToAxis2); -} - - -void Geom_Transformation::SetTranslation (const gp_Vec& V) { - - gpTrsf.SetTranslation (V); -} - - -void Geom_Transformation::SetTranslation (const gp_Pnt& P1, const gp_Pnt& P2) { - - gpTrsf.SetTranslation (P1, P2); -} - - -void Geom_Transformation::SetTrsf (const gp_Trsf& T) { gpTrsf = T; } - -Standard_Boolean Geom_Transformation::IsNegative () const {return gpTrsf.IsNegative();} - -TrsfForm Geom_Transformation::Form () const { return gpTrsf.Form(); } - -Standard_Real Geom_Transformation::ScaleFactor () const { return gpTrsf.ScaleFactor(); } - -const gp_Trsf& Geom_Transformation::Trsf () const { return gpTrsf; } - -Standard_Real Geom_Transformation::Value (const Standard_Integer Row, const Standard_Integer Col) const { - - return gpTrsf.Value (Row, Col); -} - - -void Geom_Transformation::Invert () { gpTrsf.Invert(); } - - Handle(Geom_Transformation) Geom_Transformation::Inverted () const { - return new Transformation (gpTrsf.Inverted()); + return new Geom_Transformation (gpTrsf.Inverted()); } Handle(Geom_Transformation) Geom_Transformation::Multiplied ( const Handle(Geom_Transformation)& Other) const { - return new Transformation (gpTrsf.Multiplied (Other->Trsf())); + return new Geom_Transformation (gpTrsf.Multiplied (Other->Trsf())); } - -void Geom_Transformation::Multiply (const Handle(Geom_Transformation)& Other) { - - gpTrsf.Multiply (Other->Trsf()); -} - - -void Geom_Transformation::Power (const Standard_Integer N) { gpTrsf.Power (N); } - - Handle(Geom_Transformation) Geom_Transformation::Powered (const Standard_Integer N) const { gp_Trsf T = gpTrsf; T.Power (N); - return new Transformation (T); + return new Geom_Transformation (T); } @@ -146,10 +56,3 @@ void Geom_Transformation::PreMultiply (const Handle(Geom_Transformation)& Other) gpTrsf.PreMultiply (Other->Trsf()); } - - -void Geom_Transformation::Transforms (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const { - - gpTrsf.Transforms (X, Y, Z); -} -