Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::Matrix4x4 Class Reference

A 4x4 matrix math class for the representation of full transforms. More...

#include <matrix4x4.h>

Public Member Functions

 Matrix4x4 ()
 Non-Initialization constructor.
 
 Matrix4x4 (const Real &XX, const Real &XY, const Real &XZ, const Real &XW, const Real &YX, const Real &YY, const Real &YZ, const Real &YW, const Real &ZX, const Real &ZY, const Real &ZZ, const Real &ZW, const Real &WX, const Real &WY, const Real &WZ, const Real &WW)
 Explict Initialization constructor. More...
 
 Matrix4x4 (const Ogre::Matrix4 &Mat)
 Ogre Matrix Initialization constructor. More...
 
 Matrix4x4 (const Vector3 &Position, const Vector3 &Scale, const Quaternion &Rotation)
 Transform Information Initialization constructor. More...
 
 ~Matrix4x4 ()
 Class destructor.
 
Matrix4x4 Adjoint () const
 Gets the Adjoint of this Matrix. More...
 
Matrix4x4 Concatenate (const Matrix4x4 &Mat) const
 Combines the translation/rotation of two Matricies. More...
 
void ExtractOgreMatrix4x4 (const Ogre::Matrix4 &temp)
 Gets the data from an Ogre Matrix4x4 and applies it to this. More...
 
Real GetDeterminant () const
 Gets the Determinant of this Matrix. More...
 
Ogre::Matrix4 GetOgreMatrix4x4 () const
 Gets an Ogre copy of this Matrix4x4. More...
 
Matrix3x3 GetRotationAsMatrix3x3 () const
 Gets the rotation portion of this Matrix as a Matrix3x3. More...
 
Quaternion GetRotationAsQuaternion () const
 Gets the rotation portion of this Matrix as a Quaternion. More...
 
Matrix4x4 Inverse () const
 Gets the Inverse of this Matrix. More...
 
Real Minor (const Whole &Row1, const Whole &Row2, const Whole &Row3, const Whole &Col1, const Whole &Col2, const Whole &Col3) const
 Gets the Minor of the specified rows/columns of this Matrix. More...
 
Boole operator!= (const Matrix4x4 &Other) const
 Inequality comparison operator. More...
 
Matrix4x4 operator* (const Matrix4x4 &Other) const
 Multiplication operator. More...
 
Vector3 operator* (const Vector3 &Vec) const
 Multiply by Vector3 operator. More...
 
Matrix4x4 operator* (const Real &Scalar) const
 Multiply by Real operator. More...
 
Matrix4x4operator*= (const Matrix4x4 &Other)
 Multiplication Assignment operator. More...
 
Matrix4x4operator*= (const Real &Scalar)
 Multiply Assignment by Real operator. More...
 
Matrix4x4 operator+ (const Matrix4x4 &Other) const
 Addition operator. More...
 
Matrix4x4operator+= (const Matrix4x4 &Other)
 Addition Assignment operator. More...
 
Matrix4x4 operator- (const Matrix4x4 &Other) const
 Subtraction operator. More...
 
Matrix4x4operator-= (const Matrix4x4 &Other)
 Subtraction Assignment operator. More...
 
void operator= (const Matrix4x4 &Other)
 Assignment operator. More...
 
void operator= (const Matrix3x3 &Other)
 Assignment operator. More...
 
Boole operator== (const Matrix4x4 &Other) const
 Equality comparison operator. More...
 
