OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKMath
gp


gp_Trsf2d Class Reference

Defines a non-persistent transformation in 2D space.
The following transformations are implemented :
. Translation, Rotation, Scale
. Symmetry with respect to a point and a line.
Complex transformations can be obtained by combining the
previous elementary transformations using the method Multiply.
The transformations can be represented as follow :

V1 V2 T XY XY
| a11 a12 a13 | | x | | x'|
| a21 a22 a23 | | y | | y'|
| 0 0 1 | | 1 | | 1 |
.

#include <gp_Trsf2d.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
 gp_Trsf2d ()
 Returns identity transformation.
.
 gp_Trsf2d (const gp_Trsf &T)
 Creates a 2d transformation in the XY plane from a
3d transformation .
.
void SetMirror (const gp_Pnt2d &P)
 Changes the transformation into a symmetrical transformation.
P is the center of the symmetry.
.
Standard_EXPORT void SetMirror (const gp_Ax2d &A)
 Changes the transformation into a symmetrical transformation.
A is the center of the axial symmetry.
.
void SetRotation (const gp_Pnt2d &P, const Standard_Real Ang)
 Changes the transformation into a rotation.
P is the rotation's center and Ang is the angular value of the
rotation in radian.
.
void SetScale (const gp_Pnt2d &P, const Standard_Real S)
 Changes the transformation into a scale.
P is the center of the scale and S is the scaling value.
.
Standard_EXPORT void SetTransformation (const gp_Ax2d &FromSystem1, const gp_Ax2d &ToSystem2)
 Changes a transformation allowing passage from the coordinate
system "FromSystem1" to the coordinate system "ToSystem2".
.
Standard_EXPORT void SetTransformation (const gp_Ax2d &ToSystem)
 Changes the transformation allowing passage from the basic
coordinate system
{P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.)}
to the local coordinate system defined with the Ax2d ToSystem.
.
void SetTranslation (const gp_Vec2d &V)
 Changes the transformation into a translation.
V is the vector of the translation.
.
void SetTranslation (const gp_Pnt2d &P1, const gp_Pnt2d &P2)
 Makes the transformation into a translation from
the point P1 to the point P2.
.
Standard_EXPORT void SetTranslationPart (const gp_Vec2d &V)
 Replaces the translation vector with V.
.
Standard_EXPORT void SetScaleFactor (const Standard_Real S)
 Modifies the scale factor.
.
Standard_Boolean IsNegative () const
 Returns true if the determinant of the vectorial part of
this transformation is negative..
.
gp_TrsfForm Form () const
 Returns the nature of the transformation. It can be an
identity transformation, a rotation, a translation, a mirror
(relative to a point or an axis), a scaling transformation,
or a compound transformation.
.
Standard_Real ScaleFactor () const
 Returns the scale factor.
.
const gp_XYTranslationPart () const
 Returns the translation part of the transformation's matrix
.
Standard_EXPORT gp_Mat2d VectorialPart () const
 Returns the vectorial part of the transformation. It is a
2*2 matrix which includes the scale factor.
.
const gp_Mat2dHVectorialPart () const
 Returns the homogeneous vectorial part of the transformation.
It is a 2*2 matrix which doesn't include the scale factor.
The coefficients of this matrix must be multiplied by the
scale factor to obtain the coefficients of the transformation.
.
Standard_EXPORT Standard_Real RotationPart () const
 Returns the angle corresponding to the rotational component
of the transformation matrix (operation opposite to SetRotation()).
.
Standard_Real Value (const Standard_Integer Row, const Standard_Integer Col) const
 Returns the coefficients of the transformation's matrix.
It is a 2 rows * 3 columns matrix.
Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3
.
Standard_EXPORT void Invert ()
gp_Trsf2d Inverted () const
 Computes the reverse transformation.
Raises an exception if the matrix of the transformation
is not inversible, it means that the scale factor is lower
or equal to Resolution from package gp.
.
gp_Trsf2d Multiplied (const gp_Trsf2d &T) const
gp_Trsf2d operator * (const gp_Trsf2d &T) const
Standard_EXPORT void Multiply (const gp_Trsf2d &T)
 Computes the transformation composed from <t> and <me>.
In a C++ implementation you can also write Tcomposed = <me> * T.
Example :
Trsf2d T1, T2, Tcomp; ...............
//composition :
Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1)
// transformation of a point
Pnt2d P1(10.,3.,4.);
Pnt2d P2 = P1.Transformed(Tcomp); //using Tcomp
Pnt2d P3 = P1.Transformed(T1); //using T1 then T2
P3.Transform(T2); // P3 = P2 !!!
.
void operator *= (const gp_Trsf2d &T)
Standard_EXPORT void PreMultiply (const gp_Trsf2d &T)
 Computes the transformation composed from <me> and T.
<me> = T * <me>
.
Standard_EXPORT void Power (const Standard_Integer N)
gp_Trsf2d Powered (const Standard_Integer N)
 Computes the following composition of transformations
<me> * <me> * .......* <me>, N time.
if N = 0 <me> = Identity
if N < 0 <me> = <me>.Inverse() *...........* <me>.Inverse().
.
void Transforms (Standard_Real &X, Standard_Real &Y) const
void Transforms (gp_XY &Coord) const
 Transforms a doublet XY with a Trsf2d
