Assimp
v2.0 (November 2010)
|
Represents a row-major 4x4 matrix, use this for homogeneous coordinates. More...
Public Member Functions | |
aiMatrix4x4 () | |
aiMatrix4x4 (float _a1, float _a2, float _a3, float _a4, float _b1, float _b2, float _b3, float _b4, float _c1, float _c2, float _c3, float _c4, float _d1, float _d2, float _d3, float _d4) | |
aiMatrix4x4 (const aiMatrix3x3 &m) | |
Constructor from 3x3 matrix. | |
void | Decompose (aiVector3D &scaling, aiQuaternion &rotation, aiVector3D &position) const |
Decompose a trafo matrix into its original components. | |
void | DecomposeNoScaling (aiQuaternion &rotation, aiVector3D &position) const |
Decompose a trafo matrix with no scaling into its original components. | |
float | Determinant () const |
aiMatrix4x4 & | FromEulerAnglesXYZ (float x, float y, float z) |
Creates a trafo matrix from a set of euler angles. | |
aiMatrix4x4 & | FromEulerAnglesXYZ (const aiVector3D &blubb) |
aiMatrix4x4 & | Inverse () |
Invert the matrix. | |
bool | IsIdentity () const |
Returns true of the matrix is the identity matrix. | |
bool | operator!= (const aiMatrix4x4 m) const |
aiMatrix4x4 | operator* (const aiMatrix4x4 &m) const |
aiMatrix4x4 & | operator*= (const aiMatrix4x4 &m) |
bool | operator== (const aiMatrix4x4 m) const |
float * | operator[] (unsigned int p_iIndex) |
const float * | operator[] (unsigned int p_iIndex) const |
aiMatrix4x4 & | Transpose () |
Transpose the matrix. | |
Static Public Member Functions | |
static aiMatrix4x4 & | FromToMatrix (const aiVector3D &from, const aiVector3D &to, aiMatrix4x4 &out) |
A function for creating a rotation matrix that rotates a vector called "from" into another vector called "to". | |
static aiMatrix4x4 & | Rotation (float a, const aiVector3D &axis, aiMatrix4x4 &out) |
Returns a rotation matrix for a rotation around an arbitrary axis. | |
static aiMatrix4x4 & | RotationX (float a, aiMatrix4x4 &out) |
Returns a rotation matrix for a rotation around the x axis. | |
static aiMatrix4x4 & | RotationY (float a, aiMatrix4x4 &out) |
Returns a rotation matrix for a rotation around the y axis. | |
static aiMatrix4x4 & | RotationZ (float a, aiMatrix4x4 &out) |
Returns a rotation matrix for a rotation around the z axis. | |
static aiMatrix4x4 & | Scaling (const aiVector3D &v, aiMatrix4x4 &out) |
Returns a scaling matrix. | |
static aiMatrix4x4 & | Translation (const aiVector3D &v, aiMatrix4x4 &out) |
Returns a translation matrix. | |
Public Attributes | |
float | a1 |
float | a2 |
float | a3 |
float | a4 |
float | b1 |
float | b2 |
float | b3 |
float | b4 |
float | c1 |
float | c2 |
float | c3 |
float | c4 |
float | d1 |
float | d2 |
float | d3 |
float | d4 |
Represents a row-major 4x4 matrix, use this for homogeneous coordinates.
There's much confusion about matrix layouts (colum vs. row order). This is *always* a row-major matrix. Even with the aiProcess_ConvertToLeftHanded flag.
aiMatrix4x4::aiMatrix4x4 | ( | ) | [inline] |
aiMatrix4x4::aiMatrix4x4 | ( | float | _a1, |
float | _a2, | ||
float | _a3, | ||
float | _a4, | ||
float | _b1, | ||
float | _b2, | ||
float | _b3, | ||
float | _b4, | ||
float | _c1, | ||
float | _c2, | ||
float | _c3, | ||
float | _c4, | ||
float | _d1, | ||
float | _d2, | ||
float | _d3, | ||
float | _d4 | ||
) | [inline] |
aiMatrix4x4::aiMatrix4x4 | ( | const aiMatrix3x3 & | m | ) | [inline, explicit] |
Constructor from 3x3 matrix.
The remaining elements are set to identity.
void aiMatrix4x4::Decompose | ( | aiVector3D & | scaling, |
aiQuaternion & | rotation, | ||
aiVector3D & | position | ||
) | const [inline] |
Decompose a trafo matrix into its original components.
scaling | Receives the output scaling for the x,y,z axes |
rotation | Receives the output rotation as a hamilton quaternion |
position | Receives the output position for the x,y,z axes |
void aiMatrix4x4::DecomposeNoScaling | ( | aiQuaternion & | rotation, |
aiVector3D & | position | ||
) | const [inline] |
Decompose a trafo matrix with no scaling into its original components.
rotation | Receives the output rotation as a hamilton quaternion |
position | Receives the output position for the x,y,z axes |
float aiMatrix4x4::Determinant | ( | ) | const [inline] |
aiMatrix4x4 & aiMatrix4x4::FromEulerAnglesXYZ | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Creates a trafo matrix from a set of euler angles.
x | Rotation angle for the x-axis, in radians |
y | Rotation angle for the y-axis, in radians |
z | Rotation angle for the z-axis, in radians |
aiMatrix4x4 & aiMatrix4x4::FromEulerAnglesXYZ | ( | const aiVector3D & | blubb | ) | [inline] |
aiMatrix4x4 & aiMatrix4x4::FromToMatrix | ( | const aiVector3D & | from, |
const aiVector3D & | to, | ||
aiMatrix4x4 & | mtx | ||
) | [inline, static] |
A function for creating a rotation matrix that rotates a vector called "from" into another vector called "to".
Input : from[3], to[3] which both must be *normalized* non-zero vectors Output: mtx[3][3] -- a 3x3 matrix in colum-major form Authors: Tomas Möller, John Hughes "Efficiently Building a Matrix to Rotate One Vector to Another" Journal of Graphics Tools, 4(4):1-4, 1999
aiMatrix4x4 & aiMatrix4x4::Inverse | ( | ) | [inline] |
Invert the matrix.
If the matrix is not invertible all elements are set to qnan. Beware, use (f != f) to check whether a float f is qnan.
bool aiMatrix4x4::IsIdentity | ( | ) | const [inline] |
Returns true of the matrix is the identity matrix.
The check is performed against a not so small epsilon.
bool aiMatrix4x4::operator!= | ( | const aiMatrix4x4 | m | ) | const [inline] |
aiMatrix4x4 aiMatrix4x4::operator* | ( | const aiMatrix4x4 & | m | ) | const [inline] |
aiMatrix4x4 & aiMatrix4x4::operator*= | ( | const aiMatrix4x4 & | m | ) | [inline] |
bool aiMatrix4x4::operator== | ( | const aiMatrix4x4 | m | ) | const [inline] |
float * aiMatrix4x4::operator[] | ( | unsigned int | p_iIndex | ) | [inline] |
const float * aiMatrix4x4::operator[] | ( | unsigned int | p_iIndex | ) | const [inline] |
aiMatrix4x4 & aiMatrix4x4::Rotation | ( | float | a, |
const aiVector3D & | axis, | ||
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a rotation matrix for a rotation around an arbitrary axis.
a | Rotation angle, in radians |
axis | Rotation axis, should be a normalized vector. |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::RotationX | ( | float | a, |
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a rotation matrix for a rotation around the x axis.
a | Rotation angle, in radians |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::RotationY | ( | float | a, |
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a rotation matrix for a rotation around the y axis.
a | Rotation angle, in radians |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::RotationZ | ( | float | a, |
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a rotation matrix for a rotation around the z axis.
a | Rotation angle, in radians |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::Scaling | ( | const aiVector3D & | v, |
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a scaling matrix.
v | Scaling vector |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::Translation | ( | const aiVector3D & | v, |
aiMatrix4x4 & | out | ||
) | [inline, static] |
Returns a translation matrix.
v | Translation vector |
out | Receives the output matrix |
aiMatrix4x4 & aiMatrix4x4::Transpose | ( | ) | [inline] |
Transpose the matrix.
float aiMatrix4x4::a1 |
float aiMatrix4x4::a2 |
float aiMatrix4x4::a3 |
float aiMatrix4x4::a4 |
float aiMatrix4x4::b1 |
float aiMatrix4x4::b2 |
float aiMatrix4x4::b3 |
float aiMatrix4x4::b4 |
float aiMatrix4x4::c1 |
float aiMatrix4x4::c2 |
float aiMatrix4x4::c3 |
float aiMatrix4x4::c4 |
float aiMatrix4x4::d1 |
float aiMatrix4x4::d2 |
float aiMatrix4x4::d3 |
float aiMatrix4x4::d4 |