FastUIDraw
|
A representation of a 3x3 matrix, that in addition to the NxN matrix functionality provides function for calculating the determinant. More...
#include <matrix.hpp>
Public Types | |
typedef matrixNxM< 3, 3, T > | base_class |
Conveniance typedef to base class, matrixNxM<3, 3, T> | |
Public Types inherited from fastuidraw::matrixNxM< 3, 3, T > | |
enum | |
typedef vecN< T, N *M > | raw_data_type |
Typedef to underlying vecN that holds the matrix data. | |
Public Member Functions | |
matrix3x3 (void) | |
matrix3x3 (const base_class &obj) | |
matrix3x3 (const vecN< T, 3 > &t, const vecN< T, 3 > &b, const vecN< T, 3 > &n) | |
matrix3x3 (const matrixNxM< 2, 2, T > &mat, const vecN< T, 2 > &vec=vecN< T, 2 >(T(0))) | |
matrix3x3 (const orthogonal_projection_params< T > &P) | |
matrix3x3 (const projection_params< T > &P) | |
void | cofactor (matrix3x3 &result) const |
void | cofactor_transpose (matrix3x3 &result) const |
T | determinate (void) const |
void | inverse (matrix3x3 &result) const |
void | inverse_orthogonal_projection_matrix (const orthogonal_projection_params< T > &P) |
void | inverse_transpose (matrix3x3 &result) const |
void | orthogonal_projection_matrix (const orthogonal_projection_params< T > &P) |
void | orthogonal_projection_matrix (T l, T r, T b, T t) |
void | projection_matrix (const projection_params< T > &P) |
bool | reverses_orientation (void) const |
void | rotate (T angle) |
void | scale (T s) |
void | shear (T sx, T sy) |
void | translate (T x, T y) |
void | translate (const vecN< T, 2 > &p) |
Public Member Functions inherited from fastuidraw::matrixNxM< 3, 3, T > | |
matrixNxM (const matrixNxM &obj) | |
matrixNxM (void) | |
T * | c_ptr (void) |
const T * | c_ptr (void) const |
T & | col_row (unsigned int col, unsigned row) |
const T & | col_row (unsigned int col, unsigned row) const |
T & | operator() (unsigned int row, unsigned int col) |
const T & | operator() (unsigned int row, unsigned int col) const |
matrixNxM | operator* (T value) const |
matrixNxM< N, K, T > | operator* (const matrixNxM< M, K, T > &matrix) const |
vecN< T, N > | operator* (const vecN< T, M > &in) const |
matrixNxM | operator+ (const matrixNxM &matrix) const |
matrixNxM | operator- (const matrixNxM &matrix) const |
vecN< T, N *M > & | raw_data (void) |
const vecN< T, N *M > & | raw_data (void) const |
void | reset (void) |
void | swap (matrixNxM &obj) |
void | transpose (matrixNxM< M, N, T > &retval) const |
matrixNxM< M, N, T > | transpose (void) const |
A representation of a 3x3 matrix, that in addition to the NxN matrix functionality provides function for calculating the determinant.
Definition at line 440 of file matrix.hpp.
|
inline |
Initializes the 3x3 matrix as the identity, i.e. diagnols are 1 and other values are 0.
Definition at line 453 of file matrix.hpp.
|
inline |
Copy-constructor for a 3x3 matrix.
obj | target matrix to copy. |
Definition at line 459 of file matrix.hpp.
|
inline |
Construct a matrix3x3 M so that
t | first row vector |
b | second row vector |
n | third row vector |
Definition at line 470 of file matrix.hpp.
|
inline |
Initialize the 3x3 matrix with the upper 2x2 corner coming from a 2x2 martix and the right column coming from a 2-vector. The bottom is initialized as 0 in first and second column and bottom right as 1.
Definition at line 486 of file matrix.hpp.
|
inline |
fn matrix3x3(const orthogonal_projection_params<T>&) Creates a 3x3 orthogonal projection matrix from the given projection parameters.
P | orthogonal projection parameters for the matrix |
Definition at line 505 of file matrix.hpp.
|
inline |
fn matrix3x3(const orthogonal_projection_params<T>&) Creates a 3x3 projection matrix from the given projection parameters.
P | projection parameters for the matrix |
Definition at line 516 of file matrix.hpp.
|
inline |
Compute the cofactor matrix
result | location to which to place the cofactor matrx |
Definition at line 746 of file matrix.hpp.
|
inline |
Compute the transpose of the cofactor matrix
result | location to which to place the cofactor matrx |
Definition at line 727 of file matrix.hpp.
|
inline |
Calculates the determinant for the matrix.
Definition at line 714 of file matrix.hpp.
|
inline |
Compute the inverse of a matrix.
result | location to which to place the inverse matrix |
Definition at line 765 of file matrix.hpp.
|
inline |
Sets the matrix variables to correspond the inverse to an orthogonal projection matrix determined by the given projection parameters.
P | orthogonal projection parameters for this matrix |
Definition at line 661 of file matrix.hpp.
|
inline |
Compute the inverse transpose of a matrix.
result | location to which to place the inverse matrix |
Definition at line 780 of file matrix.hpp.
|
inline |
Sets the matrix variables to correspond an orthogonal projection matrix determined by the given projection parameters.
P | orthogonal projection parameters for this matrix |
Definition at line 639 of file matrix.hpp.
|
inline |
Convenience function to matrix3x3::orthogonal_projection_matrix(const project_params<T>&).
l | Left |
r | Right |
b | Bottom |
t | Top |
Definition at line 684 of file matrix.hpp.
|
inline |
Sets the matrix values to correspond the projection matrix determined by the given projection parameters.
P | projection parameters for this matrix |
Definition at line 695 of file matrix.hpp.
|
inline |
Checks whether the matrix reverses orientation. This check is equivalent to determinant < T(0).
Definition at line 795 of file matrix.hpp.
|
inline |
Apply a rotation matrix on the right of the matrix, algebraicly equivalent to
angle | amount by which to rotate in radians. |
Definition at line 605 of file matrix.hpp.
|
inline |
Apply scale on the right of the matrix, algebraicly equivalent to
Definition at line 553 of file matrix.hpp.
|
inline |
Apply shear on the right of the matrix, algebraicly equivalent to
Definition at line 532 of file matrix.hpp.
|
inline |
Apply translate on the right of the matrix, algebraicly equivalent to
x | amount by which to translate horizontally |
y | amount by which to translate vertically |
Definition at line 570 of file matrix.hpp.
|
inline |
Provided as an override conveniance, equivalent to
p | amount by which to translate |
Definition at line 585 of file matrix.hpp.