Assimp  v2.0 (November 2010)
Public Member Functions | Static Public Member Functions | Public Attributes
aiMatrix3x3 Struct Reference

Represents a row-major 3x3 matrix. More...

List of all members.

Public Member Functions

 aiMatrix3x3 ()
 aiMatrix3x3 (float _a1, float _a2, float _a3, float _b1, float _b2, float _b3, float _c1, float _c2, float _c3)
 aiMatrix3x3 (const aiMatrix4x4 &pMatrix)
 Construction from a 4x4 matrix.
float Determinant () const
aiMatrix3x3Inverse ()
 Invert the matrix.
bool operator!= (const aiMatrix4x4 m) const
aiMatrix3x3 operator* (const aiMatrix3x3 &m) const
aiMatrix3x3operator*= (const aiMatrix3x3 &m)
bool operator== (const aiMatrix4x4 m) const
float * operator[] (unsigned int p_iIndex)
const float * operator[] (unsigned int p_iIndex) const
aiMatrix3x3Transpose ()
 Transpose the matrix.

Static Public Member Functions

static aiMatrix3x3FromToMatrix (const aiVector3D &from, const aiVector3D &to, aiMatrix3x3 &out)
 A function for creating a rotation matrix that rotates a vector called "from" into another vector called "to".
static aiMatrix3x3Rotation (float a, const aiVector3D &axis, aiMatrix3x3 &out)
 Returns a rotation matrix for a rotation around an arbitrary axis.
static aiMatrix3x3RotationZ (float a, aiMatrix3x3 &out)
 Returns a rotation matrix for a rotation around z.
static aiMatrix3x3Translation (const aiVector2D &v, aiMatrix3x3 &out)
 Returns a translation matrix.

Public Attributes

float a1
float a2
float a3
float b1
float b2
float b3
float c1
float c2
float c3

Detailed Description

Represents a row-major 3x3 matrix.

There's much confusion about matrix layouts (colum vs. row order). This is *always* a row-major matrix. Even with the aiProcess_ConvertToLeftHanded flag.


Constructor & Destructor Documentation

aiMatrix3x3::aiMatrix3x3 ( ) [inline]
aiMatrix3x3::aiMatrix3x3 ( float  _a1,
float  _a2,
float  _a3,
float  _b1,
float  _b2,
float  _b3,
float  _c1,
float  _c2,
float  _c3 
) [inline]
aiMatrix3x3::aiMatrix3x3 ( const aiMatrix4x4 pMatrix) [inline, explicit]

Construction from a 4x4 matrix.

The remaining parts of the matrix are ignored.


Member Function Documentation

float aiMatrix3x3::Determinant ( ) const [inline]
aiMatrix3x3 & aiMatrix3x3::FromToMatrix ( const aiVector3D from,
const aiVector3D to,
aiMatrix3x3 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

aiMatrix3x3 & aiMatrix3x3::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 aiMatrix3x3::operator!= ( const aiMatrix4x4  m) const [inline]
aiMatrix3x3 aiMatrix3x3::operator* ( const aiMatrix3x3 m) const [inline]
aiMatrix3x3 & aiMatrix3x3::operator*= ( const aiMatrix3x3 m) [inline]
bool aiMatrix3x3::operator== ( const aiMatrix4x4  m) const [inline]
float * aiMatrix3x3::operator[] ( unsigned int  p_iIndex) [inline]
const float * aiMatrix3x3::operator[] ( unsigned int  p_iIndex) const [inline]
aiMatrix3x3 & aiMatrix3x3::Rotation ( float  a,
const aiVector3D axis,
aiMatrix3x3 out 
) [inline, static]

Returns a rotation matrix for a rotation around an arbitrary axis.

Parameters:
aRotation angle, in radians
axisAxis to rotate around
outTo be filled
aiMatrix3x3 & aiMatrix3x3::RotationZ ( float  a,
aiMatrix3x3 out 
) [inline, static]

Returns a rotation matrix for a rotation around z.

Parameters:
aRotation angle, in radians
outReceives the output matrix
Returns:
Reference to the output matrix
aiMatrix3x3 & aiMatrix3x3::Translation ( const aiVector2D v,
aiMatrix3x3 out 
) [inline, static]

Returns a translation matrix.

Parameters:
vTranslation vector
outReceives the output matrix
Returns:
Reference to the output matrix
aiMatrix3x3 & aiMatrix3x3::Transpose ( ) [inline]

Transpose the matrix.


Member Data Documentation


The documentation for this struct was generated from the following files: