Go to the documentation of this file.
78 memcpy(m,arr,9*
sizeof(
Real));
82 memcpy(m,rkMatrix.
m,9*
sizeof(
Real));
115 inline const Real* operator[] (
size_t iRow)
const
120 inline Real* operator[] (
size_t iRow)
138 memcpy(m,rkMatrix.
m,9*
sizeof(
Real));
205 ToAngleAxis ( rkAxis, r );
233 Vector3 akEigenvector[3])
const;
242 Real t = m[0][0] * m[0][0] + m[1][0] * m[1][0] + m[2][0] * m[2][0];
245 t = m[0][1] * m[0][1] + m[1][1] * m[1][1] + m[2][1] * m[2][1];
248 t = m[0][2] * m[0][2] + m[1][2] * m[1][2] + m[2][2] * m[2][2];
258 ( std::ostream& o,
const Matrix3& mat )
260 o <<
"Matrix3(" << mat[0][0] <<
", " << mat[0][1] <<
", " << mat[0][2] <<
", "
261 << mat[1][0] <<
", " << mat[1][1] <<
", " << mat[1][2] <<
", "
262 << mat[2][0] <<
", " << mat[2][1] <<
", " << mat[2][2] <<
")";
void ToAngleAxis(Vector3 &rkAxis, Radian &rfAngle) const
Note: Matrix must be orthonormal.
bool ToEulerAnglesYXZ(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool ToEulerAnglesYZX(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
static const Real msSvdEpsilon
static void Bidiagonalize(Matrix3 &kA, Matrix3 &kL, Matrix3 &kR)
Vector3 GetColumn(size_t iCol) const
bool ToEulerAnglesXYZ(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
The matrix must be orthonormal.
static const Real EPSILON
void swap(Matrix3 &other)
Exchange the contents of this matrix with another.
void EigenSolveSymmetric(Real afEigenvalue[3], Vector3 akEigenvector[3]) const
Eigensolver, matrix must be symmetric.
A 3x3 matrix which can represent rotations around axes.
Radian operator*(Real a, const Radian &b)
void FromEulerAnglesXZY(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void Tridiagonal(Real afDiag[3], Real afSubDiag[3])
bool QLAlgorithm(Real afDiag[3], Real afSubDiag[3])
Matrix3(const Real arr[3][3])
Matrix3()
Default constructor.
void Orthonormalize()
Gram-Schmidt orthonormalization (applied to columns of rotation matrix)
static void TensorProduct(const Vector3 &rkU, const Vector3 &rkV, Matrix3 &rkProduct)
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
Matrix3(Real fEntry00, Real fEntry01, Real fEntry02, Real fEntry10, Real fEntry11, Real fEntry12, Real fEntry20, Real fEntry21, Real fEntry22)
Wrapper class which indicates a given angle value is in Degrees.
bool ToEulerAnglesZXY(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
Class encapsulating a standard 4x4 homogeneous matrix.
void FromEulerAnglesZYX(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
Wrapper class which indicates a given angle value is in Radians.
bool hasScale() const
Determines if this matrix involves a scaling.
static const Matrix3 IDENTITY
void FromEulerAnglesZXY(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void SetColumn(size_t iCol, const Vector3 &vec)
Matrix3(const Matrix3 &rkMatrix)
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
static const unsigned int msSvdMaxIterations
void ToAngleAxis(Vector3 &rkAxis, Degree &rfAngle) const
Real SpectralNorm() const
Matrix3 Transpose() const
void QDUDecomposition(Matrix3 &rkQ, Vector3 &rkD, Vector3 &rkU) const
Orthogonal Q, diagonal D, upper triangular U stored as (u01,u02,u12)
void FromAngleAxis(const Vector3 &rkAxis, const Radian &fRadians)
void FromAxes(const Vector3 &xAxis, const Vector3 &yAxis, const Vector3 &zAxis)
float Real
Software floating point type.
bool ToEulerAnglesXZY(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
bool Inverse(Matrix3 &rkInverse, Real fTolerance=1e-06) const
static void GolubKahanStep(Matrix3 &kA, Matrix3 &kL, Matrix3 &kR)
static bool RealEqual(Real a, Real b, Real tolerance=std::numeric_limits< Real >::epsilon())
Compare 2 reals, using tolerance for inaccuracies.
void FromEulerAnglesYXZ(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
void FromEulerAnglesYZX(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
void SingularValueComposition(const Matrix3 &rkL, const Vector3 &rkS, const Matrix3 &rkR)
Matrix3 Inverse(Real fTolerance=1e-06) const
void SingularValueDecomposition(Matrix3 &rkL, Vector3 &rkS, Matrix3 &rkR) const
Singular value decomposition.
Standard 3-dimensional vector.
static const Matrix3 ZERO
void FromEulerAnglesXYZ(const Radian &fYAngle, const Radian &fPAngle, const Radian &fRAngle)
bool ToEulerAnglesZYX(Radian &rfYAngle, Radian &rfPAngle, Radian &rfRAngle) const
static Real MaxCubicRoot(Real afCoeff[3])
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.