Class representing a generic 4*4 matrix. More...
Functions | |
Matrix4f () | |
Default constructor. More... | |
Matrix4f (float data[]) | |
Copy constructor (deep copy). More... | |
Matrix4f (const Matrix4f &mat) | |
Copy constructor (deep copy). More... | |
Matrix4f | operator* (const Matrix4f &mat) const |
Gives the result of the multiplication between two sl::Matrix4f. More... | |
Matrix4f | operator* (const Vector4< float > &vect) const |
Gives the result of the multiplication between a sl::Matrix4f and a sl::float4. More... | |
Matrix4f | operator* (const float &scalar) const |
Gives the result of the multiplication between a sl::Matrix4f and a scalar. More... | |
Matrix4f | operator+ (const Matrix4f &mat) const |
Gives the result of the addition between two sl::Matrix4f. More... | |
Matrix4f | operator+ (const float &scalar) const |
Gives the result of the addition between a sl::Matrix4f and a scalar. More... | |
Matrix4f | operator- (const Matrix4f &mat) const |
Gives the result of the subtraction between two sl::Matrix4f. More... | |
Matrix4f | operator- (const float &scalar) const |
Gives the result of the subtraction between a sl::Matrix4f and a scalar. More... | |
bool | operator== (const Matrix4f &mat) const |
Tests two sl::Matrix4f equality. More... | |
bool | operator!= (const Matrix4f &mat) const |
Tests two sl::Matrix4f inequality. More... | |
float & | operator() (int u, int v) |
Gets access to a specific point in the sl::Matrix4f (read/write). More... | |
ERROR_CODE | inverse () |
Sets the sl::Matrix4f to its inverse. More... | |
void | transpose () |
Sets the sl::Matrix4f to its transpose. More... | |
void | setIdentity () |
Sets the sl::Matrix4f to identity. More... | |
void | setZeros () |
Sets the sl::Matrix4f to zero. More... | |
ERROR_CODE | setSubMatrix3f (Matrix3f input, int row=0, int column=0) |
Sets a sl::Matrix3f inside the sl::Matrix4f. More... | |
ERROR_CODE | setSubVector3f (Vector3< float > input, int column=3) |
Sets a sl::Vector3 inside the sl::Matrix4f at the specified column index. More... | |
ERROR_CODE | setSubVector4f (Vector4< float > input, int column=3) |
Sets a sl::Vector4 inside the sl::Matrix4f at the specified column index. More... | |
String | getInfos () |
Returns the components of the sl::Matrix4f in a sl::String. More... | |
Static Functions | |
static Matrix4f | inverse (const Matrix4f &mat) |
Creates the inverse of a sl::Matrix4f. More... | |
static Matrix4f | transpose (const Matrix4f &mat) |
Creates the transpose of a sl::Matrix4f. More... | |
static Matrix4f | identity () |
Creates an identity sl::Matrix4f. More... | |
static Matrix4f | zeros () |
Creates a sl::Matrix4f filled with zeros. More... | |
Attributes | |
String | matrix_name |
Name of the matrix (optional). More... | |
Class representing 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.
The data value of the matrix can be accessed with the 'm' ptr or by element attribute.
r00 | r01 | r02 | tx |
r10 | r11 | r12 | ty |
r20 | r21 | r22 | tz |
m30 | m31 | m32 | m33 |
Matrix4f | ( | ) |
Default constructor.
Matrix4f | ( | float | data[] | ) |
Copy constructor (deep copy).
Copy constructor (deep copy).
mat | : sl::Matrix3f to copy. |
Gives the result of the multiplication between two sl::Matrix4f.
Gives the result of the multiplication between a sl::Matrix4f and a sl::float4.
Matrix4f operator* | ( | const float & | scalar | ) | const |
Gives the result of the multiplication between a sl::Matrix4f and a scalar.
Gives the result of the addition between two sl::Matrix4f.
Matrix4f operator+ | ( | const float & | scalar | ) | const |
Gives the result of the addition between a sl::Matrix4f and a scalar.
Gives the result of the subtraction between two sl::Matrix4f.
Matrix4f operator- | ( | const float & | scalar | ) | const |
Gives the result of the subtraction between a sl::Matrix4f and a scalar.
bool operator== | ( | const Matrix4f & | mat | ) | const |
Tests two sl::Matrix4f equality.
bool operator!= | ( | const Matrix4f & | mat | ) | const |
Tests two sl::Matrix4f inequality.
float& operator() | ( | int | u, |
int | v | ||
) |
Gets access to a specific point in the sl::Matrix4f (read/write).
u | : Row to get the value from. |
v | : Column to get the value from. |
ERROR_CODE inverse | ( | ) |
Sets the sl::Matrix4f to its inverse.
Creates the inverse of a sl::Matrix4f.
mat | : sl::Matrix4f to compute the inverse from. |
void transpose | ( | ) |
Sets the sl::Matrix4f to its transpose.
Creates the transpose of a sl::Matrix4f.
mat | : sl::Matrix4f to compute the transpose from. |
void setIdentity | ( | ) |
Sets the sl::Matrix4f to identity.
|
static |
Creates an identity sl::Matrix4f.
void setZeros | ( | ) |
Sets the sl::Matrix4f to zero.
|
static |
Creates a sl::Matrix4f filled with zeros.
ERROR_CODE setSubMatrix3f | ( | Matrix3f | input, |
int | row = 0 , |
||
int | column = 0 |
||
) |
Sets a sl::Matrix3f inside the sl::Matrix4f.
input | : Sub-matrix to put inside the sl::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 sl::Vector3 inside the sl::Matrix4f at the specified column index.
input | : Sub-vector to put inside the sl::Matrix4f. |
column | : Index of the column to start the 3x3 block. By default, it is the last column (translation for a sl::Pose). |
ERROR_CODE setSubVector4f | ( | Vector4< float > | input, |
int | column = 3 |
||
) |
Sets a sl::Vector4 inside the sl::Matrix4f at the specified column index.
input | : Sub-vector to put inside the sl::Matrix4f. |
column | : Index of the column to start the 3x3 block. By default, it is the last column (translation for a sl::Pose). |
String getInfos | ( | ) |
Returns the components of the sl::Matrix4f in a sl::String.
String matrix_name |
Name of the matrix (optional).