#include <Matrix2x3.h>
Public Member Functions | |
| Matrix2x3 (void) | |
| Matrix2x3 (const Matrix2x3 &m) | |
| Matrix2x3 & | operator= (const Matrix2x3 &m) |
| void | swap (Matrix2x3 &m) |
| ~Matrix2x3 (void) | |
| Matrix2x3 (const float _11, const float _12, const float _13, const float _21, const float _22, const float _23) | |
| Matrix2x3 (const Vector2 &x, const Vector2 &y, const Vector2 &w) | |
| Matrix2x3 (const float phi, const Vector2 &w) | |
| const float | det () const |
| const Matrix2x3 | inverted () const |
| const float | operator[] (unsigned index) const |
| float & | operator[] (unsigned index) |
| const Vector2 | get (unsigned i) const |
| const Matrix2x3 & | set (unsigned i, const Vector2 &v) |
| const Matrix2x3 & | set (const ml7::Vector2 &x, const ml7::Vector2 &y, const ml7::Vector2 &w) |
| const float | angle () const |
| const Vector2 | translation () const |
| const Matrix2x3 | operator- () const |
| const Matrix2x3 | operator+ (const Matrix2x3 &m) const |
| const Matrix2x3 | operator- (const Matrix2x3 &m) const |
| const Matrix2x3 | operator* (const float s) const |
| const Vector2 | operator* (const Vector2 &v) const |
| const Matrix2x3 | operator* (const Matrix2x3 &m) const |
| const Vector2 | trans (const Vector2 &v) const |
| const Vector2 | transdir (const Vector2 &v) const |
| const Vector2 | transinv (const Vector2 &v) const |
| const Vector2 | transdirinv (const Vector2 &v) const |
| Matrix2x3 & | operator+= (const Matrix2x3 &m) |
| Matrix2x3 & | operator-= (const Matrix2x3 &m) |
| Matrix2x3 & | operator*= (const float s) |
| Matrix2x3 & | operator*= (const Matrix2x3 &m) |
| Matrix2x3 & | clear () |
| Matrix2x3 & | identity () |
| Matrix2x3 & | invert () |
| Matrix2x3 & | invert (const Matrix2x3 &m) |
| Matrix2x3 & | rotation (const float phi) |
| Matrix2x3 & | set (const float phi, const Vector2 &w) |
| const bool | operator== (const Matrix2x3 &m) const |
| const bool | operator!= (const Matrix2x3 &m) const |
| operator const float *const () const | |
| operator float *const () | |
Public Attributes | |
| union { | |
| struct { | |
| float _11 | |
| float _12 | |
| float _13 | |
| float _21 | |
| float _22 | |
| float _23 | |
| } | |
| float data [6] | |
| float m [2][3] | |
| }; | |
Represents a 2x3-matrix for transforming (rotating and translating) 2d-vectors. Used for 2d-physics and -graphics.
| ml7::Matrix2x3::Matrix2x3 | ( | void | ) | [inline] |
Default constructor. Creates a new identity matrix representing a zero transformation (no rotation, no translation).
| ml7::Matrix2x3::Matrix2x3 | ( | const Matrix2x3 & | m | ) | [inline] |
Copy constructor. Copies a given matrix m.
| ml7::Matrix2x3::~Matrix2x3 | ( | void | ) | [inline] |
Destructor.
| ml7::Matrix2x3::Matrix2x3 | ( | const float | _11, | |
| const float | _12, | |||
| const float | _13, | |||
| const float | _21, | |||
| const float | _22, | |||
| const float | _23 | |||
| ) | [inline] |
Explicit constructor with parameters for each element.
Explicit constructor with given three vectors making up the columns.
| ml7::Matrix2x3::Matrix2x3 | ( | const float | phi, | |
| const Vector2 & | w | |||
| ) | [inline] |
Explicit constructor with a given ccw-angle phi and a given translation vector w.
| const float ml7::Matrix2x3::angle | ( | ) | const [inline] |
Returns the angle of the counter-clockwise rotation represented by the 2x2-part of this matrix.
| Matrix2x3 & ml7::Matrix2x3::clear | ( | ) |
Forces this matrix to be an empty matrix representing no legal transformation (no legal rotation, no translation).
| const float ml7::Matrix2x3::det | ( | ) | const |
Returns the determinant of this matrix.
| const Vector2 ml7::Matrix2x3::get | ( | unsigned | i | ) | const [inline] |
Returns the i-th (0-indexed) column vector of this matrix.
| Matrix2x3 & ml7::Matrix2x3::identity | ( | ) |
Forces this matrix to be an identity matrix representing a zero transformation (no rotation, no translation).
| Matrix2x3 & ml7::Matrix2x3::invert | ( | ) |
Inverts this matrix. Fortunately we have to deal with a matrix consisting of a rotation matrix and a vector for translation so we confidently may do a transposition and a vector transformation instead of an expensive inversion.
Replaces this matrix by a given matrix m inverted. Fortunately we have to deal with a matrix consisting of a rotation matrix and a vector for translation so we confidently may do a transposition and a vector transformation instead of an expensive inversion.
| const Matrix2x3 ml7::Matrix2x3::inverted | ( | ) | const |
Copies this matrix and inverts it. Fortunately we have to deal with a matrix consisting of a rotation matrix and a vector for translation so we confidently may do a transposition and a vector transformation instead of an expensive inversion.
| ml7::Matrix2x3::operator const float *const | ( | ) | const [inline] |
| ml7::Matrix2x3::operator float *const | ( | ) | [inline] |
| const bool ml7::Matrix2x3::operator!= | ( | const Matrix2x3 & | m | ) | const |
Checks if a given matrix m and this have non-identical elements.
Returns a copy of a given matrix m transformed by this.
Returns a copy of a given vector v tranformed by this matrix.
| const Matrix2x3 ml7::Matrix2x3::operator* | ( | const float | s | ) | const |
Returns a copy of this matrix scaled by a given scalar s.
Transforms this matrix by a given matrix m. It results in an operation identical to m * this.
| Matrix2x3 & ml7::Matrix2x3::operator*= | ( | const float | s | ) |
Scales this matrix by a given scalar s.
Returns a given matrix m added to this.
| const Matrix2x3 ml7::Matrix2x3::operator- | ( | ) | const [inline] |
Returns a copy of this matrix with the elements having signs flipped.
Returns a given matrix m subtracted from this.
Subtracts a given matrix m from this.
Copy assignment operator. Copies the elements of a given matrix m.
| const bool ml7::Matrix2x3::operator== | ( | const Matrix2x3 & | m | ) | const |
Checks if a given matrix m and this have identical elements.
| const float ml7::Matrix2x3::operator[] | ( | unsigned | index | ) | const [inline] |
Indexed component access.
| float& ml7::Matrix2x3::operator[] | ( | unsigned | index | ) | [inline] |
Indexed component access.
| Matrix2x3 & ml7::Matrix2x3::rotation | ( | const float | phi | ) |
Forces this matrix to be a rotation matrix with a ccw-angle phi.
Forces this matrix to be a transformation matrix with a ccw-angle phi and a translation vector w.
| const Matrix2x3& ml7::Matrix2x3::set | ( | const ml7::Vector2 & | x, | |
| const ml7::Vector2 & | y, | |||
| const ml7::Vector2 & | w | |||
| ) | [inline] |
Sets the column vectors of this matrix.
Sets the i-th (0-indexed) column vector of this matrix.
| void ml7::Matrix2x3::swap | ( | Matrix2x3 & | m | ) | [inline] |
Swap operation. Swaps the elements of a given matrix m with this.
Returns a copy of a given vector v transformed by this matrix. Used to transform position vectors rather than direction vectors. This operation is identical to this * v.
Returns a copy of a given vector v rotated by the rotation tensor of this matrix. Used to transform direction vectors rather than position vectors.
Returns a copy of a given vector v rotated by the rotation tensor of this matrix inverted. Used to transform direction vectors rather than position vectors.
Returns a copy of a given vector v transformed by this matrix inverted. Used to transform position vectors rather than direction vectors.
| const Vector2 ml7::Matrix2x3::translation | ( | ) | const [inline] |
Returns the translation vector of this matrix.
| union { ... } |
| float ml7::Matrix2x3::_11 |
Element in the 1st row and 1st column.
| float ml7::Matrix2x3::_12 |
Element in the 1st row and 2nd column.
| float ml7::Matrix2x3::_13 |
Element in the 1st row and 3rd column.
| float ml7::Matrix2x3::_21 |
Element in the 2nd row and 1st column.
| float ml7::Matrix2x3::_22 |
Element in the 2nd row and 2nd column.
| float ml7::Matrix2x3::_23 |
Element in the 2nd row and 3rd column.
| float ml7::Matrix2x3::data[6] |
Array of the elements.
| float ml7::Matrix2x3::m[2][3] |
2d-array of the elements.
1.7.1