void ProtoDeSerialize (const XML::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it. More...
 
void ProtoSerialize (XML::Node &CurrentRoot) const
 Convert this class to an XML::Node ready for serialization. More...
 
void SetIdentity ()
 Sets all values in this Matrix to Identity values. More...
 
void SetTransform (const Vector3 &Position, const Vector3 &Scale, const Quaternion &Rotation)
 Sets the Matrix based on a provided position, scale, and rotation. More...
 
void SetValues (const Real &XX, const Real &XY, const Real &XZ, const Real &XW, const Real &YX, const Real &YY, const Real &YZ, const Real &YW, const Real &ZX, const Real &ZY, const Real &ZZ, const Real &ZW, const Real &WX, const Real &WY, const Real &WZ, const Real &WW)
 Sets the values for every number in the matrix.
 
void SetZero ()
 Sets all values in this Matrix to zero.
 
Matrix4x4 Transpose () const
 Gets the Transpose of this Matrix. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized. More...
 

Public Attributes

Real Matrix [4][4]
 The bigger Matrix. Fo' Reals.
 

Detailed Description

A 4x4 matrix math class for the representation of full transforms.

4x4 matricies are commonly used by graphics subsystems.

Definition at line 59 of file matrix4x4.h.

Constructor & Destructor Documentation

Mezzanine::Matrix4x4::Matrix4x4 ( const Real XX,
const Real XY,
const Real XZ,
const Real XW,
const Real YX,
const Real YY,
const Real YZ,
const Real YW,
const Real ZX,
const Real ZY,
const Real ZZ,
const Real ZW,
const Real WX,
const Real WY,
const Real WZ,
const Real WW 
)

Explict Initialization constructor.

Provides initialization for every number in the matrix.

Definition at line 59 of file matrix4x4.cpp.

Mezzanine::Matrix4x4::Matrix4x4 ( const Ogre::Matrix4 &  Mat)

Ogre Matrix Initialization constructor.

Parameters
MatThe Ogre Matrix to build this Matrix from.

Definition at line 63 of file matrix4x4.cpp.

Mezzanine::Matrix4x4::Matrix4x4 ( const Vector3 Position,
const Vector3 Scale,
const Quaternion Rotation 
)

Transform Information Initialization constructor.

Parameters
PositionThe position of the transform.
ScaleThe scale of the transform.
RotationThe rotation of the transform.

Definition at line 66 of file matrix4x4.cpp.

Member Function Documentation

Matrix4x4 Mezzanine::Matrix4x4::Adjoint ( ) const

Gets the Adjoint of this Matrix.

Returns
Returns a new Matrix4x4 that is the Adjoint of this.

Definition at line 379 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::Concatenate ( const Matrix4x4 Mat) const

Combines the translation/rotation of two Matricies.

Parameters
MatThe other Matrix to combine with this.
Returns
Returns the product of the two Matricies.

Definition at line 449 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::ExtractOgreMatrix4x4 ( const Ogre::Matrix4 &  temp)

Gets the data from an Ogre Matrix4x4 and applies it to this.

Parameters
tempThe Matrix4x4 to copy from.

Definition at line 150 of file matrix4x4.cpp.

Real Mezzanine::Matrix4x4::GetDeterminant ( ) const

Gets the Determinant of this Matrix.

Returns
Returns a Real representing the Determinant of this Matrix.

Definition at line 114 of file matrix4x4.cpp.

Ogre::Matrix4 Mezzanine::Matrix4x4::GetOgreMatrix4x4 ( ) const

Gets an Ogre copy of this Matrix4x4.

Returns
Returns an Ogre Matrix4x4 with the same values as this Matrix4x4.

Definition at line 158 of file matrix4x4.cpp.

Matrix3x3 Mezzanine::Matrix4x4::GetRotationAsMatrix3x3 ( ) const

Gets the rotation portion of this Matrix as a Matrix3x3.

Returns
Returns a Matrix3x3 that expresses the rotation of this Matrix.

Definition at line 133 of file matrix4x4.cpp.

Quaternion Mezzanine::Matrix4x4::GetRotationAsQuaternion ( ) const

Gets the rotation portion of this Matrix as a Quaternion.

Returns
Returns a Quaternion that expresses the rotation of this Matrix.

Definition at line 127 of file matrix4x4.cpp.

String Mezzanine::Matrix4x4::GetSerializableName ( )
static

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns
A string containing "Matrix4x4".

Definition at line 589 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::Inverse ( ) const

Gets the Inverse of this Matrix.

Returns
Returns a new Matrix4x4 that is this Matrix inversed.

Definition at line 387 of file matrix4x4.cpp.

Real Mezzanine::Matrix4x4::Minor ( const Whole Row1,
const Whole Row2,
const Whole Row3,
const Whole Col1,
const Whole Col2,
const Whole Col3 
) const

Gets the Minor of the specified rows/columns of this Matrix.

Parameters
Row1Row for the first Real of the calculated minor.
Row2Row for the second Real of the calculated minor.
Row3Row for the third Real of the calculated minor.
Col1Column for the first Real of the calculated minor.
Col2Column for the second Real of the calculated minor.
Col3Column for the third Real of the calculated minor.
Returns
Returns a Real containing the minor of the Matrix.

Definition at line 475 of file matrix4x4.cpp.

Boole Mezzanine::Matrix4x4::operator!= ( const Matrix4x4 Other) const

Inequality comparison operator.

Parameters
OtherThe other Matrix4x4 to compare against.
Returns
Returns true if the two Matrix4x4's are not equal, false otherwise.

Definition at line 182 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::operator* ( const Matrix4x4 Other) const

Multiplication operator.

Parameters
OtherThe other Matrix4x4 to multiply this by.
Returns
Returns a fresh Matrix4x4.

Definition at line 252 of file matrix4x4.cpp.

Vector3 Mezzanine::Matrix4x4::operator* ( const Vector3 Vec) const

Multiply by Vector3 operator.

Parameters
VecThe Vector to be rotated.
Returns
Returns a Vector3 with the rotation and translation of this Matrix applied to it.

Definition at line 316 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::operator* ( const Real Scalar) const

Multiply by Real operator.

Parameters
ScalarThe Real to multiply each member of this Matrix by.
Returns
Returns a new Matrix4x4 that is a copy of this Matrix4x4 with each of it's members multiplied by the scaler.

Definition at line 329 of file matrix4x4.cpp.

Matrix4x4 & Mezzanine::Matrix4x4::operator*= ( const Matrix4x4 Other)

Multiplication Assignment operator.

Parameters
OtherThe other Matrix4x4 to add to this.
Returns
Returns a reference to *this.

Definition at line 307 of file matrix4x4.cpp.

Matrix4x4 & Mezzanine::Matrix4x4::operator*= ( const Real Scalar)

Multiply Assignment by Real operator.

Parameters
ScalarThe Real to multiply each member of this Matrix by.
Returns
Returns a reference to *this, being the modified Matrix4x4.

Definition at line 338 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::operator+ ( const Matrix4x4 Other) const

Addition operator.

Parameters
OtherThe other Matrix4x4 to add to this.
Returns
Returns a fresh Matrix4x4.

Definition at line 198 of file matrix4x4.cpp.

Matrix4x4 & Mezzanine::Matrix4x4::operator+= ( const Matrix4x4 Other)

Addition Assignment operator.

Parameters
OtherThe other Matrix4x4 to add to this.
Returns
Returns a reference to *this.

Definition at line 257 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::operator- ( const Matrix4x4 Other) const

Subtraction operator.

Parameters
OtherThe other Matrix4x4 to subtract from this.
Returns
Returns a fresh Matrix4x4.

Definition at line 225 of file matrix4x4.cpp.

Matrix4x4 & Mezzanine::Matrix4x4::operator-= ( const Matrix4x4 Other)

Subtraction Assignment operator.

Parameters
OtherThe other Matrix4x4 to subtract from this.
Returns
Returns a reference to *this.

Definition at line 282 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::operator= ( const Matrix4x4 Other)

Assignment operator.

Parameters
OtherThe other Matrix4x4 to copy from.

Definition at line 350 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::operator= ( const Matrix3x3 Other)

Assignment operator.

This will copy the rotation portions of the other Matrix into this Matrix.

Parameters
OtherThe other Matrix3x3 to copy from.

Definition at line 361 of file matrix4x4.cpp.

Boole Mezzanine::Matrix4x4::operator== ( const Matrix4x4 Other) const

Equality comparison operator.

Parameters
OtherThe other Matrix4x4 to compare against.
Returns
Returns true if the two Matrix4x4's are equal, false otherwise.

Definition at line 169 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::ProtoDeSerialize ( const XML::Node OneNode)

Take the data stored in an XML and overwrite this instance of this object with it.

Parameters
OneNodeand XML::Node containing the data.

Definition at line 513 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::ProtoSerialize ( XML::Node CurrentRoot) const

Convert this class to an XML::Node ready for serialization.

Parameters
CurrentRootThe point in the XML hierarchy that all this Matrix4x4 should be appended to.

Definition at line 485 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::SetIdentity ( )

Sets all values in this Matrix to Identity values.

Identity values for a 4x4 matrix is all zeros except for the values at [0][0], [1][1], [2][2], [3][3], which are set to one.

Definition at line 95 of file matrix4x4.cpp.

void Mezzanine::Matrix4x4::SetTransform ( const Vector3 Position,
const Vector3 Scale,
const Quaternion Rotation 
)

Sets the Matrix based on a provided position, scale, and rotation.

Parameters
PositionThe position of the transform.
ScaleThe scale of the transform.
RotationThe rotation of the transform.

Definition at line 84 of file matrix4x4.cpp.

Matrix4x4 Mezzanine::Matrix4x4::Transpose ( ) const

Gets the Transpose of this Matrix.

Todo:
I'm not gonna lie, I have no idea what the hell the Transpose of a 4x4 Matrix is or what it is used for...this doc could use a touchup. In fact most of the doc's on this class could use a review.
Returns
Returns a new Matrix4x4 that is a Transposed copy of this.

Definition at line 371 of file matrix4x4.cpp.


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