This is a 3x3 Matrix class used for representing rotations and scaling in an object. More...
#include <matrix3x3.h>
Public Member Functions | |
Matrix3x3 () | |
Non-Initialization constructor. | |
Matrix3x3 (const Real &XX, const Real &XY, const Real &XZ, const Real &YX, const Real &YY, const Real &YZ, const Real &ZX, const Real &ZY, const Real &ZZ) | |
Explict Initialization constructor. More... | |
Matrix3x3 (const Real &Yaw, const Real &Pitch, const Real &Roll) | |
Euler Initialization constructor. More... | |
Matrix3x3 (const Quaternion &Rot) | |
Quaternion Initialization constructor. More... | |
Matrix3x3 (const Vector3 &Axis, const Real &Angle) | |
Axis Angle Initialization constructor. More... | |
Matrix3x3 (const btMatrix3x3 &Mat) | |
Bullet Matrix3x3 constructor. More... | |
Matrix3x3 (const Ogre::Matrix3 &Mat) | |
Ogre Matrix3x3 constructor. More... | |
~Matrix3x3 () | |
Class destructor. | |
Matrix3x3 | Adjoint () const |
Gets the Adjoint of this Matrix. More... | |
Real | CoFactor (const Whole &Row1, const Whole &Col1, const Whole &Row2, const Whole &Col2) const |
Gets the cofactor between two sets of rows/columns. More... | |
void | ExtractBulletMatrix3x3 (const btMatrix3x3 &temp) |
Gets the data from a Bullet Matrix3x3 and applies it to this. More... | |
void | ExtractOgreMatrix3x3 (const Ogre::Matrix3 &temp) |
Gets the data from an Ogre Matrix3x3 and applies it to this. More... | |
Quaternion | GetAsQuaternion () const |
Gets this Matrix as a Quaternion. More... | |
btMatrix3x3 | GetBulletMatrix3x3 () const |
Gets a Bullet copy of this Matrix3x3. More... | |
Real | GetDeterminant () const |
Gets the Determinant of this Matrix. More... | |
Ogre::Matrix3 | GetOgreMatrix3x3 () const |
Gets an Ogre copy of this Matrix3x3. More... | |
bool | HasScaling () const |
Checks to see if this Matrix has any scaling applied to it. More... | |
Matrix3x3 | Inverse () const |
Gets the Inverse of this Matrix. More... | |
bool | operator!= (const Matrix3x3 &Other) const |
Inequality comparison operator. More... | |
Matrix3x3 | operator* (const Matrix3x3 &Other) const |
Multiplication operator. More... | |
Vector3 | operator* (const Vector3 &Vec) const |
Multiply by Vector3 operator. More... | |
Matrix3x3 | operator* (const Real &Scaler) const |
Multiply by Real operator. More... | |
Matrix3x3 & | operator*= (const Matrix3x3 &Other) |
Multiplication Assignment operator. More... | |
Matrix3x3 & | operator*= (const Real &Scaler) |
Multiply Assignment by Real operator. More... | |
Matrix3x3 | operator+ (const Matrix3x3 &Other) const |
Addition operator. More... | |
Matrix3x3 & | operator+= (const Matrix3x3 &Other) |
Addition Assignment operator. More... | |
Matrix3x3 | operator- (const Matrix3x3 &Other) const |
Subtraction operator. More... | |
Matrix3x3 | operator- () const |
Negative Unary operator. More... | |
Matrix3x3 & | operator-= (const Matrix3x3 &Other) |
Subtraction Assignment operator. More... | |
void | operator= (const Matrix3x3 &Other) |
Assignment operator. More... | |
bool | operator== (const Matrix3x3 &Other) const |
Equality comparison operator. More... | |
void | SetFromAxisAngle (const Vector3 &Axis, const Real &Angle) |
Sets the Matrix from an Axis Angle. More... | |
void | SetFromEulerZYX (const Real &Yaw, const Real &Pitch, const Real &Roll) |
Sets the Matrix based on Euler angles. More... | |
void | SetFromQuaternion (const Quaternion &Rot) |
Sets the Matrix from a quaternion. More... | |
void | SetIdentity () |
Sets all values in this Matrix to Identity values. More... | |
void | SetScale (const Vector3 &Scaling) |
Scales this Matrix. More... | |
void | SetValues (const Real &XX, const Real &XY, const Real &XZ, const Real &YX, const Real &YY, const Real &YZ, const Real &ZX, const Real &ZY, const Real &ZZ) |
Sets the values for every number in the matrix. | |
void | SetZero () |
Sets all values in this Matrix to zero. | |
Matrix3x3 | Transpose () const |
Gets the Transpose of this Matrix. More... | |
Public Attributes | |
Real | Matrix [3][3] |
The Matrix. Fo' Reals. | |
This is a 3x3 Matrix class used for representing rotations and scaling in an object.
The utility of this class overlaps with that of the Quaternion, for the most part the use of either class is a matter of preference. The Mezzanine engine for the most part prefer's use of the Quaternion class since it deals with fewer numbers, but this class is still made available for others that may prefer it.
Definition at line 62 of file matrix3x3.h.
Mezzanine::Matrix3x3::Matrix3x3 | ( | const Real & | XX, |
const Real & | XY, | ||
const Real & | XZ, | ||
const Real & | YX, | ||
const Real & | YY, | ||
const Real & | YZ, | ||
const Real & | ZX, | ||
const Real & | ZY, | ||
const Real & | ZZ | ||
) |
Explict Initialization constructor.
Provides initialization for every number in the matrix.
Definition at line 64 of file matrix3x3.cpp.
Euler Initialization constructor.
Yaw | The number of degree's on the Yaw in Degrees to rotate. |
Pitch | The number of degree's on the Pitch in Degrees to rotate. |
Roll | The number of degree's on the Roll in Degrees to rotate. |
Definition at line 69 of file matrix3x3.cpp.
Mezzanine::Matrix3x3::Matrix3x3 | ( | const Quaternion & | Rot) |
Quaternion Initialization constructor.
Rot | The rotation to apply to this Matrix expressed as a Quaternion. |
Definition at line 74 of file matrix3x3.cpp.
Axis Angle Initialization constructor.
Axis | The axis on which to apply the rotation. |
Angle | The amount of rotation to apply in Radians. |
Definition at line 79 of file matrix3x3.cpp.
Mezzanine::Matrix3x3::Matrix3x3 | ( | const btMatrix3x3 & | Mat) |
Bullet Matrix3x3 constructor.
Mat | The Bullet 3x3 Matrix. |
Definition at line 84 of file matrix3x3.cpp.
Mezzanine::Matrix3x3::Matrix3x3 | ( | const Ogre::Matrix3 & | Mat) |
Mat | The Ogre 3x3 Matrix. |
Definition at line 89 of file matrix3x3.cpp.
Matrix3x3 Mezzanine::Matrix3x3::Adjoint | ( | ) | const |
Gets the Adjoint of this Matrix.
Definition at line 460 of file matrix3x3.cpp.
Real Mezzanine::Matrix3x3::CoFactor | ( | const Whole & | Row1, |
const Whole & | Col1, | ||
const Whole & | Row2, | ||
const Whole & | Col2 | ||
) | const |
Gets the cofactor between two sets of rows/columns.
Row1 | Row for the first Real of the calculated cofactor. |
Col1 | Column for the first Real of the calculated cofactor. |
Row2 | Row for the second Real of the calculated cofactor. |
Col2 | Column for the second Real of the calculated cofactor. |
Definition at line 494 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::ExtractBulletMatrix3x3 | ( | const btMatrix3x3 & | temp) |
Gets the data from a Bullet Matrix3x3 and applies it to this.
temp | The Matrix3x3 to copy from. |
Definition at line 232 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::ExtractOgreMatrix3x3 | ( | const Ogre::Matrix3 & | temp) |
Gets the data from an Ogre Matrix3x3 and applies it to this.
temp | The Matrix3x3 to copy from. |
Definition at line 254 of file matrix3x3.cpp.
Quaternion Mezzanine::Matrix3x3::GetAsQuaternion | ( | ) | const |
Gets this Matrix as a Quaternion.
Definition at line 198 of file matrix3x3.cpp.
btMatrix3x3 Mezzanine::Matrix3x3::GetBulletMatrix3x3 | ( | ) | const |
Gets a Bullet copy of this Matrix3x3.
Definition at line 249 of file matrix3x3.cpp.
Real Mezzanine::Matrix3x3::GetDeterminant | ( | ) | const |
Gets the Determinant of this Matrix.
Definition at line 187 of file matrix3x3.cpp.
Ogre::Matrix3 Mezzanine::Matrix3x3::GetOgreMatrix3x3 | ( | ) | const |
bool Mezzanine::Matrix3x3::HasScaling | ( | ) | const |
Checks to see if this Matrix has any scaling applied to it.
Definition at line 512 of file matrix3x3.cpp.
Matrix3x3 Mezzanine::Matrix3x3::Inverse | ( | ) | const |
Gets the Inverse of this Matrix.
Definition at line 467 of file matrix3x3.cpp.
bool Mezzanine::Matrix3x3::operator!= | ( | const Matrix3x3 & | Other) | const |
Inequality comparison operator.
Other | The other Matrix3x3 to compare against. |
Definition at line 292 of file matrix3x3.cpp.
Multiplication operator.
Other | The other Matrix3x3 to multiply this by. |
Definition at line 334 of file matrix3x3.cpp.
Multiply by Vector3 operator.
Vec | The Vector to be rotated. |
Definition at line 383 of file matrix3x3.cpp.
Multiply by Real operator.
Scaler | The Real to multiply each member of this Matrix by. |
Definition at line 394 of file matrix3x3.cpp.
Multiplication Assignment operator.
Other | The other Matrix3x3 to add to this. |
Definition at line 374 of file matrix3x3.cpp.
Multiply Assignment by Real operator.
Scaler | The Real to multiply each member of this Matrix by. |
Definition at line 407 of file matrix3x3.cpp.
Addition operator.
Other | The other Matrix3x3 to add to this. |
Definition at line 308 of file matrix3x3.cpp.
Addition Assignment operator.
Other | The other Matrix3x3 to add to this. |
Definition at line 350 of file matrix3x3.cpp.
Subtraction operator.
Other | The other Matrix3x3 to subtract from this. |
Definition at line 321 of file matrix3x3.cpp.
Matrix3x3 Mezzanine::Matrix3x3::operator- | ( | ) | const |
Negative Unary operator.
Definition at line 433 of file matrix3x3.cpp.
Subtraction Assignment operator.
Other | The other Matrix3x3 to subtract from this. |
Definition at line 362 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::operator= | ( | const Matrix3x3 & | Other) |
Assignment operator.
Other | The other Matrix3x3 to copy from. |
Definition at line 422 of file matrix3x3.cpp.
bool Mezzanine::Matrix3x3::operator== | ( | const Matrix3x3 & | Other) | const |
Equality comparison operator.
Other | The other Matrix3x3 to compare against. |
Definition at line 279 of file matrix3x3.cpp.
Sets the Matrix from an Axis Angle.
Axis | The axis on which to apply the rotation. |
Angle | The amount of rotation to apply in Radians. |
Definition at line 144 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::SetFromEulerZYX | ( | const Real & | Yaw, |
const Real & | Pitch, | ||
const Real & | Roll | ||
) |
Sets the Matrix based on Euler angles.
Yaw | The number of degree's on the Yaw in Degrees to rotate. |
Pitch | The number of degree's on the Pitch in Degrees to rotate. |
Roll | The number of degree's on the Roll in Degrees to rotate. |
Definition at line 110 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::SetFromQuaternion | ( | const Quaternion & | Rot) |
Sets the Matrix from a quaternion.
Rot | The rotation to apply to this Matrix expressed as a Quaternion. |
Definition at line 129 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::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 170 of file matrix3x3.cpp.
void Mezzanine::Matrix3x3::SetScale | ( | const Vector3 & | Scaling) |
Scales this Matrix.
Scaling | A Vector3 containing the scaling to be applied to this Matrix. |
Definition at line 499 of file matrix3x3.cpp.
Matrix3x3 Mezzanine::Matrix3x3::Transpose | ( | ) | const |
Gets the Transpose of this Matrix.
Definition at line 449 of file matrix3x3.cpp.