Defines a 2D transformation matrix. More...
#include <cadex/Geom/Transformation2d.hxx>
Public Member Functions | |
Transformation2d () | |
Constructor. | |
Transformation2d (const Transformation2d &theTrsf) | |
Constructor. | |
Transformation2d (const Matrix2d &theMatrix, const Vector2d &theTranslation, double theScale=1.0) | |
Transformation2d (const Vector2d &theTranslation) | |
Transformation2d (const Point2d &theP, double theAng) | |
Transformation2d (const Point2d &theP, double theAng, const Vector2d &theTranslation) | |
bool | IsIdentity () const |
void | ResetToIdentity () |
double | ScaleFactor () const |
void | SetScaleFactor (double theScale) |
Sets a scale factor. | |
double | RotationAngle () const |
const Matrix2d & | Rotation () const |
void | SetRotation (const Matrix2d &theMatrix) |
void | SetRotation (const Point2d &theP, double theAng) |
const Vector2d & | Translation () const |
void | SetTranslation (const Point2d &theP1, const Point2d &theP2) |
void | SetTranslation (const Vector2d &theV) |
Sets a translation matrix. | |
bool | IsNegative () const |
void | Invert () |
Inverts the matrix. | |
Transformation2d | Inverted () const |
void | Multiply (const Transformation2d &theTrsf) |
Multiplies this matrix with another one. | |
Transformation2d | Multiplied (const Transformation2d &theTrsf) const |
void | Power (int theNum) |
Transformation2d | Powered (int theNum) |
bool | IsEqual (const Transformation2d &theOther) const |
void | operator*= (const Transformation2d &theTrsf) |
Static Public Member Functions | |
static Transformation2d | MirrorTransformation (const Point2d &thePoint) |
static Transformation2d | MirrorTransformation (const Axis2d &theAxis) |
static Transformation2d | ScaleTransformation (const Point2d &thePoint, double theScale) |
static Transformation2d | RotateTransformation (const Point2d &theVec, double theAngle) |
static Transformation2d | TranslateTransformation (const Vector2d &theVector) |
Protected Member Functions | |
void | Orthogonalize () |
Defines a 2D transformation matrix.
Contains rotation and translation part and a scale factor. A rotation part (2 x 2 matrix) must not contain a scale factor or inversion, i.e. its matrix determinant must be equal to 1.
Individual matrix elements can retrieved using the Data() method.
cadex::Geom::Transformation2d::Transformation2d | ( | ) |
Constructor.
Creates an identity matrix.
void cadex::Geom::Transformation2d::Invert | ( | ) |
Inverts the matrix.
Makes this matrix an inverse, i.e. A * A^(-1) = I.
void cadex::Geom::Transformation2d::SetScaleFactor | ( | double | theScale | ) |
Sets a scale factor.
void cadex::Geom::Transformation2d::SetTranslation | ( | const Vector2d & | theVec | ) |
Sets a translation matrix.
Discards the existing transformation matrix and sets it to define translation for the specified vector.