.
Standard_Real _CSFDB_Getgp_Trsf2dscale () const
void _CSFDB_Setgp_Trsf2dscale (const Standard_Real p)
gp_TrsfForm _CSFDB_Getgp_Trsf2dshape () const
void _CSFDB_Setgp_Trsf2dshape (const gp_TrsfForm p)
const gp_Mat2d_CSFDB_Getgp_Trsf2dmatrix () const
const gp_XY_CSFDB_Getgp_Trsf2dloc () const

Private Attributes

Standard_Real scale
gp_TrsfForm shape
gp_Mat2d matrix
gp_XY loc

Friends

Standard_EXPORT friend Handle_Standard_Type & gp_Trsf2d_Type_ ()


Constructor & Destructor Documentation

gp_Trsf2d::gp_Trsf2d  )  [inline]
 

gp_Trsf2d::gp_Trsf2d const gp_Trsf T  )  [inline]
 


Member Function Documentation

const gp_XY& gp_Trsf2d::_CSFDB_Getgp_Trsf2dloc  )  const [inline]
 

const gp_Mat2d& gp_Trsf2d::_CSFDB_Getgp_Trsf2dmatrix  )  const [inline]
 

Standard_Real gp_Trsf2d::_CSFDB_Getgp_Trsf2dscale  )  const [inline]
 

gp_TrsfForm gp_Trsf2d::_CSFDB_Getgp_Trsf2dshape  )  const [inline]
 

void gp_Trsf2d::_CSFDB_Setgp_Trsf2dscale const Standard_Real  p  )  [inline]
 

void gp_Trsf2d::_CSFDB_Setgp_Trsf2dshape const gp_TrsfForm  p  )  [inline]
 

gp_TrsfForm gp_Trsf2d::Form  )  const [inline]
 

const gp_Mat2d & gp_Trsf2d::HVectorialPart  )  const [inline]
 

Standard_EXPORT void gp_Trsf2d::Invert  ) 
 

gp_Trsf2d gp_Trsf2d::Inverted  )  const [inline]
 

Standard_Boolean gp_Trsf2d::IsNegative  )  const [inline]
 

gp_Trsf2d gp_Trsf2d::Multiplied const gp_Trsf2d T  )  const [inline]
 

Standard_EXPORT void gp_Trsf2d::Multiply const gp_Trsf2d T  ) 
 

gp_Trsf2d gp_Trsf2d::operator * const gp_Trsf2d T  )  const [inline]
 

void gp_Trsf2d::operator *= const gp_Trsf2d T  )  [inline]
 

void gp_Trsf2d::operator delete void *  anAddress  )  [inline]
 

void* gp_Trsf2d::operator new size_t  size  )  [inline]
 

void* gp_Trsf2d::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_EXPORT void gp_Trsf2d::Power const Standard_Integer  N  ) 
 

gp_Trsf2d gp_Trsf2d::Powered const Standard_Integer  N  )  [inline]
 

Standard_EXPORT void gp_Trsf2d::PreMultiply const gp_Trsf2d T  ) 
 

Standard_EXPORT Standard_Real gp_Trsf2d::RotationPart  )  const
 

Standard_Real gp_Trsf2d::ScaleFactor  )  const [inline]
 

Standard_EXPORT void gp_Trsf2d::SetMirror const gp_Ax2d A  ) 
 

void gp_Trsf2d::SetMirror const gp_Pnt2d P  )  [inline]
 

void gp_Trsf2d::SetRotation const gp_Pnt2d P,
const Standard_Real  Ang
[inline]
 

void gp_Trsf2d::SetScale const gp_Pnt2d P,
const Standard_Real  S
[inline]
 

Standard_EXPORT void gp_Trsf2d::SetScaleFactor const Standard_Real  S  ) 
 

Standard_EXPORT void gp_Trsf2d::SetTransformation const gp_Ax2d ToSystem  ) 
 

Standard_EXPORT void gp_Trsf2d::SetTransformation const gp_Ax2d FromSystem1,
const gp_Ax2d ToSystem2
 

void gp_Trsf2d::SetTranslation const gp_Pnt2d P1,
const gp_Pnt2d P2
[inline]
 

void gp_Trsf2d::SetTranslation const gp_Vec2d V  )  [inline]
 

Standard_EXPORT void gp_Trsf2d::SetTranslationPart const gp_Vec2d V  ) 
 

void gp_Trsf2d::Transforms gp_XY Coord  )  const [inline]
 

void gp_Trsf2d::Transforms Standard_Real X,
Standard_Real Y
const [inline]
 

const gp_XY & gp_Trsf2d::TranslationPart  )  const [inline]
 

Standard_Real gp_Trsf2d::Value const Standard_Integer  Row,
const Standard_Integer  Col
const [inline]
 

Standard_EXPORT gp_Mat2d gp_Trsf2d::VectorialPart  )  const
 


Friends And Related Function Documentation

Standard_EXPORT friend Handle_Standard_Type& gp_Trsf2d_Type_  )  [friend]
 


Field Documentation

gp_XY gp_Trsf2d::loc [private]
 

gp_Mat2d gp_Trsf2d::matrix [private]
 

Standard_Real gp_Trsf2d::scale [private]
 

gp_TrsfForm gp_Trsf2d::shape [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:12:41 2008 for OpenCASCADE by  doxygen 1.4.1