Defines a non-persistent transformation in 2D space. The following transformations are implemented :
More...
|
| gp_Trsf2d () |
| Returns identity transformation.
|
|
| gp_Trsf2d (const gp_Trsf &theT) |
| Creates a 2d transformation in the XY plane from a 3d transformation .
|
|
void | SetMirror (const gp_Pnt2d &theP) |
| Changes the transformation into a symmetrical transformation. theP is the center of the symmetry.
|
|
void | SetMirror (const gp_Ax2d &theA) |
| Changes the transformation into a symmetrical transformation. theA is the center of the axial symmetry.
|
|
void | SetRotation (const gp_Pnt2d &theP, const Standard_Real theAng) |
| Changes the transformation into a rotation. theP is the rotation's center and theAng is the angular value of the rotation in radian.
|
|
void | SetScale (const gp_Pnt2d &theP, const Standard_Real theS) |
| Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value.
|
|
void | SetTransformation (const gp_Ax2d &theFromSystem1, const gp_Ax2d &theToSystem2) |
| Changes a transformation allowing passage from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2".
|
|
void | SetTransformation (const gp_Ax2d &theToSystem) |
| 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 theToSystem.
|
|
void | SetTranslation (const gp_Vec2d &theV) |
| Changes the transformation into a translation. theV is the vector of the translation.
|
|
void | SetTranslation (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) |
| Makes the transformation into a translation from the point theP1 to the point theP2.
|
|
void | SetTranslationPart (const gp_Vec2d &theV) |
| Replaces the translation vector with theV.
|
|
void | SetScaleFactor (const Standard_Real theS) |
| 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_XY & | TranslationPart () const |
| Returns the translation part of the transformation's matrix.
|
|
gp_Mat2d | VectorialPart () const |
| Returns the vectorial part of the transformation. It is a 2*2 matrix which includes the scale factor.
|
|
const gp_Mat2d & | HVectorialPart () 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_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 theRow, const Standard_Integer theCol) const |
| Returns the coefficients of the transformation's matrix. It is a 2 rows * 3 columns matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3.
|
|
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 &theT) const |
|
gp_Trsf2d | operator* (const gp_Trsf2d &theT) const |
|
void | Multiply (const gp_Trsf2d &theT) |
| Computes the transformation composed from <me> and theT. <me> = <me> * theT.
|
|
void | operator*= (const gp_Trsf2d &theT) |
|
void | PreMultiply (const gp_Trsf2d &theT) |
| Computes the transformation composed from <me> and theT. <me> = theT * <me>
|
|
void | Power (const Standard_Integer theN) |
|
gp_Trsf2d | Powered (const Standard_Integer theN) |
| Computes the following composition of transformations <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Inverse() ........... <me>.Inverse().
|
|
void | Transforms (Standard_Real &theX, Standard_Real &theY) const |
|
void | Transforms (gp_XY &theCoord) const |
| Transforms a doublet XY with a Trsf2d.
|
|
void | SetValues (const Standard_Real a11, const Standard_Real a12, const Standard_Real a13, const Standard_Real a21, const Standard_Real a22, const Standard_Real a23) |
| Sets the coefficients of the transformation. The transformation of the point x,y is the point x',y' with :
|
|
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 |
where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects.