#include <Matrix4.hpp>
Public Member Functions | |
void | identity () |
Matrix4 () | |
Matrix4 (const Matrix4 &_obj) | |
Matrix4 (float _a1, float _b1, float _c1, float _d1, float _a2, float _b2, float _c2, float _d2, float _a3, float _b3, float _c3, float _d3, float _a4, float _b4, float _c4, float _d4) | |
Matrix4 (float *_values) | |
const Matrix4 & | operator= (const Matrix4 &_obj) |
bool | operator== (const Matrix4 &_obj) const |
bool | operator!= (const Matrix4 &_obj) const |
const Matrix4 & | operator+= (const Matrix4 &_obj) |
Matrix4 | operator+ (const Matrix4 &_obj) const |
const Matrix4 & | operator-= (const Matrix4 &_obj) |
Matrix4 | operator- (const Matrix4 &_obj) const |
const Matrix4 & | operator*= (const Matrix4 &_obj) |
Matrix4 | operator* (const Matrix4 &_obj) const |
vec3 | operator* (const vec3 &_point) const |
void | transpose () |
void | scale (const vec3 &_vect) |
void | scale (float _sx, float _sy, float _sz) |
void | rotate (const vec3 &_vect, float _angleRad=0.0) |
void | translate (const vec3 &_vect) |
float | coFactor (int32_t _row, int32_t _col) const |
float | determinant () const |
Matrix4 | invert () |
Public Attributes | |
float | m_mat [4 *4] |
Detailed Description
Transformation matrix for vector 3D.
Constructor & Destructor Documentation
§ Matrix4() [1/4]
etk::Matrix4::Matrix4 | ( | ) |
Constructor that load identity.
§ Matrix4() [2/4]
etk::Matrix4::Matrix4 | ( | const Matrix4 & | _obj | ) |
Copy constructor.
- Parameters
-
[in] _obj Matrix object to copy
§ Matrix4() [3/4]
etk::Matrix4::Matrix4 | ( | float | _a1, |
float | _b1, | ||
float | _c1, | ||
float | _d1, | ||
float | _a2, | ||
float | _b2, | ||
float | _c2, | ||
float | _d2, | ||
float | _a3, | ||
float | _b3, | ||
float | _c3, | ||
float | _d3, | ||
float | _a4, | ||
float | _b4, | ||
float | _c4, | ||
float | _d4 | ||
) |
Configuration constructor.
- Parameters
-
[in] _a1 1st colomn, 1 line value [in] _b1 2nd colomn, 1 line value [in] _c1 3rd colomn, 1 line value [in] _d1 4th colomn, 1 line value [in] _a2 1st colomn, 2 line value [in] _b2 2nd colomn, 2 line value [in] _c2 3rd colomn, 2 line value [in] _d2 4th colomn, 2 line value [in] _a3 1st colomn, 3 line value [in] _b3 2nd colomn, 3 line value [in] _c3 3rd colomn, 3 line value [in] _d3 4th colomn, 3 line value [in] _a4 1st colomn, 4 line value [in] _b4 2nd colomn, 4 line value [in] _c4 3rd colomn, 4 line value [in] _d4 4th colomn, 4 line value
§ Matrix4() [4/4]
etk::Matrix4::Matrix4 | ( | float * | _values | ) |
Configuration constructor.
- Parameters
-
[in] _values vector of values
Member Function Documentation
§ coFactor()
float etk::Matrix4::coFactor | ( | int32_t | _row, |
int32_t | _col | ||
) | const |
Computes a cofactor. Used for matrix inversion.
- Parameters
-
[in] _row Id of raw. [in] _col Id of colomn.
- Returns
- the coFactorValue.
§ determinant()
float etk::Matrix4::determinant | ( | ) | const |
Computes the determinant of the matrix.
- Returns
- The determinent Value.
§ identity()
void etk::Matrix4::identity | ( | ) |
configure identity of the matrix
§ invert()
Matrix4 etk::Matrix4::invert | ( | ) |
Inverts the matrix.
- Note
- The determinant must be != 0, otherwithe the matrix can't be inverted.
- Returns
- The inverted matrix.
§ operator!=()
bool etk::Matrix4::operator!= | ( | const Matrix4 & | _obj | ) | const |
In-Equality compare operator with an other object.
- Parameters
-
[in] _obj Reference on the comparing object
- Returns
- true The Objects are NOT identical
- false The Objects are identical
§ operator*() [1/2]
Operator* Multiplication an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- New vector containing the value
§ operator*() [2/2]
Operator* apply matrix on a vector.
- Parameters
-
[in] _point Point value to apply the matrix
- Returns
- New vector containing the value
§ operator*=()
Operator*= Multiplication an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- Local reference of the vector multiplicated
§ operator+()
Operator+ Addition an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- New vector containing the value
§ operator+=()
Operator+= Addition an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- Local reference of the vector additionned
§ operator-()
Operator- Decrement an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- New vector containing the value
§ operator-=()
Operator-= Decrement an other matrix with this one.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- Local reference of the vector decremented
§ operator=()
Operator= Asign the current object with an other object.
- Parameters
-
[in] _obj Reference on the external object
- Returns
- Local reference of the vector asigned
§ operator==()
bool etk::Matrix4::operator== | ( | const Matrix4 & | _obj | ) | const |
Equality compare operator with an other object.
- Parameters
-
[in] _obj Reference on the comparing object
- Returns
- true The Objects are identical
- false The Objects are NOT identical
§ rotate()
void etk::Matrix4::rotate | ( | const vec3 & | _vect, |
float | _angleRad = 0.0 |
||
) |
Makes a rotation matrix about an arbitrary axis.
- Parameters
-
[in] _vect vector to apply the angle. [in] _angleRad angle to apply.
§ scale() [1/2]
void etk::Matrix4::scale | ( | const vec3 & | _vect | ) |
Scale the current Matrix.
- Parameters
-
[in] _vect Scale vector to apply.
§ scale() [2/2]
void etk::Matrix4::scale | ( | float | _sx, |
float | _sy, | ||
float | _sz | ||
) |
Scale the current Matrix.
- Parameters
-
[in] _sx Scale X value to apply. [in] _sy Scale Y value to apply. [in] _sz Scale Z value to apply.
§ translate()
void etk::Matrix4::translate | ( | const vec3 & | _vect | ) |
Makes a translation of the matrix.
- Parameters
-
[in] _vect Translation to apply.
§ transpose()
void etk::Matrix4::transpose | ( | ) |
Transpose the current matix (usefull for OpenGL display)
Member Data Documentation
§ m_mat
float etk::Matrix4::m_mat[4 *4] |
matrix data
The documentation for this class was generated from the following file:
- framework/atria-soft/etk/etk/math/Matrix4.hpp