#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 Matrix4operator= (const Matrix4 &_obj)
 
bool operator== (const Matrix4 &_obj) const
 
bool operator!= (const Matrix4 &_obj) const
 
const Matrix4operator+= (const Matrix4 &_obj)
 
Matrix4 operator+ (const Matrix4 &_obj) const
 
const Matrix4operator-= (const Matrix4 &_obj)
 
Matrix4 operator- (const Matrix4 &_obj) const
 
const Matrix4operator*= (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]_objMatrix 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]_a11st colomn, 1 line value
[in]_b12nd colomn, 1 line value
[in]_c13rd colomn, 1 line value
[in]_d14th colomn, 1 line value
[in]_a21st colomn, 2 line value
[in]_b22nd colomn, 2 line value
[in]_c23rd colomn, 2 line value
[in]_d24th colomn, 2 line value
[in]_a31st colomn, 3 line value
[in]_b32nd colomn, 3 line value
[in]_c33rd colomn, 3 line value
[in]_d34th colomn, 3 line value
[in]_a41st colomn, 4 line value
[in]_b42nd colomn, 4 line value
[in]_c43rd colomn, 4 line value
[in]_d44th colomn, 4 line value

§ Matrix4() [4/4]

etk::Matrix4::Matrix4 ( float *  _values)

Configuration constructor.

Parameters
[in]_valuesvector 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]_rowId of raw.
[in]_colId 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]_objReference on the comparing object
Returns
true The Objects are NOT identical
false The Objects are identical

§ operator*() [1/2]

Matrix4 etk::Matrix4::operator* ( const Matrix4 _obj) const

Operator* Multiplication an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
New vector containing the value

§ operator*() [2/2]

vec3 etk::Matrix4::operator* ( const vec3 _point) const

Operator* apply matrix on a vector.

Parameters
[in]_pointPoint value to apply the matrix
Returns
New vector containing the value

§ operator*=()

const Matrix4& etk::Matrix4::operator*= ( const Matrix4 _obj)

Operator*= Multiplication an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
Local reference of the vector multiplicated

§ operator+()

Matrix4 etk::Matrix4::operator+ ( const Matrix4 _obj) const

Operator+ Addition an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
New vector containing the value

§ operator+=()

const Matrix4& etk::Matrix4::operator+= ( const Matrix4 _obj)

Operator+= Addition an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
Local reference of the vector additionned

§ operator-()

Matrix4 etk::Matrix4::operator- ( const Matrix4 _obj) const

Operator- Decrement an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
New vector containing the value

§ operator-=()

const Matrix4& etk::Matrix4::operator-= ( const Matrix4 _obj)

Operator-= Decrement an other matrix with this one.

Parameters
[in]_objReference on the external object
Returns
Local reference of the vector decremented

§ operator=()

const Matrix4& etk::Matrix4::operator= ( const Matrix4 _obj)

Operator= Asign the current object with an other object.

Parameters
[in]_objReference 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]_objReference 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]_vectvector to apply the angle.
[in]_angleRadangle to apply.

§ scale() [1/2]

void etk::Matrix4::scale ( const vec3 _vect)

Scale the current Matrix.

Parameters
[in]_vectScale vector to apply.

§ scale() [2/2]

void etk::Matrix4::scale ( float  _sx,
float  _sy,
float  _sz 
)

Scale the current Matrix.

Parameters
[in]_sxScale X value to apply.
[in]_syScale Y value to apply.
[in]_szScale Z value to apply.

§ translate()

void etk::Matrix4::translate ( const vec3 _vect)

Makes a translation of the matrix.

Parameters
[in]_vectTranslation 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: