78 memcpy(m,arr,9*
sizeof(
Real));
82 memcpy(m,rkMatrix.
m,9*
sizeof(
Real));
115 inline Real* operator[] (
size_t iRow)
const
117 return (
Real*)m[iRow];
123 Vector3 GetColumn (
size_t iCol)
const;
124 void SetColumn(
size_t iCol,
const Vector3& vec);
130 memcpy(m,rkMatrix.
m,9*
sizeof(
Real));
174 bool Inverse (
Matrix3& rkInverse,
Real fTolerance = 1e-06)
const;
176 Real Determinant ()
const;
181 void SingularValueComposition (
const Matrix3& rkL,
185 void Orthonormalize ();
191 Real SpectralNorm ()
const;
197 ToAngleAxis ( rkAxis, r );
200 void FromAngleAxis (
const Vector3& rkAxis,
const Radian& fRadians);
205 bool ToEulerAnglesXYZ (
Radian& rfYAngle,
Radian& rfPAngle,
207 bool ToEulerAnglesXZY (
Radian& rfYAngle,
Radian& rfPAngle,
209 bool ToEulerAnglesYXZ (
Radian& rfYAngle,
Radian& rfPAngle,
211 bool ToEulerAnglesYZX (
Radian& rfYAngle,
Radian& rfPAngle,
213 bool ToEulerAnglesZXY (
Radian& rfYAngle,
Radian& rfPAngle,
215 bool ToEulerAnglesZYX (
Radian& rfYAngle,
Radian& rfPAngle,
217 void FromEulerAnglesXYZ (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
218 void FromEulerAnglesXZY (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
219 void FromEulerAnglesYXZ (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
220 void FromEulerAnglesYZX (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
221 void FromEulerAnglesZXY (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
222 void FromEulerAnglesZYX (
const Radian& fYAngle,
const Radian& fPAngle,
const Radian& fRAngle);
224 void EigenSolveSymmetric (
Real afEigenvalue[3],
225 Vector3 akEigenvector[3])
const;
227 static void TensorProduct (
const Vector3& rkU,
const Vector3& rkV,
234 Real t = m[0][0] * m[0][0] + m[1][0] * m[1][0] + m[2][0] * m[2][0];
237 t = m[0][1] * m[0][1] + m[1][1] * m[1][1] + m[2][1] * m[2][1];
240 t = m[0][2] * m[0][2] + m[1][2] * m[1][2] + m[2][2] * m[2][2];
249 inline _OgreExport friend std::ostream&
operator <<
252 o <<
"Matrix3(" << mat[0][0] <<
", " << mat[0][1] <<
", " << mat[0][2] <<
", "
253 << mat[1][0] <<
", " << mat[1][1] <<
", " << mat[1][2] <<
", "
254 << mat[2][0] <<
", " << mat[2][1] <<
", " << mat[2][2] <<
")";
264 void Tridiagonal (
Real afDiag[3],
Real afSubDiag[3]);
265 bool QLAlgorithm (
Real afDiag[3],
Real afSubDiag[3]);
276 static Real MaxCubicRoot (
Real afCoeff[3]);
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
static const Real msSvdEpsilon
Matrix3(Real fEntry00, Real fEntry01, Real fEntry02, Real fEntry10, Real fEntry11, Real fEntry12, Real fEntry20, Real fEntry21, Real fEntry22)
void swap(Matrix3 &other)
Exchange the contents of this matrix with another.
static const Matrix3 IDENTITY
A 3x3 matrix which can represent rotations around axes.
Radian operator*(Real a, const Radian &b)
static bool RealEqual(Real a, Real b, Real tolerance=std::numeric_limits< Real >::epsilon())
Compare 2 reals, using tolerance for inaccuracies.
Matrix3(const Real arr[3][3])
Matrix3()
Default constructor.
Wrapper class which indicates a given angle value is in Degrees.
bool hasScale() const
Determines if this matrix involves a scaling.
Matrix3(const Matrix3 &rkMatrix)
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Standard 3-dimensional vector.
static const unsigned int msSvdMaxIterations
Wrapper class which indicates a given angle value is in Radians.
static const Matrix3 ZERO
void ToAngleAxis(Vector3 &rkAxis, Degree &rfAngle) const
static const Real EPSILON
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)