#include <matrix44.h>
Public Member Functions | |
matrix44 () | |
matrix44 (const matrix44 &m1) | |
matrix44 (const vector4 &v0, const vector4 &v1, const vector4 &v2, const vector4 &v3) | |
matrix44 (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) | |
void | set (const vector4 &v0, const vector4 &v1, const vector4 &v2, const vector4 &v3) |
void | set (const matrix44 &m1) |
void | set (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) |
void | operator *= (const matrix44 &m1) |
void | ident () |
void | transpose () |
float | det () |
void | invert (void) |
void | invert_simple (void) |
void | mult_simple (const matrix44 &m1) |
vector3 | transform_coord (const vector3 &v) const |
vector3 & | x_component () const |
vector3 & | y_component () const |
vector3 & | z_component () const |
vector3 & | pos_component () const |
void | rotate_x (const float a) |
void | rotate_y (const float a) |
void | rotate_z (const float a) |
void | rotate (const vector3 &vec, float a) |
void | translate (const vector3 &t) |
void | set_translation (const vector3 &t) |
void | scale (const vector3 &s) |
void | lookatLh (const vector3 &to, const vector3 &up) |
void | lookatRh (const vector3 &to, const vector3 &up) |
void | perspFovLh (float fovY, float aspect, float zn, float zf) |
void | perspFovRh (float fovY, float aspect, float zn, float zf) |
void | perspOffCenterLh (float minX, float maxX, float minY, float maxY, float zn, float zf) |
void | perspOffCenterRh (float minX, float maxX, float minY, float maxY, float zn, float zf) |
void | orthoLh (float w, float h, float zn, float zf) |
void | orthoRh (float w, float h, float zn, float zf) |
void | billboard (const vector3 &to, const vector3 &up) |
void | mult (const vector4 &src, vector4 &dst) const |
void | mult (const vector3 &src, vector3 &dst) const |
vector3 | mult_divw (const vector3 &v) const |
void | weightedmadd (const vector3 &src, vector3 &dst, float weight) const |
Public Attributes | |
float | m [4][4] |
matrix44::matrix44 | ( | ) | [inline] |
Constructor.
matrix44::matrix44 | ( | const matrix44 & | m1 | ) | [inline] |
Constructor.
matrix44::matrix44 | ( | const vector4 & | v0, | |
const vector4 & | v1, | |||
const vector4 & | v2, | |||
const vector4 & | v3 | |||
) | [inline] |
Constructor.
matrix44::matrix44 | ( | float | m11, | |
float | m12, | |||
float | m13, | |||
float | m14, | |||
float | m21, | |||
float | m22, | |||
float | m23, | |||
float | m24, | |||
float | m31, | |||
float | m32, | |||
float | m33, | |||
float | m34, | |||
float | m41, | |||
float | m42, | |||
float | m43, | |||
float | m44 | |||
) | [inline] |
Constructor.
void matrix44::set | ( | const vector4 & | v0, | |
const vector4 & | v1, | |||
const vector4 & | v2, | |||
const vector4 & | v3 | |||
) | [inline] |
Sets new values.
void matrix44::set | ( | const matrix44 & | m1 | ) | [inline] |
Sets new values.
void matrix44::set | ( | float | m11, | |
float | m12, | |||
float | m13, | |||
float | m14, | |||
float | m21, | |||
float | m22, | |||
float | m23, | |||
float | m24, | |||
float | m31, | |||
float | m32, | |||
float | m33, | |||
float | m34, | |||
float | m41, | |||
float | m42, | |||
float | m43, | |||
float | m44 | |||
) | [inline] |
Sets new values.
void matrix44::operator *= | ( | const matrix44 & | m1 | ) | [inline] |
Inplace matrix mulitply.
void matrix44::ident | ( | ) | [inline] |
Sets to identity.
void matrix44::transpose | ( | ) | [inline] |
Transposes.
float matrix44::det | ( | ) | [inline] |
Returns determinant.
void matrix44::invert | ( | void | ) | [inline] |
Full invert.
void matrix44::invert_simple | ( | void | ) | [inline] |
Quick invert (if 3x3 rotation and translation).
Inverts a 4x4 matrix consisting of a 3x3 rotation matrix and a translation (eg. everything that has [0,0,0,1] as the rightmost column) MUCH cheaper then a real 4x4 inversion
void matrix44::mult_simple | ( | const matrix44 & | m1 | ) | [inline] |
Optimized multiplication, assumes that M14==M24==M34==0 AND M44==1.
Transforms a vector by the matrix, projecting the result back into w=1.
vector3 & matrix44::x_component | ( | ) | const [inline] |
Returns X component.
vector3 & matrix44::y_component | ( | ) | const [inline] |
Returns Y component.
vector3 & matrix44::z_component | ( | ) | const [inline] |
Returns Z component.
vector3 & matrix44::pos_component | ( | ) | const [inline] |
Returns translate component.
void matrix44::rotate_x | ( | const float | a | ) | [inline] |
Rotates around global X.
void matrix44::rotate_y | ( | const float | a | ) | [inline] |
Rotates around global Y.
void matrix44::rotate_z | ( | const float | a | ) | [inline] |
Rotates around global Z.
void matrix44::rotate | ( | const vector3 & | vec, | |
float | a | |||
) | [inline] |
Rotates around any axis.
void matrix44::translate | ( | const vector3 & | t | ) | [inline] |
Translates.
void matrix44::set_translation | ( | const vector3 & | t | ) | [inline] |
Sets absolute translation.
void matrix44::scale | ( | const vector3 & | s | ) | [inline] |
Scales.
Lookat in a left-handed coordinate system.
Lookat in a right-handed coordinate system.
void matrix44::perspFovLh | ( | float | fovY, | |
float | aspect, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates left-handed field-of-view perspective projection matrix.
void matrix44::perspFovRh | ( | float | fovY, | |
float | aspect, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates right-handed field-of-view perspective projection matrix.
void matrix44::perspOffCenterLh | ( | float | minX, | |
float | maxX, | |||
float | minY, | |||
float | maxY, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates off-center left-handed perspective projection matrix.
void matrix44::perspOffCenterRh | ( | float | minX, | |
float | maxX, | |||
float | minY, | |||
float | maxY, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates off-center right-handed perspective projection matrix.
void matrix44::orthoLh | ( | float | w, | |
float | h, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates left-handed orthogonal projection matrix.
void matrix44::orthoRh | ( | float | w, | |
float | h, | |||
float | zn, | |||
float | zf | |||
) | [inline] |
Creates right-handed orthogonal projection matrix.
Multiply source vector into target vector, eliminates tmp vector.
Multiply source vector into target vector, eliminates tmp vector.
Fast multiply-add with weighting.
Perform a multiply-add with weighting (this is quite specialized for CPU-skinning)
float matrix44::m[4][4] |