Mount Fuji Engine  0.8b
Public Member Functions | Data Fields | Static Public Attributes
MFMatrix Struct Reference

Matrix class to perform various matrix operations. More...

Public Member Functions

MFMatrixoperator= (const MFMatrix &mat)
 Assignment operator. More...
 
bool operator== (const MFMatrix &mat) const
 Comparison operator. More...
 
bool operator!= (const MFMatrix &mat) const
 Not-equals operator. More...
 
MFMatrixSetIdentity ()
 Set the matrix to identity.
 
MFMatrixTranslate (const MFVector &trans)
 Translates the matrix.
 
MFMatrixRotate (const MFVector &axis, float angle)
 Rotates the matrix about an axis.
 
MFMatrixRotateQ (const MFVector &q)
 Rotates the matrix by a quaternion.
 
MFMatrixRotateYPR (float yaw, float pitch, float roll)
 Rotates the matrix arbitrarily.
 
MFMatrixRotateX (float angle)
 Rotates the matrix about the X axis.
 
MFMatrixRotateY (float angle)
 Rotates the matrix about the Y axis.
 
MFMatrixRotateZ (float angle)
 Rotates the matrix about the Z axis.
 
MFMatrixScale (const MFVector &scale)
 Scales the matrix.
 
MFMatrixSetTranslation (const MFVector &trans)
 Set the matrix translation.
 
MFMatrixSetRotation (const MFVector &axis, float angle)
 Set the matrix rotation.
 
MFMatrixSetRotationQ (const MFQuaternion &q)
 Set the matrix rotation to a quaternion.
 
MFMatrixSetRotationYPR (float yaw, float pitch, float roll)
 Set the matrix rotation to a specified pitch yaw and roll.
 
MFMatrixSetRotationX (float angle)
 Sets the rotation to rotate about the X axis.
 
MFMatrixSetRotationY (float angle)
 Sets the rotation to rotate about the Y axis.
 
MFMatrixSetRotationZ (float angle)
 Sets the rotation to rotate about the Z axis.
 
MFMatrixSetScale (const MFVector &scale)
 Sets the scale of the matrix.
 
MFQuaternion GetRotationQ () const
 Calculate a quaternion from the matrix.
 
MFMatrixLookAt (const MFVector &pos, const MFVector &at, const MFVector &up=MFVector::up)
 Build a matrix that looks from one point to another.
 
MFMatrixTranspose ()
 Transpose the matrix.
 
MFMatrixTranspose (const MFMatrix &matrix)
 Sets the matrix to the transpose of another.
 
MFMatrixTranspose3x3 ()
 Transpose the 3x3 portion of the matrix.
 
MFMatrixTranspose3x3 (const MFMatrix &matrix)
 Sets the matrix to the transpose of another 3x3 matrix.
 
MFMatrixMultiply (const MFMatrix &mat)
 Multiply the matrix by another.
 
MFMatrixMultiply (const MFMatrix &mat1, const MFMatrix &mat2)
 Set the matrix to the product of 2 matrices.
 
MFMatrixMultiply4x4 (const MFMatrix &mat)
 Multiply the matrix by another full 4x4 matrix.
 
MFMatrixMultiply4x4 (const MFMatrix &mat1, const MFMatrix &mat2)
 Set the matrix to the product of 2 full 4x4 matrices.
 
MFMatrixMultiply3x3 (const MFMatrix &mat)
 Multiply the 3x3 matrix by another 3x3 matrix.
 
MFMatrixMultiply3x3 (const MFMatrix &mat1, const MFMatrix &mat2)
 Set the matrix to the product of 2 3x3 matrices.
 
MFVector TransformVector (const MFVector &vec) const
 Transform a vector by the matrix.
 
MFVector TransformVectorH (const MFVector &vec) const
 Transform a vector by the matrix assuming 1.0 in the vector's W component.
 
MFVector TransformVector3 (const MFVector &vec) const
 Transform a 3D vector by a rotation matrix.
 
MFMatrixInverse ()
 Inverse the matrix.
 
MFMatrixInverse (const MFMatrix &matrix)
 Set this matrix to the inverse of another matrix.
 
MFMatrixTween (const MFMatrix &start, const MFMatrix &end, float t)
 Tween one matrix towards another by a factor t.
 
MFMatrixPreciseTween (const MFMatrix &start, const MFMatrix &end, float t)
 Tween one matrix towards another by a factor t using a quaternion to interpolate rotation.
 
MFMatrixClearW ()
 Clear the matrix W column.
 
const MFVectorGetXAxis () const
 Get the matrices X axis.
 
const MFVectorGetYAxis () const
 Get the matrices Y axis.
 
const MFVectorGetZAxis () const
 Get the matrices Z axis.
 
const MFVectorGetTrans () const
 Get the matrices translation vector.
 
void SetXAxis3 (const MFVector &v)
 Set the matrices X axis to a 3D vector.
 
void SetYAxis3 (const MFVector &v)
 Set the matrices Y axis to a 3D vector.
 
void SetZAxis3 (const MFVector &v)
 Set the matrices Z axis to a 3D vector.
 
void SetTrans3 (const MFVector &v)
 Set the matrices translation to a 3D vector.
 
void SetXAxis4 (const MFVector &v)
 Set the matrices X axis to a 4D vector.
 
void SetYAxis4 (const MFVector &v)
 Set the matrices Y axis to a 4D vector.
 
void SetZAxis4 (const MFVector &v)
 Set the matrices Z axis to a 4D vector.
 
void SetTrans4 (const MFVector &v)
 Set the matrices translation to a 4D vector.
 
const char * ToString () const
 Generate a string that represents the matrix.
 

Data Fields

float m [16]
 4x4 array of floats
 

Static Public Attributes

static const MFMatrix identity
 Constant identity matrix.
 

Detailed Description

Matrix class used throughout Fuji. Optimised for each platform.


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