Public Types |
| enum | Matrix33_init { IDENTITY,
ZERO
} |
| enum | Matrix33_init_d { ROTATE,
SCALE
} |
| enum | Matrix33_init_v { TRANSLATE,
SCALE_XY
} |
Public Methods |
| | Matrix33 (void) |
| | Default constructor.
|
| | Matrix33 (Matrix33_init) |
| | Constructor for operations that take no arguments.
|
| | Matrix33 (Matrix33_init_d, double) |
| | Constructor for operations that are defined by a double.
|
| | Matrix33 (Matrix33_init_v, const Vector2 &) |
| | Constructor for operations that are defined by a ZVector2.
|
| void | set_zero (void) |
| | Sets this matrix to the zero matrix.
|
| void | set_identity (void) |
| | Sets this matrix to the identity matrix.
|
| void | set_translation (const Vector2 &) |
| | Sets the elements of this matrix so that it represents a 2D translation of the given vector.
|
| void | set_rotation (double angle) |
| | Sets the elements of this matrix so that it represents a 2D rotation about the origin by the given anti-clockwise angle in radians.
|
| void | set_rotation (double angle, const Vector2 &origin) |
| | Sets the elements of this matrix so that it represents a 2D rotation about 'centre' by the given anti-clockwise angle in radians.
|
| void | set_scale (double scale) |
| | Sets the elements of this matrix so that it represents a 2D scale centred on the origin by the given scale factor.
|
| void | set_scale (const Vector2 &scale_xy) |
| | Sets the elements of this matrix so that it represents a 2D scale centred on the origin by the factors in X and Y given in the ZVector2.
|
| void | transform (Vector2 *) const |
| | Transforms the given Vector2 by this matrix.
|
| Matrix33 | operator * (const Matrix33 &) const |
| | Returns the product of this matrix with the one given.
|
Private Attributes |
| double | m_elements [3][3] |
| | Matrix elements, [rows][cols].
|
The standard coordinate space has the Y-axis pointing up. Angles are measured in radians, and increase ACW.