# Ogre::Matrix3 Class Reference

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

`#include <OgreMatrix3.h>`

List of all members.

## Public Member Functions

| Matrix3 ()
| Default constructor.
| 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[] (size_t iRow) const
Vector3 | GetColumn (size_t iCol) const
void | SetColumn (size_t 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, Radian &rfAngle) const
void | ToAxisAngle (Vector3 &rkAxis, Degree &rfAngle) const
void | FromAxisAngle (const Vector3 &rkAxis, const Radian &fRadians)
bool | ToEulerAnglesXYZ (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool | ToEulerAnglesXZY (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool | ToEulerAnglesYXZ (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool | ToEulerAnglesYZX (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool | ToEulerAnglesZXY (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool | ToEulerAnglesZYX (Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
void | FromEulerAnglesXYZ (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | FromEulerAnglesXZY (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | FromEulerAnglesYXZ (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | FromEulerAnglesYZX (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | FromEulerAnglesZXY (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | FromEulerAnglesZYX (const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void | EigenSolveSymmetric (Real afEigenvalue[3], Vector3 akEigenvector[3]) const

## Static Public Member Functions

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

## Static Public Attributes

static const Real | EPSILON
static const Matrix3 | ZERO
static const Matrix3 | IDENTITY

## Protected Member Functions

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

## Static Protected Member Functions

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

## Protected Attributes

Real | m [3][3]

## Static Protected Attributes

static const Real | ms_fSvdEpsilon
static const unsigned int | ms_iSvdMaxIterations

## Friends

class | Matrix4
_OgreExport friend Vector3 | operator * (const Vector3 &rkVector, const Matrix3 &rkMatrix)
_OgreExport friend 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.geometrictools.com/).

  The coordinate system is assumed to be right-handed.

Definition at line 63 of file OgreMatrix3.h.

## Constructor & Destructor Documentation

Ogre::Matrix3::Matrix3 | ( |  | ) |

Default constructor.

Note:
  It does NOT initialize the matrix for efficiency.

Definition at line 70 of file OgreMatrix3.h.

Ogre::Matrix3::Matrix3 | ( | const Real | arr[3][3] | ) | `[explicit]`

Definition at line 71 of file OgreMatrix3.h.

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

Definition at line 75 of file OgreMatrix3.h.

References m.

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

Definition at line 79 of file OgreMatrix3.h.

## Member Function Documentation

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

Definition at line 95 of file OgreMatrix3.h.

Vector3 Ogre::Matrix3::GetColumn | ( | size_t | iCol | ) | const

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

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

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

Definition at line 108 of file OgreMatrix3.h.

References m.

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

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

Definition at line 114 of file OgreMatrix3.h.

References Ogre::operator==().

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

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

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

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

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

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

Matrix3 Ogre::Matrix3::Transpose | ( |  | ) | const

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

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

Real Ogre::Matrix3::Determinant | ( |  | ) | const

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

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

void Ogre::Matrix3::Orthonormalize | ( |  | ) |

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

Real Ogre::Matrix3::SpectralNorm | ( |  | ) | const

void Ogre::Matrix3::ToAxisAngle | ( | Vector3 & | rkAxis,
|  | Radian & | rfAngle |
| ) |  |  | const

void Ogre::Matrix3::ToAxisAngle | ( | Vector3 & | rkAxis,
|  | Degree & | rfAngle |
| ) |  |  | const

Definition at line 161 of file OgreMatrix3.h.

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

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

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

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

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

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

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

void Ogre::Matrix3::FromEulerAnglesXYZ | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

void Ogre::Matrix3::FromEulerAnglesXZY | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

void Ogre::Matrix3::FromEulerAnglesYXZ | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

void Ogre::Matrix3::FromEulerAnglesYZX | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

void Ogre::Matrix3::FromEulerAnglesZXY | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

void Ogre::Matrix3::FromEulerAnglesZYX | ( | const Radian & | fYAngle,
|  | const Radian & | fPAngle,
|  | const Radian & | fRAngle |
| ) |  |  |

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

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

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

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

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

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

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

## Friends And Related Function Documentation

friend class Matrix4`[friend]`

Definition at line 303 of file OgreMatrix3.h.

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

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

## Member Data Documentation

const Real Ogre::Matrix3::EPSILON`[static]`

Definition at line 280 of file OgreMatrix3.h.

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

Definition at line 281 of file OgreMatrix3.h.

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

Definition at line 282 of file OgreMatrix3.h.

const Real Ogre::Matrix3::ms_fSvdEpsilon`[static, protected]`

Definition at line 290 of file OgreMatrix3.h.

const unsigned int Ogre::Matrix3::ms_iSvdMaxIterations`[static, protected]`

Definition at line 291 of file OgreMatrix3.h.

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

Definition at line 300 of file OgreMatrix3.h.

Referenced by Ogre::Matrix4::extract3x3Matrix(), Matrix3(), Ogre::Matrix4::operator=(), and operator=().

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

- OgreMatrix3.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat May 10 16:26:41 2008