This class implements a 4x4 matrix object.
#include <IGameType.h>
Public Member Functions |
|
GRow * | GetAddr () |
Return the Address of the GMatrix. This
allows direct access via the [] operator. |
|
const GRow * | GetAddr () const |
Return the Address of the GMatrix. This
allows direct access via the [] operator. |
|
IGAMEEXPORT | GMatrix () |
Default constructor, set Identity matrix.
|
|
IGAMEEXPORT | GMatrix (Matrix3) |
Constructor from a Matrix3. |
|
void | ResetMatrix () |
Set all values to 0.0f. |
|
IGAMEEXPORT BOOL | IsIdentity (float epsilon=1E-5f) |
Determine whether or not the matrix is an
Identity matrix. |
|
IGAMEEXPORT void | SetIdentity () |
Set the Standard Identity Matrix. |
|
IGAMEEXPORT float | Determinant () const |
Return Determinant of matrix. |
|
IGAMEEXPORT GMatrix | Inverse () |
Return Inverse of matrix. |
|
IGAMEEXPORT Point3 | Translation () const |
Return a translation transformation.
|
|
IGAMEEXPORT Quat | Rotation () const |
Return a essential rotation transformation.
|
|
IGAMEEXPORT Point3 | Scaling () const |
Return a scaling transformation. |
|
Quat | ScaleRotation () const |
Return a stretch transformation. |
|
IGAMEEXPORT int | Parity () const |
Return 'parity' sign of the matrix, -1 if
negative, 1 otherwise. |
|
IGAMEEXPORT Point4 | GetColumn (int i) const |
Access to the matrix column. |
|
IGAMEEXPORT void | SetColumn (int i, Point4 col) |
Set the the matrix column. |
|
Point4 | GetRow (int i) const |
Access to the matrix row. |
|
IGAMEEXPORT void | SetRow (int i, Point4 row) |
Set to the matrix row to the desired data.
|
|
IGAMEEXPORT Matrix3 | ExtractMatrix3 () const |
Extract a Matrix3 from the GMatrix. |
|
Subscript Operator
|
|
Point4 & | operator[] (int i) |
Return a reference to the 'i-th' Point4 of the matrix. |
|
const Point4 & | operator[] (int i) const |
Binary operators
|
|
IGAMEEXPORT GMatrix | operator- (const GMatrix &) const |
IGAMEEXPORT GMatrix | operator* (const GMatrix &) const |
IGAMEEXPORT GMatrix | operator+ (const GMatrix &) const |
Assignment operators
|
|
IGAMEEXPORT GMatrix & | operator-= (const GMatrix &M) |
IGAMEEXPORT GMatrix & | operator+= (const GMatrix &M) |
IGAMEEXPORT GMatrix & | operator*= (const GMatrix &M) |
IGAMEEXPORT GMatrix & | operator*= (const float a) |
IGAMEEXPORT GMatrix & | operator= (const Matrix3 &) |
Assignment operator from a Matrix3. |
|
Comparison operators
|
|
IGAMEEXPORT BOOL | operator== (const GMatrix &M) const |
IGAMEEXPORT BOOL | Equals (const GMatrix &M, float epsilon=1E-5f) const |
Test for equality within the specified
tolerance. |
|
Friends |
|
IGAMEEXPORT Point3 | operator* (const Point3 &V, const GMatrix &A) |
Multiply a GMatrix with a
Point3. |
IGAMEEXPORT GMatrix | ( | ) |
Default constructor, set Identity matrix.
Point4& operator[] | ( | int | i | ) | [inline] |
GRow* GetAddr | ( | ) | [inline] |
const GRow* GetAddr | ( | ) | const [inline] |
void ResetMatrix | ( | ) |
Set all values to 0.0f.
IGAMEEXPORT BOOL IsIdentity | ( | float | epsilon = 1E-5f |
) |
Determine whether or not the matrix is an Identity matrix.
within the specified tolerance
epsilon | Tolerance defaulted to epsilon = 1E-5f |
IGAMEEXPORT void SetIdentity | ( | ) |
Set the Standard Identity Matrix.
IGAMEEXPORT float Determinant | ( | ) | const |
Return Determinant of matrix.
IGAMEEXPORT GMatrix Inverse | ( | ) |
Return Inverse of matrix.
IGAMEEXPORT Point3 Translation | ( | ) | const |
Return a translation transformation.
IGAMEEXPORT Quat Rotation | ( | ) | const |
Return a essential rotation transformation.
IGAMEEXPORT Point3 Scaling | ( | ) | const |
Return a scaling transformation.
Quat ScaleRotation | ( | ) | const |
Return a stretch transformation.
This is the axis system of the scaling application
IGAMEEXPORT int Parity | ( | ) | const |
Return 'parity' sign of the matrix, -1 if negative, 1 otherwise.
IGAMEEXPORT Point4 GetColumn | ( | int | i | ) | const |
Access to the matrix column.
i | The number of the column to retrieve |
IGAMEEXPORT void SetColumn | ( | int | i, |
Point4 | col | ||
) |
Set the the matrix column.
Point4 GetRow | ( | int | i | ) | const [inline] |
IGAMEEXPORT void SetRow | ( | int | i, |
Point4 | row | ||
) |
Set to the matrix row to the desired data.
IGAMEEXPORT GMatrix& operator*= | ( | const float | a | ) |
IGAMEEXPORT BOOL operator== | ( | const GMatrix & | M | ) | const |
IGAMEEXPORT BOOL Equals | ( | const GMatrix & | M, |
float | epsilon =
1E-5f |
||
) | const |
Test for equality within the specified tolerance.
IGAMEEXPORT Matrix3 ExtractMatrix3 | ( | ) | const |