Class representing a generic 3*3 matrix. More...
Functions | |
Matrix3f () | |
Default constructor. More... | |
Matrix3f (float data[]) | |
Copy constructor (deep copy). More... | |
Matrix3f (const Matrix3f &mat) | |
Cpy constructor (deep copy). More... | |
Matrix3f | operator* (const Matrix3f &mat) const |
Gives the result of the multiplication between two sl::Matrix3f. More... | |
Matrix3f | operator* (const float &scalar) const |
Gives the result of the multiplication between a sl::Matrix3f and a scalar. More... | |
Matrix3f | operator+ (const Matrix3f &mat) const |
Gives the result of the addition between two sl::Matrix3f. More... | |
Matrix3f | operator+ (const float &scalar) const |
Gives the result of the addition between a sl::Matrix3f and a scalar. More... | |
Matrix3f | operator- (const Matrix3f &mat) const |
Gives the result of the subtraction between two sl::Matrix3f. More... | |
Matrix3f | operator- (const float &scalar) const |
Gives the result of the subtraction between a sl::Matrix3f and a scalar. More... | |
bool | operator== (const Matrix3f &mat) const |
Test two sl::Matrix3f equality. More... | |
bool | operator!= (const Matrix3f &mat) const |
Test two sl::Matrix3f inequality. More... | |
float & | operator() (int u, int v) |
Gets access to a specific point in the sl::Matrix3f (read/write). More... | |
void | inverse () |
Sets the sl::Matrix3f to its inverse. More... | |
void | transpose () |
Sets the sl::Matrix3f to its transpose. More... | |
void | setIdentity () |
Sets the sl::Matrix3f to identity. More... | |
void | setZeros () |
Sets the sl::Matrix3f to zero. More... | |
String | getInfos () |
Returns the components of the sl::Matrix3f in a sl::String. More... | |
Static Functions | |
static Matrix3f | inverse (const Matrix3f &rotation) |
Returns the inverse of a sl::Matrix3f. More... | |
static Matrix3f | transpose (const Matrix3f &rotation) |
Returns the transpose of a sl::Matrix3f. More... | |
static Matrix3f | identity () |
Creates an identity sl::Matrix3f. More... | |
static Matrix3f | zeros () |
Creates a sl::Matrix3f filled with zeros. More... | |
Attributes | |
String | matrix_name |
Name of the matrix (optional). More... | |
Class representing a generic 3*3 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 'r' ptr or by element attribute.
r00 | r01 | r02 |
r10 | r11 | r12 |
r20 | r21 | r22 |
Matrix3f | ( | ) |
Default constructor.
Matrix3f | ( | float | data[] | ) |
Copy constructor (deep copy).
Cpy constructor (deep copy).
mat | : sl::Matrix3f to copy. |
Gives the result of the multiplication between two sl::Matrix3f.
Matrix3f operator* | ( | const float & | scalar | ) | const |
Gives the result of the multiplication between a sl::Matrix3f and a scalar.
Gives the result of the addition between two sl::Matrix3f.
Matrix3f operator+ | ( | const float & | scalar | ) | const |
Gives the result of the addition between a sl::Matrix3f and a scalar.
Gives the result of the subtraction between two sl::Matrix3f.
Matrix3f operator- | ( | const float & | scalar | ) | const |
Gives the result of the subtraction between a sl::Matrix3f and a scalar.
bool operator== | ( | const Matrix3f & | mat | ) | const |
Test two sl::Matrix3f equality.
bool operator!= | ( | const Matrix3f & | mat | ) | const |
Test two sl::Matrix3f inequality.
float& operator() | ( | int | u, |
int | v | ||
) |
Gets access to a specific point in the sl::Matrix3f (read/write).
u | : Row to get the value from. |
v | : Column to get the value from. |
void inverse | ( | ) |
Sets the sl::Matrix3f to its inverse.
Returns the inverse of a sl::Matrix3f.
rotation | : sl::Matrix3f to compute the inverse from. |
void transpose | ( | ) |
Sets the sl::Matrix3f to its transpose.
Returns the transpose of a sl::Matrix3f.
rotation | : sl::Matrix3f to compute the transpose from. |
void setIdentity | ( | ) |
Sets the sl::Matrix3f to identity.
|
static |
Creates an identity sl::Matrix3f.
void setZeros | ( | ) |
Sets the sl::Matrix3f to zero.
|
static |
Creates a sl::Matrix3f filled with zeros.
String getInfos | ( | ) |
Returns the components of the sl::Matrix3f in a sl::String.
String matrix_name |
Name of the matrix (optional).