|
|
void | clear () |
| | Fills the matrix with zeroes. |
| |
| Vector3T< T > | column (int i) const |
| | Returns one column of the matrix As the matrix is is of row-major type, this method returns a copy of the values of the column. More... |
| |
|
T * | data () |
| | Gets a pointer to the data. |
| |
|
const T * | data () const |
| | Gets a constant pointer to the data. |
| |
|
T & | get (int r, int c) |
| | Gets one element from the matrix. |
| |
|
const T & | get (int r, int c) const |
| | Gets one constant element from the matrix. |
| |
|
void | getRotateAroundAxis (Vector3T< T > &axis, T &radians) const |
| | Assuming that this a rotation matrix, calculate rotation axis and angle. |
| |
|
bool | getRotationXYZ (T &xa, T &ya, T &za) |
| | Assuming that this a rotation matrix, calculate rotation around XYZ axis. |
| |
|
void | identity () |
| | Makes the matrix an identity matrix. |
| |
| void | insert (const Matrix2T< T > &m) |
| | Inserts the argument matrix into the top-left corner of this matrix. More... |
| |
| Matrix3T< T > | inverse (bool *ok=0, T tolerance=1.0e-8) const |
| | Calculates the inverse of this matrix. More... |
| |
| Matrix3T< T > | inverse23 () const |
| | Calculate the inverse of this matrix. More... |
| |
|
void | make (T v11, T v12, T v13, T v21, T v22, T v23, T v31, T v32, T v33) |
| | Copy argument values into this matrix. |
| |
|
| Matrix3T () |
| | Constructs the matrix without initializing any values. |
| |
|
template<class K > |
| | Matrix3T (const K *x) |
| | Constructs a matrix and initializes it from memory. |
| |
|
| Matrix3T (const Vector3T< T > &a, const Vector3T< T > &b, const Vector3T< T > &c) |
| | Constructs a matrix and initializes it with the given rows. |
| |
|
| Matrix3T (T v11, T v12, T v13, T v21, T v22, T v23, T v31, T v32, T v33) |
| | Constructs a matrix and initializes it with the given values. |
| |
|
bool | operator!= (const Matrix3T< T > &that) const |
| | Compares if two matrices are different. |
| |
| Matrix3T< T > & | operator*= (const Matrix3T< T > &that) |
| | Multiplies two matrices together. More... |
| |
|
bool | operator== (const Matrix3T< T > &that) const |
| | Compares if two matrices are equal. |
| |
|
Vector3T< T > & | operator[] (int i) |
| | Returns the ith row. |
| |
|
const Vector3T< T > & | operator[] (int i) const |
| | Returns the ith row. |
| |
|
Vector2T< T > | project (const Vector2T< T > &v) const |
| | Multiply the given point with the matrix and perform the homogenous divide. |
| |
|
Vector2T< T > | project (const T &x, const T &y) const |
| | Multiply the given point with the matrix and perform the homogenous divide. |
| |
|
void | rotateAroundAxis (const Vector3T< T > &axis, T radians) |
| | Create a rotation axis, based on rotation axis and angle. |
| |
|
void | rotateX (T a) |
| | Create a rotation matrix, around X axis. |
| |
|
void | rotateY (T a) |
| | Create a rotation matrix, around Y axis. |
| |
|
void | rotateZ (T a) |
| | Create a rotation matrix, around Z axis. |
| |
|
Vector3T< T > & | row (int i) |
| | Returns a reference to one row in the matrix. |
| |
|
const Vector3T< T > & | row (int i) const |
| | Returns a constant reference to one row in the matrix. |
| |
|
void | set (int r, int c, T v) |
| | Set the value of the given element. |
| |
|
void | transpose () |
| | Transposes the matrix. |
| |
|
Matrix3T | transposed () const |
| | Returns a transposed matrix. |
| |
|
Matrix2T< T > | upperLeft () const |
| | Get the 2x2 upper-left matrix. |
| |
|
| static int | columns () |
| | Returns the number of columns in the matrix This function can be used when you build template-based functions. More... |
| |
|
static Nimble::Matrix3T< T > | makeProjectionMatrix (const std::array< Nimble::Vector2T< T >, 4 > &vertices) |
| | Create a projection matrix which maps the unit square to given vertices. |
| |
|
static Matrix3T< T > | makeRotation (T radians) |
| | Create a matrix that performs 2D rotation. |
| |
|
static Matrix3T< T > | makeRotation (T radians, const Vector3T< T > &axis) |
| | Create a rotation matrix. |
| |
| static Matrix3T< T > | makeRotationAroundPoint (Vector2T< T > p, T radians) |
| | Rotate around a given point. More... |
| |
|
static Matrix3T< T > | makeScale (const Vector2T< T > &v) |
| | Create a matrix that performs 2D scaling. |
| |
|
static Matrix3T< T > | makeScale (const T &xscale, const T &yscale) |
| | Create a matrix that performs 2D scaling. |
| |
|
static Matrix3T< T > | makeScaleAroundPoint (Vector2T< T > p, const T &xscale, const T &yscale) |
| | Create a matrix that performs uniform scaling around the given point. |
| |
| static Matrix3T< T > | makeTransformation (float rad, float sx, float sy, float tx, float ty) |
| | Returns a 2d transformation matrix that does scale, rotate & translation (in this order) More... |
| |
|
static Matrix3T< T > | makeTranslation (const Vector2T< T > &v) |
| | Create a matrix that performs 2D translation. |
| |
|
static Matrix3T< T > | makeTranslation (const T &x, const T &y) |
| | Create a matrix that performs 2D translation. |
| |
|
static Matrix3T< T > | makeUniformScale (const T &s) |
| | Create a matrix that performs 2D scaling. |
| |
|
static Matrix3T< T > | makeUniformScaleAroundPoint (Vector2T< T > p, T s) |
| | Create a matrix that performs uniform scaling around the given point. |
| |
| static Nimble::Matrix3T< T > | mapCorrespondingPoints (const std::array< Nimble::Vector2T< T >, 4 > &from, const std::array< Nimble::Vector2T< T >, 4 > &to, bool *ok=0) |
| | Create a projective matrix which maps from[i] to to[i] for i=0..3. More... |
| |
| static int | rows () |
| | Returns the number of rows in the matrix This function can be used when you build template-based functions. More... |
| |
template<class T>
class Nimble::Matrix3T< T >
3x3 transformation matrix
This class is a row-major 3x3 matrix. The matrix functions (rotations etc.) assume right-handed coordinate system.