Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::Matrix3 Class Reference

A 3x3 matrix which can represent rotations around axes. More...

#include <OgreMatrix3.h>

List of all members.

Public Methods

 Matrix3 ()
 Matrix3 (const Real arr[3][3])
 Matrix3 (const Matrix3 &rkMatrix)
 Matrix3 (Real fEntry00, Real fEntry01, Real fEntry02, Real fEntry10, Real fEntry11, Real fEntry12, Real fEntry20, Real fEntry21, Real fEntry22)
Real * operator[] (int iRow) const
 operator Real * ()
Vector3 GetColumn (int iCol) const
void SetColumn (int iCol, const Vector3 &vec)
void FromAxes (const Vector3 &xAxis, const Vector3 &yAxis, const Vector3 &zAxis)
Matrix3 & operator= (const Matrix3 &rkMatrix)
bool operator== (const Matrix3 &rkMatrix) const
bool operator!= (const Matrix3 &rkMatrix) const
Matrix3 operator+ (const Matrix3 &rkMatrix) const
Matrix3 operator- (const Matrix3 &rkMatrix) const
Matrix3 operator * (const Matrix3 &rkMatrix) const
Matrix3 operator- () const
Vector3 operator * (const Vector3 &rkVector) const
Matrix3 operator * (Real fScalar) const
Matrix3 Transpose () const
bool Inverse (Matrix3 &rkInverse, Real fTolerance=1e-06) const
Matrix3 Inverse (Real fTolerance=1e-06) const
Real Determinant () const
void SingularValueDecomposition (Matrix3 &rkL, Vector3 &rkS, Matrix3 &rkR) const
void SingularValueComposition (const Matrix3 &rkL, const Vector3 &rkS, const Matrix3 &rkR)
void Orthonormalize ()
void QDUDecomposition (Matrix3 &rkQ, Vector3 &rkD, Vector3 &rkU) const
Real SpectralNorm () const
void ToAxisAngle (Vector3 &rkAxis, Real &rfRadians) const
void FromAxisAngle (const Vector3 &rkAxis, Real fRadians)
bool ToEulerAnglesXYZ (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
bool ToEulerAnglesXZY (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
bool ToEulerAnglesYXZ (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
bool ToEulerAnglesYZX (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
bool ToEulerAnglesZXY (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
bool ToEulerAnglesZYX (float &rfYAngle, float &rfPAngle, float &rfRAngle) const
void FromEulerAnglesXYZ (float fYAngle, float fPAngle, float fRAngle)
void FromEulerAnglesXZY (float fYAngle, float fPAngle, float fRAngle)
void FromEulerAnglesYXZ (float fYAngle, float fPAngle, float fRAngle)
void FromEulerAnglesYZX (float fYAngle, float fPAngle, float fRAngle)
void FromEulerAnglesZXY (float fYAngle, float fPAngle, float fRAngle)
void FromEulerAnglesZYX (float fYAngle, float fPAngle, float fRAngle)
void EigenSolveSymmetric (Real afEigenvalue[3], Vector3 akEigenvector[3]) const

Static Public Methods

void TensorProduct (const Vector3 &rkU, const Vector3 &rkV, Matrix3 &rkProduct)

Static Public Attributes

const Real EPSILON = 1e-06
const Matrix3 ZERO
const Matrix3 IDENTITY

Protected Methods

void Tridiagonal (Real afDiag[3], Real afSubDiag[3])
bool QLAlgorithm (Real afDiag[3], Real afSubDiag[3])

Static Protected Methods

void Bidiagonalize (Matrix3 &kA, Matrix3 &kL, Matrix3 &kR)
void GolubKahanStep (Matrix3 &kA, Matrix3 &kL, Matrix3 &kR)
Real MaxCubicRoot (Real afCoeff[3])

Protected Attributes

Real m [3][3]

Static Protected Attributes

const Real ms_fSvdEpsilon = 1e-04
const int ms_iSvdMaxIterations = 32

Friends

class Matrix4
Vector3 operator * (const Vector3 &rkVector, const Matrix3 &rkMatrix)
Matrix3 operator * (Real fScalar, const Matrix3 &rkMatrix)


Detailed Description

A 3x3 matrix which can represent rotations around axes.

Note:
All the code is adapted from the Wild Magic 0.2 Matrix library (http://www.magic-software.com).

The coordinate system is assumed to be right-handed.


Constructor & Destructor Documentation

Ogre::Matrix3::Matrix3 (    ) 
 

Ogre::Matrix3::Matrix3 (  const Real    arr[3][3] ) 
 

Ogre::Matrix3::Matrix3 (  const Matrix3 &    rkMatrix ) 
 

Ogre::Matrix3::Matrix3 (  Real    fEntry00,
Real    fEntry01,
Real    fEntry02,
Real    fEntry10,
Real    fEntry11,
Real    fEntry12,
Real    fEntry20,
Real    fEntry21,
Real    fEntry22
) 
 


Member Function Documentation

void Ogre::Matrix3::Bidiagonalize (  Matrix3 &    kA,
Matrix3 &    kL,
Matrix3 &    kR
)  [static, protected]
 

Real Ogre::Matrix3::Determinant (    )  const
 

void Ogre::Matrix3::EigenSolveSymmetric (  Real    afEigenvalue[3],
Vector3    akEigenvector[3]
)  const
 

void Ogre::Matrix3::FromAxes (  const Vector3 &    xAxis,
const Vector3 &    yAxis,
const Vector3 &    zAxis
) 
 

void Ogre::Matrix3::FromAxisAngle (  const Vector3 &    rkAxis,
Real    fRadians
) 
 

void Ogre::Matrix3::FromEulerAnglesXYZ (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

void Ogre::Matrix3::FromEulerAnglesXZY (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

void Ogre::Matrix3::FromEulerAnglesYXZ (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

void Ogre::Matrix3::FromEulerAnglesYZX (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

void Ogre::Matrix3::FromEulerAnglesZXY (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

void Ogre::Matrix3::FromEulerAnglesZYX (  float    fYAngle,
float    fPAngle,
float    fRAngle
) 
 

Vector3 Ogre::Matrix3::GetColumn (  int    iCol )  const
 

void Ogre::Matrix3::GolubKahanStep (  Matrix3 &    kA,
Matrix3 &    kL,
Matrix3 &    kR
)  [static, protected]
 

Matrix3 Ogre::Matrix3::Inverse (  Real    fTolerance = 1e-06 )  const
 

bool Ogre::Matrix3::Inverse (  Matrix3 &    rkInverse,
Real    fTolerance = 1e-06
)  const
 

Real Ogre::Matrix3::MaxCubicRoot (  Real    afCoeff[3] )  [static, protected]
 

Matrix3 Ogre::Matrix3::operator * (  Real    fScalar )  const
 

Vector3 Ogre::Matrix3::operator * (  const Vector3 &    rkVector )  const
 

Matrix3 Ogre::Matrix3::operator * (  const Matrix3 &    rkMatrix )  const
 

Ogre::Matrix3::operator Real * (    ) 
 

bool Ogre::Matrix3::operator!= (  const Matrix3 &    rkMatrix )  const
 

Matrix3 Ogre::Matrix3::operator+ (  const Matrix3 &    rkMatrix )  const
 

Matrix3 Ogre::Matrix3::operator- (    )  const
 

Matrix3 Ogre::Matrix3::operator- (  const Matrix3 &    rkMatrix )  const
 

Matrix3 & Ogre::Matrix3::operator= (  const Matrix3 &    rkMatrix ) 
 

bool Ogre::Matrix3::operator== (  const Matrix3 &    rkMatrix )  const
 

Real * Ogre::Matrix3::operator[] (  int    iRow )  const
 

void Ogre::Matrix3::Orthonormalize (    ) 
 

void Ogre::Matrix3::QDUDecomposition (  Matrix3 &    rkQ,
Vector3 &    rkD,
Vector3 &    rkU
)  const
 

bool Ogre::Matrix3::QLAlgorithm (  Real    afDiag[3],
Real    afSubDiag[3]
)  [protected]
 

void Ogre::Matrix3::SetColumn (  int    iCol,
const Vector3 &    vec
) 
 

void Ogre::Matrix3::SingularValueComposition (  const Matrix3 &    rkL,
const Vector3 &    rkS,
const Matrix3 &    rkR
) 
 

void Ogre::Matrix3::SingularValueDecomposition (  Matrix3 &    rkL,
Vector3 &    rkS,
Matrix3 &    rkR
)  const
 

Real Ogre::Matrix3::SpectralNorm (    )  const
 

void Ogre::Matrix3::TensorProduct (  const Vector3 &    rkU,
const Vector3 &    rkV,
Matrix3 &    rkProduct
)  [static]
 

void Ogre::Matrix3::ToAxisAngle (  Vector3 &    rkAxis,
Real &    rfRadians
)  const
 

bool Ogre::Matrix3::ToEulerAnglesXYZ (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

bool Ogre::Matrix3::ToEulerAnglesXZY (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

bool Ogre::Matrix3::ToEulerAnglesYXZ (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

bool Ogre::Matrix3::ToEulerAnglesYZX (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

bool Ogre::Matrix3::ToEulerAnglesZXY (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

bool Ogre::Matrix3::ToEulerAnglesZYX (  float &    rfYAngle,
float &    rfPAngle,
float &    rfRAngle
)  const
 

Matrix3 Ogre::Matrix3::Transpose (    )  const
 

void Ogre::Matrix3::Tridiagonal (  Real    afDiag[3],
Real    afSubDiag[3]
)  [protected]
 


Friends And Related Function Documentation

friend class Matrix4 [friend]
 

Matrix3 operator * (  Real    fScalar,
const Matrix3 &    rkMatrix
)  [friend]
 

Vector3 operator * (  const Vector3 &    rkVector,
const Matrix3 &    rkMatrix
)  [friend]
 


Member Data Documentation

const Real Ogre::Matrix3::EPSILON = 1e-06 [static]
 

const Matrix3 Ogre::Matrix3::IDENTITY [static]
 

Real Ogre::Matrix3::m[3][3] [protected]
 

const Real Ogre::Matrix3::ms_fSvdEpsilon = 1e-04 [static, protected]
 

const int Ogre::Matrix3::ms_iSvdMaxIterations = 32 [static, protected]
 

const Matrix3 Ogre::Matrix3::ZERO [static]
 

Copyright © 2002 by The OGRE Team