KudanAR - iOS  1.6.0
OgreMathLib::Matrix3 Class Reference

#include <OgreMathLib.h>

Public Member Functions

 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)
 
void swap (Matrix3 &other)
 
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)
 
Matrix3operator= (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
 
bool hasScale () const
 

Static Public Member Functions

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

Static Public Attributes

static const Real EPSILON = 1e-06f
 
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 = 1e-04f
 
static const unsigned int ms_iSvdMaxIterations = 32
 

Friends

class Matrix4
 
OGREMATHLIB_EXPORT friend Vector3 operator* (const Vector3 &rkVector, const Matrix3 &rkMatrix)
 
OGREMATHLIB_EXPORT friend Matrix3 operator* (Real fScalar, const Matrix3 &rkMatrix)
 
OGREMATHLIB_EXPORT friend std::ostream & operator<< (std::ostream &o, const Matrix3 &mat)
 

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 (https://www.geometrictools.com/).
The coordinate system is assumed to be right-handed.

Constructor & Destructor Documentation

◆ Matrix3()

OgreMathLib::Matrix3::Matrix3 ( )
inline

Default constructor.

Note
It does NOT initialize the matrix for efficiency.

Member Function Documentation

◆ hasScale()

bool OgreMathLib::Matrix3::hasScale ( ) const
inline

Determines if this matrix involves a scaling.

◆ swap()

void OgreMathLib::Matrix3::swap ( Matrix3 other)
inline

Exchange the contents of this matrix with another.

Friends And Related Function Documentation

◆ operator<<

OGREMATHLIB_EXPORT friend std::ostream& operator<< ( std::ostream &  o,
const Matrix3 mat 
)
friend

Function for writing to a stream.


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