class: etk::Matrix4


Description:



Constructor and Destructor:

+                         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* obj);
+ virtual ~Matrix4 ();

Synopsis:

+ float           m_mat;
+ void identity ();
+ 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 & p);
+ void scale (float sx,
float sy,
float sz);
+ void rotate (const vec3 & vect,
float angleRad);
+ void translate (const vec3 & vect);
+ float coFactor (int32_t row,
int32_t col) const;
+ float determinant () const;
+ Matrix4 invert ();

Detail:

m_mat

+ float m_mat;



identity

+ void identity ();



Matrix4

+  Matrix4 ();
Constructor


Matrix4

+  Matrix4 (const Matrix4 & obj);



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);



Matrix4

+  Matrix4 (float* obj);



~Matrix4

+ virtual  ~Matrix4 ();
Destructor


operator =

+ const Matrix4 & operator = (const Matrix4 & obj);
= assigment


operator ==

+ bool operator == (const Matrix4 & obj) const;
== operator


operator !=

+ bool operator != (const Matrix4 & obj) const;
!= operator


operator +=

+ const Matrix4 & operator += (const Matrix4 & obj);
+= operator


operator +

+ Matrix4 operator + (const Matrix4 & obj) const;
+ operator


operator -=

+ const Matrix4 & operator -= (const Matrix4 & obj);
-= operator


operator -

+ Matrix4 operator - (const Matrix4 & obj) const;
- operator


operator *=

+ const Matrix4 & operator *= (const Matrix4 & obj);
= operator


operator *

+ Matrix4 operator * (const Matrix4 & obj) const;
operator


operator *

+ vec3 operator * (const vec3 & point) const;



transpose

+ void transpose ();
other basic function :


scale

+ void scale (const vec3 & p);



scale

+ void scale (float sx,
float sy,
float sz);



rotate

+ void rotate (const vec3 & vect,
float angleRad);
Makes a rotation matrix about an arbitrary axis.


translate

+ void translate (const vec3 & vect);
Makes a translation of the matrix


coFactor

+ float coFactor (int32_t row,
int32_t col) const;
Computes a cofactor. Used for matrix inversion.


determinant

+ float determinant () const;
Computes the determinant of the matrix.


invert

+ Matrix4 invert ();
Inverts the matrix.
Note: The determinant must be != 0, otherwithe the matrix can't be inverted.