CFx SDK Documentation
2022 SP0
|
#include <GeMatrix2d.h>
Static Public Member Functions | |
static OdGeMatrix2d | translation (const OdGeVector2d &vector) |
static OdGeMatrix2d | rotation (double angle, const OdGePoint2d ¢er=OdGePoint2d::kOrigin) |
static OdGeMatrix2d | scaling (double scale, const OdGePoint2d ¢er=OdGePoint2d::kOrigin) |
static OdGeMatrix2d | scaling (const OdGeScale2d &scale, const OdGePoint2d ¢er=OdGePoint2d::kOrigin) |
static OdGeMatrix2d | mirroring (const OdGePoint2d &mirrorPoint) |
static OdGeMatrix2d | mirroring (const OdGeLine2d &mirrorLine) |
static OdGeMatrix2d | alignCoordSys (const OdGePoint2d &fromOrigin, const OdGeVector2d &fromXAxis, const OdGeVector2d &fromYAxis, const OdGePoint2d &toOrigin, const OdGeVector2d &toXAxis, const OdGeVector2d &toYAxis) |
Public Attributes | |
double | entry [3][3] |
Static Public Attributes | |
static GE_STATIC_EXPORT const OdGeMatrix2d | kIdentity |
This class represents 2D transformation matrices that define affine ( translation, rotation, and/or scaling ) transformations.
An OdGeMatrix2d, M, can be expressed as a 3 3 matrix*, in the form
a00 a01 t0 a10 a11 t1 0 0 1
The linear part of M is the matrix
a00 a01 a10 a11
The translational part of M is the column
t0 t1
The origin of the coordinate system of M is (t0, t1).
Corresponding C++ library: TD_Ge
<group OdGe_Classes>
Definition at line 72 of file GeMatrix2d.h.
OdGeMatrix2d::OdGeMatrix2d | ( | ) |
|
static |
Returns the matrix which maps the coordinate system defined by fromOrigin, fromXAxis, and fromYAxis, to the coordinate system defined by toOrigin, toXAxis, and toYAxis.
fromOrigin | [in] Origin of the initial coordinate system. |
fromXAxis | [in] X-axis of the initial coordinate system. |
fromYAxis | [in] Y-axis of the initial coordinate system. |
toOrigin | [in] Origin of the initial coordinate system. |
toXAxis | [in] X-axis of the initial coordinate system. |
toYAxis | [in] Y-axis of the initial coordinate system. |
double OdGeMatrix2d::det | ( | ) | const |
Returns the determinant of this matrix.
void OdGeMatrix2d::getCoordSystem | ( | OdGePoint2d & | origin, |
OdGeVector2d & | xAxis, | ||
OdGeVector2d & | yAxis | ||
) | const |
Returns the origin, X-axis, and Y-axis of the coordinate system to which this matrix maps the WCS.
origin | [out] Receives the origin of the coordinate system. |
xAxis | [out] Receives the X-axis of the coordinate system. |
yAxis | [out] Receives the Y-axis of the coordinate system. |
OdGeMatrix2d OdGeMatrix2d::inverse | ( | ) | const |
Returns the inverse of this matrix.
OdGeMatrix2d& OdGeMatrix2d::invert | ( | ) |
Sets this matrix to its inverse, and returns a reference to this matrix.
bool OdGeMatrix2d::isConformal | ( | double & | scale, |
double & | angle, | ||
bool & | isMirror, | ||
OdGeVector2d & | reflex | ||
) | const |
Returns true if an only if this matrix is conformal (isUniScaledOrtho()), and returns the scale factor, angle of rotation, the presence of a mirror component to the matrix, and the direction of reflection.
scale | [out] Receives the scale factor. |
angle | [out] Receives the angle of rotation. |
isMirror | [out] Receives true if andn only if the matrix has a mirror component. |
reflex | [in] Direction of reflection. |
bool OdGeMatrix2d::isEqualTo | ( | const OdGeMatrix2d & | matrix, |
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Returns true if and only if matrix is identical to this one, within the specified tolerance.
matrix | [in] Matrix to be compared. |
tol | [in] Geomentric tolerance. |
bool OdGeMatrix2d::isScaledOrtho | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only the column vectors of the linear part of this matrix are perpendicular to each other within the specified tolerance.
tol | [in] Geomentric tolerance. |
bool OdGeMatrix2d::isSingular | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only if this matrix is singular.
bool OdGeMatrix2d::isUniScaledOrtho | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only the columns vectors of the linear part of this matrix are of equal length and perpendicular to each other within the specified tolerance.
tol | [in] Geomentric tolerance. |
|
static |
Returns the matrix which mirrors about the specified object.
mirrorLine | [in] Mirror line entity. |
|
static |
Returns the matrix which mirrors about the specified object.
mirrorPoint | [in] Mirror point. |
bool OdGeMatrix2d::operator!= | ( | const OdGeMatrix2d & | matrix | ) | const |
Inequality operator.
|
inline |
Definition at line 499 of file GeMatrix2d.h.
|
inline |
Returns or references entry[row][column] as matrix(row,column).
row | [in] Row. |
column | [in] Column. |
Definition at line 494 of file GeMatrix2d.h.
OdGeMatrix2d OdGeMatrix2d::operator* | ( | const OdGeMatrix2d & | matrix | ) | const |
Returns the product (this matrix) * matrix.
OdGeMatrix2d& OdGeMatrix2d::operator*= | ( | const OdGeMatrix2d & | matrix | ) |
bool OdGeMatrix2d::operator== | ( | const OdGeMatrix2d & | matrix | ) | const |
Equality operator.
|
inline |
Definition at line 489 of file GeMatrix2d.h.
|
inline |
Returns or references entry[row] as matrix[row].
row | [in] Row. |
Definition at line 484 of file GeMatrix2d.h.
OdGeMatrix2d& OdGeMatrix2d::postMultBy | ( | const OdGeMatrix2d & | rightSide | ) |
Sets this matrix to the product (this matrix) * rightSide, and returns a reference to this matrix.
rightSide | [in] Any 2D matrix |
OdGeMatrix2d& OdGeMatrix2d::preMultBy | ( | const OdGeMatrix2d & | leftSide | ) |
Sets this matrix to the product leftSide * (this matrix), and returns a reference to this matrix.
leftSide | [in] Any 2D matrix |
|
static |
Returns the matrix which rotates by angle about center.
angle | [in] Rotation angle. |
center | [in] Center of rotation. |
double OdGeMatrix2d::scale | ( | ) | const |
Returns the scale factor of this matrix.
|
static |
|
static |
Returns the matrix which scales by scale about center.
scale | [in] Scale factor. |
center | [in] Center of scaling. |
OdGeMatrix2d& OdGeMatrix2d::setCoordSystem | ( | const OdGePoint2d & | origin, |
const OdGeVector2d & | xAxis, | ||
const OdGeVector2d & | yAxis | ||
) |
Sets this matrix to the matrix which maps the WCS to the coordinate system defined by origin, X-axis, and Y-axis, and returns a reference to this matrix.
origin | [in] Origin of the coordinate system. |
xAxis | [in] X-axis of the coordinate system. |
yAxis | [in] Y-axis of the coordinate system. |
OdGeMatrix2d& OdGeMatrix2d::setToAlignCoordSys | ( | const OdGePoint2d & | fromOrigin, |
const OdGeVector2d & | fromXAxis, | ||
const OdGeVector2d & | fromYAxis, | ||
const OdGePoint2d & | toOrigin, | ||
const OdGeVector2d & | toXAxis, | ||
const OdGeVector2d & | toYAxis | ||
) |
Sets this matrix to the matrix which maps the coordinate system defined by fromOrigin, fromXAxis, and fromYAxis, to the coordinate system defined by toOrigin, toXAxis, and toYAxis, and returns a reference to this matrix.
fromOrigin | [in] Origin of the initial coordinate system. |
fromXAxis | [in] X-axis of the initial coordinate system. |
fromYAxis | [in] Y-axis of the initial coordinate system. |
toOrigin | [in] Origin of the initial coordinate system. |
toXAxis | [in] X-axis of the initial coordinate system. |
toYAxis | [in] Y-axis of the initial coordinate system. |
OdGeMatrix2d& OdGeMatrix2d::setToIdentity | ( | ) |
Sets this matrix to the identity matrix, and returns a reference to this matrix.
OdGeMatrix2d& OdGeMatrix2d::setToMirroring | ( | const OdGeLine2d & | mirrorLine | ) |
Sets this matrix to the matrix which mirrors about the specified object, and returns a reference to this matrix.
mirrorLine | [in] Mirror line entity. |
OdGeMatrix2d& OdGeMatrix2d::setToMirroring | ( | const OdGePoint2d & | mirrorPoint | ) |
Description: Sets this matrix to the matrix which mirrors about the specified object, and returns a reference to this matrix.
mirrorPoint | [in] Mirror point. |
OdGeMatrix2d& OdGeMatrix2d::setToProduct | ( | const OdGeMatrix2d & | matrix1, |
const OdGeMatrix2d & | matrix2 | ||
) |
Sets this matrix to the product matrix1 * matrix2, and returns a reference to this matrix.
matrix1 | [in] Any 2D matrix |
matrix2 | [in] Any 2D matrix |
OdGeMatrix2d& OdGeMatrix2d::setToRotation | ( | double | angle, |
const OdGePoint2d & | center = OdGePoint2d::kOrigin |
||
) |
Sets this matrix to the matrix which rotates by angle about center, and returns a reference to this matrix.
angle | [in] Rotation angle. |
center | [in] Center of rotation. |
OdGeMatrix2d& OdGeMatrix2d::setToScaling | ( | const OdGeScale2d & | scale, |
const OdGePoint2d & | center = OdGePoint2d::kOrigin |
||
) |
OdGeMatrix2d& OdGeMatrix2d::setToScaling | ( | double | scale, |
const OdGePoint2d & | center = OdGePoint2d::kOrigin |
||
) |
Sets this matrix to the matrix which scales by scale about tcenter, and returns a reference to this matrix.
scale | [in] Scale factor. |
center | [in] Center of scaling. |
OdGeMatrix2d& OdGeMatrix2d::setToTranslation | ( | const OdGeVector2d & | vect | ) |
Sets this matrix to the matrix which translates by vect, and returns a reference to this matrix.
vect | [in] Translation vector. |
OdGeMatrix2d& OdGeMatrix2d::setTranslation | ( | const OdGeVector2d & | vect | ) |
Sets the translation part of the matrix to the specified vector.
vect | [in] Translation vector. |
OdGeVector2d OdGeMatrix2d::translation | ( | ) | const |
Returns the translation vector of this matrix.
|
static |
Returns the matrix of the translation by vector.
vector | [in] Translation vector. |
OdGeMatrix2d OdGeMatrix2d::transpose | ( | ) | const |
Returns the transpose of this matrix.
OdGeMatrix2d& OdGeMatrix2d::transposeIt | ( | ) |
Sets this matrix to its transpose, and returns a reference to this matrix.
double OdGeMatrix2d::entry[3][3] |
Definition at line 479 of file GeMatrix2d.h.
|
static |
The identity matrix.
Definition at line 82 of file GeMatrix2d.h.