Represents a generic 4*4 matrix. More...
Functions | |
Matrix4f () | |
Matrix4f default constructor. More... | |
Matrix4f (float data[]) | |
Matrix4f copy constructor (deep copy). More... | |
Matrix4f (const Matrix4f &mat) | |
Matrix4f copy constructor (deep copy). More... | |
Matrix4f | operator* (const Matrix4f &mat) const |
Matrix4f | operator* (const Vector4< float > &vect) const |
Matrix4f | operator* (const float &scalar) const |
Matrix4f | operator+ (const Matrix4f &mat) const |
Matrix4f | operator+ (const float &scalar) const |
Matrix4f | operator- (const Matrix4f &mat) const |
Matrix4f | operator- (const float &scalar) const |
bool | operator== (const Matrix4f &mat) const |
bool | operator!= (const Matrix4f &mat) const |
float & | operator() (int u, int v) |
Gets access to a specific point in the Matrix4f (read / write). More... | |
ERROR_CODE | inverse () |
Sets the Matrix4f to its inverse. More... | |
void | transpose () |
Sets the Matrix4f to its transpose. More... | |
void | setIdentity () |
Sets the Matrix4f to identity. More... | |
void | setZeros () |
Sets the Matrix4f to zero. More... | |
ERROR_CODE | setSubMatrix3f (Matrix3f input, int row=0, int column=0) |
Sets a 3x3 Matrix inside the Matrix4f. More... | |
ERROR_CODE | setSubVector3f (Vector3< float > input, int column=3) |
Sets a 3x1 Vector inside the Matrix4f at the specified column index. More... | |
ERROR_CODE | setSubVector4f (Vector4< float > input, int column=3) |
Sets a 4x1 Vector inside the Matrix4f at the specified column index. More... | |
String | getInfos () |
Returns the components of the Matrix4f in a String. More... | |
Static Functions | |
static Matrix4f | inverse (const Matrix4f &mat) |
Creates the inverse of a Matrix4f. More... | |
static Matrix4f | transpose (const Matrix4f &mat) |
Creates the transpose of a Matrix4f. More... | |
static Matrix4f | identity () |
Creates an identity Matrix4f. More... | |
static Matrix4f | zeros () |
Creates a Matrix4f filled with zeros. More... | |
Attributes | |
String | matrix_name |
Name of the matrix (optional). More... | |
Represents a generic 4*4 matrix.
It is defined in a row-major order, it means that, in the value buffer, the entire first row is stored first, followed by the entire second row, and so on. You can access the data by the 'm' ptr or by the element attribute.
r00 | r01 | r02 | tx |
r10 | r11 | r12 | ty |
r20 | r21 | r22 | tz |
m30 | m31 | m32 | m33 |
brief Gives the result of the multiplication between two Matrix4f.
brief Gives the result of the multiplication between a Matrix4f and a float4.
Matrix4f operator* | ( | const float & | scalar | ) | const |
brief Gives the result of the multiplication between a Matrix4f and a scalar.
brief Gives the result of the addition between two Matrix4f.
Matrix4f operator+ | ( | const float & | scalar | ) | const |
brief Gives the result of the addition between a Matrix4f and a scalar.
brief Gives the result of the subtraction between two Matrix4f.
Matrix4f operator- | ( | const float & | scalar | ) | const |
brief Gives the result of the subtraction between a Matrix4f and a scalar.
float& operator() | ( | int | u, |
int | v | ||
) |
Gets access to a specific point in the Matrix4f (read / write).
u | : specify the row. |
v | : specify the column. |
ERROR_CODE inverse | ( | ) |
Sets the Matrix4f to its inverse.
void transpose | ( | ) |
Sets the Matrix4f to its transpose.
void setIdentity | ( | ) |
Sets the Matrix4f to identity.
|
static |
void setZeros | ( | ) |
Sets the Matrix4f to zero.
|
static |
ERROR_CODE setSubMatrix3f | ( | Matrix3f | input, |
int | row = 0 , |
||
int | column = 0 |
||
) |
Sets a 3x3 Matrix inside the Matrix4f.
input | : sub matrix to put inside the Matrix4f. |
row | : index of the row to start the 3x3 block. Must be 0 or 1. |
column | : index of the column to start the 3x3 block. Must be 0 or 1. |
ERROR_CODE setSubVector3f | ( | Vector3< float > | input, |
int | column = 3 |
||
) |
Sets a 3x1 Vector inside the Matrix4f at the specified column index.
input | : sub vector to put inside the Matrix4f. |
column | : index of the column to start the 3x3 block. By default, it is the last column (translation for a Pose). |
ERROR_CODE setSubVector4f | ( | Vector4< float > | input, |
int | column = 3 |
||
) |
Sets a 4x1 Vector inside the Matrix4f at the specified column index.
input | : sub vector to put inside the Matrix4f. |
column | : index of the column to start the 3x3 block. By default, it is the last column (translation for a Pose). |
String getInfos | ( | ) |
String matrix_name |
Name of the matrix (optional).