|
QSDK 1.1 Documentation |
#include <Q/maths.h>
Inheritance diagram for Maths::Matrix4f:

Public Member Functions | |
| Matrix4f () | |
| Matrix4f (const Matrix4f &src) | |
| Matrix4f (const Affine4f &src) | |
| unsigned int | getflags () const |
| unsigned int | getflags (unsigned int mask) const |
| void | setflags (unsigned int f) |
| void | addflags (unsigned int f) |
| void | clearflags (unsigned int f) |
| int | isIdentity () const |
| int | isTranslated () const |
| int | isRotated () const |
| int | isScaled () const |
| void | buildFlags (float eps) |
| float | frobeniusNormSquared () const |
| void | set (const Matrix4f &src) |
| Matrix4f & | operator= (const Matrix4f &src) |
| void | set (const Affine4f &src) |
| Matrix4f & | operator= (const Affine4f &src) |
| Vec4f & | operator[] (unsigned int i) |
| const Vec4f & | operator[] (unsigned int i) const |
| const Vec3f & | up () const |
| const Vec3f & | direction () const |
| const Vec3f & | position () const |
| const Vec3f & | side () const |
| void | clearW () |
| void | setIdentity () |
| void | setRotation (const Vec3f &axis, float angle) |
| void | setRotation (const Quat4f &quat) |
| void | setRotation (const Vec3f &dir, const Vec3f &up) |
| void | setRotation (const Matrix3f &rot) |
| void | setQuaternion (const Quat4f &q) |
| void | position (const Vec3f &p) |
| void | scale (float) |
| void | scale (const Vec3f &) |
| void | clearPosition () |
| void | clearRotation () |
| void | product (const Matrix4f &a, const Matrix4f &b) |
| void | add (const Matrix4f &a, const Matrix4f &b) |
| void | subtract (const Matrix4f &a, const Matrix4f &b) |
| void | invert (const Matrix4f &from) |
| void | invertOrthonormal (const Matrix4f &from) |
| void | invertAffine (const Matrix4f &from) |
| void | invertGeneral (const Matrix4f &from) |
| void | inverseProduct (const Matrix4f &aMat, const Matrix4f &bMat) |
| void | transpose (const Matrix4f &from) |
| int | operator== (const Matrix4f &mat) const |
| Matrix4f | operator * (const Matrix4f &b) const |
| Matrix4f | operator+ (const Matrix4f &b) const |
| Matrix4f | operator- (const Matrix4f &b) const |
| Matrix4f & | operator *= (const Matrix4f &b) |
| Matrix4f | inverseProduct (const Matrix4f &m) const |
| Matrix4f | invert () const |
| Matrix4f | transpose () const |
Public Attributes | |
| Vec4x4 | m |
The matrix should always be manipulated using the methods on it. Direct access to the values is available, but if values are modified in this way then care should be taken to update the TransformFlags accordingly, otherwise incorrect results can occur from some of the mathmatical operations.
|
|
Create an uninitialised matrix. If values are to be loaded into the matrix by means of the modifiers, then it is adivsed that setIdentity is first called to initialise the matrix. |
|
|
Copy the matrix from src |
|
|
Copy the matrix from src |
|
||||||||||||
|
Set this matrix to be the sum of a and b (a + b). This matrix can be either of the input matrices, without consequence. |
|
|
Combine (Or) the flags into the current TransformFlags. |
|
|
Recalculate the flags field given an error epsilon for comparison to the identity. |
|
|
Clear the given flags from the TransformFlags. |
|
|
Set the translation part to the origin. |
|
|
Set the rotation part to the identity rotation. |
|
|
Clear W terms to affine values. |
|
|
Return the direction vector of the rotation of the matrix. |
|
|
A helper functions used by buildFlags. |
|
|
Return the value of the TransformFlags, using the given mask, |
|
|
Return the value of the TransformFlags |
|
||||||||||||
|
Set this matrix to be the product of aMat and the inverse of bMat. |
|
|
Set this matrix to be the inverse of from. This matrix should be different from the input matrix. |
|
|
Helper function called from invert based on the value of the TransformFlags. |
|
|
Helper function called from invert based on the value of the TransformFlags. |
|
|
Helper function called from invert based on the value of the TransformFlags. |
|
|
Returns whether the flags indicate that the matrix is an identity. |
|
|
Returns whether the flags indicate that the matrix has a rotation part in it. |
|
|
Returns whether the flags indicate that the matrix has any scale applied to it. |
|
|
Returns whether the flags indicate that the matrix has entries in the translation fields. |
|
|
Set the translation part of the matrix, leaving the rotation part unchanged. |
|
|
Return the translation vector of matrix. |
|
||||||||||||
|
Set this matrix to be the product of a and b (a * b). Although this matrix can be the same as either of the input matrices, it should be noted that doing this will result in a loss of performance, as a temporary matrix will need to be used in the calculation. |
|
|
Apply a non-uniform scale to the matrix. |
|
|
Apply a uniform scale factor to the matrix. |
|
|
Set the TransformFlags to the given value. |
|
|
Set the matrix to the the identity. |
|
|
|
|
|
Set the rotation part of the matrix as defined by the rotation matrix rot. The translation part of the matrix is unaltered. |
|
||||||||||||
|
Set the rotation part of the matrix. The translation part of the matrix is unaltered.
|
|
|
Set the rotation part of the matrix as defined by quat. The translation part of the matrix is unaltered. |
|
||||||||||||
|
Set the rotation part of the matrix. The translation part of the matrix is unaltered.
|
|
|
Return the side vector of the rotation of the matrix. |
|
||||||||||||
|
Set this matrix to be difference of the 2 matrices (a - b). This matrix can be either of the input matrices, without consequence. |
|
|
Set this matrix to he the transpose of from. |
|
|
Return the up vector of the rotation of the matrix. |
|
|
|
Qube Software Limited © 2000-2004
|
|