#include <vhdMatrix4.h>
Public Member Functions | |
vhdMatrix4 () | |
vhdMatrix4 (const vhtReal *pm) | |
vhdMatrix4 (vhtReal m00, vhtReal m01, vhtReal m02, vhtReal m03, vhtReal m10, vhtReal m11, vhtReal m12, vhtReal m13, vhtReal m20, vhtReal m21, vhtReal m22, vhtReal m23, vhtReal m30, vhtReal m31, vhtReal m32, vhtReal m33) | |
vhdMatrix4 (const vhdMatrix3 &m) | |
vhtReal | get (unsigned int row, unsigned int column) const |
void | set (unsigned int row, unsigned int column, vhtReal value) |
vhtReal * | operator[] (int iRow) const |
const vhtReal *const | operator[] (unsigned iRow) const |
operator vhtReal * () | |
vhdMatrix4 | operator * (const vhdMatrix4 &m2) const |
vhdMatrix4 | operator+ (const vhdMatrix4 &m2) const |
vhdMatrix4 | operator- (const vhdMatrix4 &m2) const |
bool | operator== (const vhdMatrix4 &m2) const |
bool | operator!= (const vhdMatrix4 &m2) const |
void | operator= (const vhdMatrix3 &mat3) |
vhdMatrix4 | operator *= (const vhdMatrix4 &m2) |
vhdMatrix4 | operator+= (const vhdMatrix4 &m2) |
vhdMatrix4 | operator-= (const vhdMatrix4 &m2) |
vhdMatrix4 | transpose (void) |
vhdMatrix4 & | setIdentity () |
vhdMatrix4 & | setZero () |
bool | isTrueIdentity () const |
bool | isTrueZero () const |
bool | isIdentity () const |
bool | isZero () const |
void | setTrans (const vhdVector3 &v) |
void | makeTrans (const vhdVector3 &v) |
void | makeTrans (vhtReal tx, vhtReal ty, vhtReal tz) |
void | setScale (const vhdVector3 &v) |
void | extract3x3Matrix (vhdMatrix3 &m3x3) |
const vhtReal * | getMatrix4 () const |
vhdMatrix4 & | setView (const vhdVector3 &eye, const vhdVector3 &lookAt, const vhdVector3 &up) |
vhdMatrix4 & | setPerspectiveProj (vhtReal left, vhtReal right, vhtReal bottom, vhtReal top, vhtReal znear, vhtReal zfar) |
vhdMatrix4 & | setPerspectiveProj (vhtReal width, vhtReal height, vhtReal znear, vhtReal zfar) |
vhdMatrix4 & | setPerspectiveProjFov (vhtReal verticalFov, vhtReal aspectRatio, vhtReal znear, vhtReal zfar) |
vhdMatrix4 & | setOrthoProj (vhtReal left, vhtReal top, vhtReal right, vhtReal bottom, vhtReal znear, vhtReal zfar) |
vhdMatrix4 & | setOrthoProj (vhtReal width, vhtReal height, vhtReal znear, vhtReal zfar) |
vhdVector4 | operator * (const vhdVector4 &v) const |
bool | logOf (const vhdMatrix4 &matrix) |
bool | expOf (const vhdMatrix4 &matrix) |
void | scale (const float s) |
float | normInfinity (void) const |
void | mult (const vhdMatrix4 &m2) |
void | multLeft (const vhdMatrix4 &m1) |
void | addScaled (const vhdMatrix4 &matrix, float s) |
bool | invertFrom (const vhdMatrix4 &matrix) |
bool | inverse (vhdMatrix4 &result) const |
void | negate (void) |
float | det (void) const |
vhdVector3 | operator * (const vhdVector3 &v) const |
Static Public Member Functions | |
static vhdMatrix4 | getTrans (const vhdVector3 &v) |
static vhdMatrix4 | getTrans (vhtReal t_x, vhtReal t_y, vhtReal t_z) |
static vhdMatrix4 | getScale (const vhdVector3 &v) |
static vhdMatrix4 | getScale (vhtReal s_x, vhtReal s_y, vhtReal s_z) |
static vhdMatrix4 | rotation (const vhdVector3 &axis, vhtReal angle) |
Public Attributes | |
union { | |
vhtReal m [4][4] | |
vhtReal _m [16] | |
}; | |
Static Public Attributes | |
static const vhdMatrix4 | ZERO |
static const vhdMatrix4 | IDENTITY |
Private Member Functions | |
bool | sqrt (void) |
Friends | |
std::ostream & | operator<< (std::ostream &o, const vhdMatrix4 &m) |
vhdMatrix4::vhdMatrix4 | ( | ) | [inline] |
vhdMatrix4::vhdMatrix4 | ( | const vhtReal * | pm | ) | [inline] |
Constructor for a 16-element array of vhtReals.
vhdMatrix4::vhdMatrix4 | ( | vhtReal | m00, | |
vhtReal | m01, | |||
vhtReal | m02, | |||
vhtReal | m03, | |||
vhtReal | m10, | |||
vhtReal | m11, | |||
vhtReal | m12, | |||
vhtReal | m13, | |||
vhtReal | m20, | |||
vhtReal | m21, | |||
vhtReal | m22, | |||
vhtReal | m23, | |||
vhtReal | m30, | |||
vhtReal | m31, | |||
vhtReal | m32, | |||
vhtReal | m33 | |||
) | [inline] |
vhdMatrix4::vhdMatrix4 | ( | const vhdMatrix3 & | m | ) | [inline] |
Constructor for a 3x3 matrix. The last row and column of the 4x4 matrix are set to 0, except for the component in row 3, column 3 which will be set to 1.
vhtReal vhdMatrix4::get | ( | unsigned int | row, | |
unsigned int | column | |||
) | const [inline] |
Returns a value of this matrix specified by the given row and column index.
void vhdMatrix4::set | ( | unsigned int | row, | |
unsigned int | column, | |||
vhtReal | value | |||
) | [inline] |
Sets a value of this matrix specified by the given row and column index.
vhtReal * vhdMatrix4::operator[] | ( | int | iRow | ) | const [inline] |
Cast operator for const vhtReal*.
const vhtReal *const vhdMatrix4::operator[] | ( | unsigned | iRow | ) | const [inline] |
vhdMatrix4::operator vhtReal * | ( | ) | [inline] |
Cast operator for vhtReal*.
vhdMatrix4 vhdMatrix4::operator * | ( | const vhdMatrix4 & | m2 | ) | const [inline] |
vhdMatrix4 vhdMatrix4::operator+ | ( | const vhdMatrix4 & | m2 | ) | const [inline] |
Matrix addition.
vhdMatrix4 vhdMatrix4::operator- | ( | const vhdMatrix4 & | m2 | ) | const [inline] |
Matrix subtraction.
bool vhdMatrix4::operator== | ( | const vhdMatrix4 & | m2 | ) | const [inline] |
Tests 2 matrices for equality.
bool vhdMatrix4::operator!= | ( | const vhdMatrix4 & | m2 | ) | const [inline] |
Tests 2 matrices for inequality.
void vhdMatrix4::operator= | ( | const vhdMatrix3 & | mat3 | ) | [inline] |
Assignment from 3x3 matrix.
vhdMatrix4 vhdMatrix4::operator *= | ( | const vhdMatrix4 & | m2 | ) | [inline] |
vhdMatrix4 vhdMatrix4::operator+= | ( | const vhdMatrix4 & | m2 | ) | [inline] |
vhdMatrix4 vhdMatrix4::operator-= | ( | const vhdMatrix4 & | m2 | ) | [inline] |
vhdMatrix4 vhdMatrix4::transpose | ( | void | ) | [inline] |
vhdMatrix4 & vhdMatrix4::setIdentity | ( | ) | [inline] |
Sets this matrix to the identity matrix.
vhdMatrix4 & vhdMatrix4::setZero | ( | ) | [inline] |
Sets all components of this matrix to zero.
bool vhdMatrix4::isTrueIdentity | ( | ) | const [inline] |
Returns true if this matrix is truely the identity. That is, all components MUST be exactly either 0.0 or 1.0. Floating-point imprecision is not taken into consideration.
bool vhdMatrix4::isTrueZero | ( | ) | const [inline] |
Returns true if all components of this matrix are truely zero. That is, all components MUST be exactly 0.0. Floating-point imprecision is not taken into consideration.
bool vhdMatrix4::isIdentity | ( | ) | const [inline] |
Returns true if this matrix is the identity or within the epsilon environment of the identity.
bool vhdMatrix4::isZero | ( | ) | const [inline] |
Returns true if this matrix is all zero (all elements < epsilon).
void vhdMatrix4::setTrans | ( | const vhdVector3 & | v | ) | [inline] |
Sets the translation transformation part of the matrix.
void vhdMatrix4::makeTrans | ( | const vhdVector3 & | v | ) | [inline] |
Builds a translation matrix
vhdMatrix4 vhdMatrix4::getTrans | ( | const vhdVector3 & | v | ) | [inline, static] |
Gets a translation matrix.
vhdMatrix4 vhdMatrix4::getTrans | ( | vhtReal | t_x, | |
vhtReal | t_y, | |||
vhtReal | t_z | |||
) | [inline, static] |
Gets a translation matrix - variation for not using a vhdVector.
void vhdMatrix4::setScale | ( | const vhdVector3 & | v | ) | [inline] |
Sets the scale part of the matrix.
vhdMatrix4 vhdMatrix4::getScale | ( | const vhdVector3 & | v | ) | [inline, static] |
Gets a scale matrix.
vhdMatrix4 vhdMatrix4::getScale | ( | vhtReal | s_x, | |
vhtReal | s_y, | |||
vhtReal | s_z | |||
) | [inline, static] |
Gets a scale matrix - variation for not using a vhdVector.
void vhdMatrix4::extract3x3Matrix | ( | vhdMatrix3 & | m3x3 | ) | [inline] |
Extracts the rotation / scaling part of the Matrix as a 3x3 matrix.
m3x3 | Destination vhdMatrix3 |
const vhtReal * vhdMatrix4::getMatrix4 | ( | ) | const [inline] |
static vhdMatrix4 vhdMatrix4::rotation | ( | const vhdVector3 & | axis, | |
vhtReal | angle | |||
) | [static] |
vhdMatrix4& vhdMatrix4::setView | ( | const vhdVector3 & | eye, | |
const vhdVector3 & | lookAt, | |||
const vhdVector3 & | up | |||
) |
vhdMatrix4& vhdMatrix4::setPerspectiveProj | ( | vhtReal | left, | |
vhtReal | right, | |||
vhtReal | bottom, | |||
vhtReal | top, | |||
vhtReal | znear, | |||
vhtReal | zfar | |||
) |
vhdMatrix4& vhdMatrix4::setPerspectiveProj | ( | vhtReal | width, | |
vhtReal | height, | |||
vhtReal | znear, | |||
vhtReal | zfar | |||
) |
vhdMatrix4& vhdMatrix4::setPerspectiveProjFov | ( | vhtReal | verticalFov, | |
vhtReal | aspectRatio, | |||
vhtReal | znear, | |||
vhtReal | zfar | |||
) |
vhdMatrix4& vhdMatrix4::setOrthoProj | ( | vhtReal | left, | |
vhtReal | top, | |||
vhtReal | right, | |||
vhtReal | bottom, | |||
vhtReal | znear, | |||
vhtReal | zfar | |||
) |
vhdMatrix4& vhdMatrix4::setOrthoProj | ( | vhtReal | width, | |
vhtReal | height, | |||
vhtReal | znear, | |||
vhtReal | zfar | |||
) |
vhdVector4 vhdMatrix4::operator * | ( | const vhdVector4 & | v | ) | const [inline] |
bool vhdMatrix4::logOf | ( | const vhdMatrix4 & | matrix | ) |
bool vhdMatrix4::expOf | ( | const vhdMatrix4 & | matrix | ) |
void vhdMatrix4::scale | ( | const float | s | ) |
float vhdMatrix4::normInfinity | ( | void | ) | const |
void vhdMatrix4::mult | ( | const vhdMatrix4 & | m2 | ) |
void vhdMatrix4::multLeft | ( | const vhdMatrix4 & | m1 | ) |
void vhdMatrix4::addScaled | ( | const vhdMatrix4 & | matrix, | |
float | s | |||
) |
bool vhdMatrix4::invertFrom | ( | const vhdMatrix4 & | matrix | ) |
bool vhdMatrix4::inverse | ( | vhdMatrix4 & | result | ) | const |
void vhdMatrix4::negate | ( | void | ) | [inline] |
float vhdMatrix4::det | ( | void | ) | const |
vhdVector3 vhdMatrix4::operator * | ( | const vhdVector3 & | v | ) | const |
bool vhdMatrix4::sqrt | ( | void | ) | [private] |
std::ostream& operator<< | ( | std::ostream & | o, | |
const vhdMatrix4 & | m | |||
) | [friend] |
vhtReal vhdMatrix4::m[4][4] |
union { ... } |
const vhdMatrix4 vhdMatrix4::ZERO [static] |
const vhdMatrix4 vhdMatrix4::IDENTITY [static] |