FMMatrix44 Class Reference
[Mathematics Classes.]

A 4x4 matrix: use to represent 3D transformations. More...

#include <FMMatrix44.h>

List of all members.

Public Member Functions

 FMMatrix44 (const float *_m)
 Creates a FMMatrix44 from the float array.
 FMMatrix44 ()
 Creates an empty FMMatrix44.
 operator float * ()
 Get this FMMatrix44 as an array of floats.
 operator const float * () const
 Get this FMMatrix44 as an array of floats.
float * operator[] (int a)
 Get a specified row of FMMatrix44 as an array of floats.
const float * operator[] (int a) const
 Get a specified row of FMMatrix44 as an array of floats.
FMMatrix44operator= (const FMMatrix44 &copy)
 Assign this FMMatrix44's elements to be the same as that of the given FMMatrix44.
FMMatrix44 Transposed () const
 Gets the transposed of this FMMatrix44.
FMMatrix44 Inverted () const
 Gets the inversion of this FMMatrix33.
void Decompose (FMVector3 &Scale, FMVector3 &Rotation, FMVector3 &Translation, float &inverted) const
 Decompose this FMMatrix44 into it's scale, rotation, and translation components; it also tells whether it is inverted.
FMVector3 TransformCoordinate (const FMVector3 &coordinate) const
 Transforms the given point by this FMMatrix44.
FMVector3 TransformVector (const FMVector3 &v) const
 Transforms the given vector by this FMMatrix44.
FMVector3 GetTranslation () const
 Gets the translation component of this FMMatrix44.

Static Public Member Functions

static FMMatrix44 TranslationMatrix (const FMVector3 &translation)
 Gets the FMMatrix44 representation of a 3D translation.
static FMMatrix44 AxisRotationMatrix (const FMVector3 &axis, float angle)
 Gets the FMMatrix44 representation of a 3D rotation about a given axis by an angle.

Public Attributes

float m [4][4]
 The matrix elements stored in a 2D array.

Static Public Attributes

static FMMatrix44 Identity
 The identity FMMatrix44.


Detailed Description

A 4x4 matrix: use to represent 3D transformations.


Constructor & Destructor Documentation

FMMatrix44::FMMatrix44 const float *  _m  ) 
 

Creates a FMMatrix44 from the float array.

The float array stores the elements in the following order: m[0][0], m[1][0], m[2][0], m[3][0], m[0][1], m[1][1], m[2][1], m[3][1], m[0][2], m[1][2], m[2][2], m[3][2], m[0][3], m[1][3], m[2][3], m[3][3].

Parameters:
_m The float array to create the matrix from.

FMMatrix44::FMMatrix44  )  [inline]
 

Creates an empty FMMatrix44.

The default values are non deterministic.


Member Function Documentation

static FMMatrix44 FMMatrix44::AxisRotationMatrix const FMVector3 axis,
float  angle
[static]
 

Gets the FMMatrix44 representation of a 3D rotation about a given axis by an angle.

Parameters:
axis The axis of rotation.
angle The angle of rotation in radians.
Returns:
The rotation FMMatrix44.

void FMMatrix44::Decompose FMVector3 Scale,
FMVector3 Rotation,
FMVector3 Translation,
float &  inverted
const
 

Decompose this FMMatrix44 into it's scale, rotation, and translation components; it also tells whether it is inverted.

Parameters:
Scale The FMVector to place the scale components to.
Rotation The FMVector to place the rotation components to.
Translation The FMVector to place the translation components to.
inverted The value corresponding to if it was inverted (-1.0f or 1.0f)

FMVector3 FMMatrix44::GetTranslation  )  const
 

Gets the translation component of this FMMatrix44.

Returns:
The FMVector3 representation of the translation.

FMMatrix44 FMMatrix44::Inverted  )  const
 

Gets the inversion of this FMMatrix33.

Returns:
The inversion of this FMMatrix.

FMMatrix44::operator const float *  )  const [inline]
 

Get this FMMatrix44 as an array of floats.

The array contains the elements in the following order: m[0][0], m[0][1], m[0][2], m[0][3], m[1][0], m[1][1], m[1][2], m[1][3], m[2][0], m[2][1], m[2][2], m[0][3], m[3][0], m[3][1], m[3][2], m[3][3].

Returns:
The float array.

FMMatrix44::operator float *  )  [inline]
 

Get this FMMatrix44 as an array of floats.

The array contains the elements in the following order: m[0][0], m[0][1], m[0][2], m[0][3], m[1][0], m[1][1], m[1][2], m[1][3], m[2][0], m[2][1], m[2][2], m[0][3], m[3][0], m[3][1], m[3][2], m[3][3].

Returns:
The float array.

FMMatrix44& FMMatrix44::operator= const FMMatrix44 copy  ) 
 

Assign this FMMatrix44's elements to be the same as that of the given FMMatrix44.

Parameters:
copy The FMMatrix to copy elements from.
Returns:
This FMMatrix.

const float* FMMatrix44::operator[] int  a  )  const [inline]
 

Get a specified row of FMMatrix44 as an array of floats.

Parameters:
a The row index, starting at 0, of the row to get.
Returns:
The float array of the elements in the specified row.

float* FMMatrix44::operator[] int  a  )  [inline]
 

Get a specified row of FMMatrix44 as an array of floats.

Parameters:
a The row index, starting at 0, of the row to get.
Returns:
The float array of the elements in the specified row.

FMVector3 FMMatrix44::TransformCoordinate const FMVector3 coordinate  )  const
 

Transforms the given point by this FMMatrix44.

Parameters:
coordinate The point to transform.
Returns:
The FMVector3 representation of the transformed point.

FMVector3 FMMatrix44::TransformVector const FMVector3 v  )  const
 

Transforms the given vector by this FMMatrix44.

Parameters:
v The vector to transform.
Returns:
The FMVector3 representation of the transformed vector.

static FMMatrix44 FMMatrix44::TranslationMatrix const FMVector3 translation  )  [static]
 

Gets the FMMatrix44 representation of a 3D translation.

The translation in the x, y and z directions correspond to the x, y, and z components of the FMVector3.

Parameters:
translation The FMVector3 to get the translation components from.
Returns:
The translation FMMatrix44.

FMMatrix44 FMMatrix44::Transposed  )  const
 

Gets the transposed of this FMMatrix44.

Returns:
The transposed of this FMMatrix.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:44 2006 for FCollada by  doxygen 1.4.6-NO