![]() |
TrinityCore
|
#include <Matrix3.h>
Public Member Functions | |
| Matrix3 (const Any &any) | |
| Any | toAny () const |
| Matrix3 () | |
| Matrix3 (class BinaryInput &b) | |
| Matrix3 (const float aafEntry[3][3]) | |
| Matrix3 (const Matrix3 &rkMatrix) | |
| Matrix3 (float fEntry00, float fEntry01, float fEntry02, float fEntry10, float fEntry11, float fEntry12, float fEntry20, float fEntry21, float fEntry22) | |
| bool | fuzzyEq (const Matrix3 &b) const |
| Matrix3 (const class Quat &q) | |
| void | serialize (class BinaryOutput &b) const |
| void | deserialize (class BinaryInput &b) |
| bool | isRightHanded () const |
| void | set (float fEntry00, float fEntry01, float fEntry02, float fEntry10, float fEntry11, float fEntry12, float fEntry20, float fEntry21, float fEntry22) |
| float * | operator[] (int iRow) |
| const float * | operator[] (int iRow) const |
| operator float * () | |
| operator const float * () const | |
| Vector3 | column (int c) const |
| const Vector3 & | row (int r) const |
| void | setColumn (int iCol, const Vector3 &vector) |
| void | setRow (int iRow, const Vector3 &vector) |
| 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 |
| Matrix3 & | operator+= (const Matrix3 &rkMatrix) |
| Matrix3 & | operator-= (const Matrix3 &rkMatrix) |
| Matrix3 & | operator*= (const Matrix3 &rkMatrix) |
| Vector3 | operator* (const Vector3 &v) const |
| Matrix3 | operator* (float fScalar) const |
| Matrix3 & | operator*= (float k) |
| Matrix3 & | operator/= (float k) |
| bool | isOrthonormal () const |
| Matrix3 | transpose () const |
| bool | inverse (Matrix3 &rkInverse, float fTolerance=1e-06f) const |
| Matrix3 | inverse (float fTolerance=1e-06f) const |
| float | 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 |
| void | polarDecomposition (Matrix3 &R, Matrix3 &S) const |
| float | spectralNorm () const |
| float | squaredFrobeniusNorm () const |
| float | frobeniusNorm () const |
| float | l1Norm () const |
| float | lInfNorm () const |
| float | diffOneNorm (const Matrix3 &y) const |
| void | toAxisAngle (Vector3 &rkAxis, float &rfRadians) const |
| 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 | eigenSolveSymmetric (float afEigenvalue[3], Vector3 akEigenvector[3]) const |
| std::string | toString () const |
Static Public Member Functions | |
| static Matrix3 | fromColumns (const Vector3 &c0, const Vector3 &c1, const Vector3 &c2) |
| static Matrix3 | fromRows (const Vector3 &r0, const Vector3 &r1, const Vector3 &r2) |
| static Matrix3 | diagonal (float e00, float e11, float e22) |
| static void | mul (const Matrix3 &A, const Matrix3 &B, Matrix3 &out) |
| static void | transpose (const Matrix3 &A, Matrix3 &out) |
| static Matrix3 | fromDiagonal (const Vector3 &d) |
| static Matrix3 | fromAxisAngle (const Vector3 &rkAxis, float fRadians) |
| static Matrix3 | fromUnitAxisAngle (const Vector3 &rkAxis, float fRadians) |
| static Matrix3 | fromEulerAnglesXYZ (float fYAngle, float fPAngle, float fRAngle) |
| static Matrix3 | fromEulerAnglesXZY (float fYAngle, float fPAngle, float fRAngle) |
| static Matrix3 | fromEulerAnglesYXZ (float fYAngle, float fPAngle, float fRAngle) |
| static Matrix3 | fromEulerAnglesYZX (float fYAngle, float fPAngle, float fRAngle) |
| static Matrix3 | fromEulerAnglesZXY (float fYAngle, float fPAngle, float fRAngle) |
| static Matrix3 | fromEulerAnglesZYX (float fYAngle, float fPAngle, float fRAngle) |
| static void | tensorProduct (const Vector3 &rkU, const Vector3 &rkV, Matrix3 &rkProduct) |
| static const Matrix3 & | zero () |
| static const Matrix3 & | identity () |
Static Public Attributes | |
| static const float | EPSILON = 1e-06f |
Protected Member Functions | |
| void | tridiagonal (float afDiag[3], float afSubDiag[3]) |
| bool | qLAlgorithm (float afDiag[3], float 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 float | maxCubicRoot (float afCoeff[3]) |
Static Protected Attributes | |
| static const float | ms_fSvdEpsilon = 1e-04f |
| static const int | ms_iSvdMaxIterations = 32 |
Private Member Functions | |
| bool | operator< (const Matrix3 &) const |
| bool | operator> (const Matrix3 &) const |
| bool | operator<= (const Matrix3 &) const |
| bool | operator>= (const Matrix3 &) const |
Static Private Member Functions | |
| static void | _mul (const Matrix3 &A, const Matrix3 &B, Matrix3 &out) |
| static void | _transpose (const Matrix3 &A, Matrix3 &out) |
Private Attributes | |
| float | elt [3][3] |
Friends | |
| Vector3 | operator* (const Vector3 &rkVector, const Matrix3 &rkMatrix) |
| Matrix3 | operator* (double fScalar, const Matrix3 &rkMatrix) |
| Matrix3 | operator* (float fScalar, const Matrix3 &rkMatrix) |
| Matrix3 | operator* (int fScalar, const Matrix3 &rkMatrix) |
A 3x3 matrix. Do not subclass. Data is unitializd when default constructed.
Must be in one of the following forms:
Here is the call graph for this function:
|
inline |
Initial values are undefined for performance.
Here is the caller graph for this function:| G3D::Matrix3::Matrix3 | ( | class BinaryInput & | b | ) |
Here is the call graph for this function:| G3D::Matrix3::Matrix3 | ( | const float | aafEntry[3][3] | ) |
| G3D::Matrix3::Matrix3 | ( | float | fEntry00, |
| float | fEntry01, | ||
| float | fEntry02, | ||
| float | fEntry10, | ||
| float | fEntry11, | ||
| float | fEntry12, | ||
| float | fEntry20, | ||
| float | fEntry21, | ||
| float | fEntry22 | ||
| ) |
Here is the call graph for this function:Constructs a matrix from a quaternion. [Graphics] Gems II, p. 351–354 [Implementation] from Watt and Watt, pg 362
Multiplication where out != A and out != B
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| Vector3 G3D::Matrix3::column | ( | int | c | ) | const |
Here is the caller graph for this function:| void G3D::Matrix3::deserialize | ( | class BinaryInput & | b | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| float G3D::Matrix3::determinant | ( | ) | const |
Here is the caller graph for this function:
|
inlinestatic |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:| void G3D::Matrix3::eigenSolveSymmetric | ( | float | afEigenvalue[3], |
| Vector3 | akEigenvector[3] | ||
| ) | const |
eigensolver, matrix must be symmetric
Here is the call graph for this function:| float G3D::Matrix3::frobeniusNorm | ( | ) | const |
Here is the call graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Here is the call graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
|
static |
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Here is the caller graph for this function:
|
inlinestatic |
Assumes that rkAxis has unit length
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| Matrix3 G3D::Matrix3::inverse | ( | float | fTolerance = 1e-06f | ) | const |
Here is the call graph for this function:| bool G3D::Matrix3::isOrthonormal | ( | ) | const |
Returns true if the rows and column L2 norms are 1.0 and the rows are orthogonal.
Here is the call graph for this function:| bool G3D::Matrix3::isRightHanded | ( | ) | const |
Returns true if column(0).cross(column(1)).dot(column(2)) > 0.
Here is the call graph for this function:| float G3D::Matrix3::l1Norm | ( | ) | const |
Here is the caller graph for this function:| float G3D::Matrix3::lInfNorm | ( | ) | const |
Here is the caller graph for this function:
|
staticprotected |
Here is the call graph for this function:
Here is the caller graph for this function:Optimized implementation of out = A * B. It is safe (but slow) to call with A, B, and out possibly pointer equal to one another.
Here is the call graph for this function:
|
inline |
|
inline |
Here is the call graph for this function:Matrix-matrix multiply
matrix * vector [3x3 * 3x1 = 3x1]
| Matrix3 G3D::Matrix3::operator* | ( | float | fScalar | ) | const |
matrix * scalar
| Matrix3 & G3D::Matrix3::operator*= | ( | float | k | ) |
| Matrix3 G3D::Matrix3::operator- | ( | ) | const |
| Matrix3 & G3D::Matrix3::operator/= | ( | float | k | ) |
Here is the caller graph for this function:
|
inline |
Member access, allows use of construct mat[r][c]
|
inline |
| void G3D::Matrix3::orthonormalize | ( | ) |
Gram-Schmidt orthonormalization (applied to columns of rotation matrix)
Here is the caller graph for this function:Polar decomposition of a matrix. Based on pseudocode from Nicholas J Higham, "Computing the Polar Decomposition – with Applications Siam Journal of Science and Statistical Computing, Vol 7, No. 4, October 1986.
Decomposes A into R*S, where R is orthogonal and S is symmetric.
Ken Shoemake's "Matrix animation and polar decomposition" in Proceedings of the conference on Graphics interface '92 seems to be better known in the world of graphics, but Higham's version uses a scaling constant that can lead to faster convergence than Shoemake's when the initial matrix is far from orthogonal.
Here is the call graph for this function:orthogonal Q, diagonal D, upper triangular U stored as (u01,u02,u12)
|
protected |
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Matrix3::serialize | ( | class BinaryOutput & | b | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Matrix3::set | ( | float | fEntry00, |
| float | fEntry01, | ||
| float | fEntry02, | ||
| float | fEntry10, | ||
| float | fEntry11, | ||
| float | fEntry12, | ||
| float | fEntry20, | ||
| float | fEntry21, | ||
| float | fEntry22 | ||
| ) |
Sets all elements.
Here is the caller graph for this function:
Here is the caller graph for this function:| void G3D::Matrix3::singularValueComposition | ( | const Matrix3 & | rkL, |
| const Vector3 & | rkS, | ||
| const Matrix3 & | rkR | ||
| ) |
singular value decomposition
singular value decomposition
Here is the call graph for this function:| float G3D::Matrix3::spectralNorm | ( | ) | const |
| float G3D::Matrix3::squaredFrobeniusNorm | ( | ) | const |
Here is the caller graph for this function:| Any G3D::Matrix3::toAny | ( | ) | const |
Here is the call graph for this function:| void G3D::Matrix3::toAxisAngle | ( | Vector3 & | rkAxis, |
| float & | rfRadians | ||
| ) | const |
matrix must be orthonormal
Here is the call graph for this function:| bool G3D::Matrix3::toEulerAnglesXYZ | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
The matrix must be orthonormal. The decomposition is yaw*pitch*roll where yaw is rotation about the Up vector, pitch is rotation about the right axis, and roll is rotation about the Direction axis.
Here is the call graph for this function:| bool G3D::Matrix3::toEulerAnglesXZY | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
Here is the call graph for this function:| bool G3D::Matrix3::toEulerAnglesYXZ | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| bool G3D::Matrix3::toEulerAnglesYZX | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
Here is the call graph for this function:| bool G3D::Matrix3::toEulerAnglesZXY | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
Here is the call graph for this function:| bool G3D::Matrix3::toEulerAnglesZYX | ( | float & | rfYAngle, |
| float & | rfPAngle, | ||
| float & | rfRAngle | ||
| ) | const |
Here is the call graph for this function:| std::string G3D::Matrix3::toString | ( | ) | const |
Here is the call graph for this function:Optimized implementation of out = A.transpose(). It is safe (but slow) to call with A and out possibly pointer equal to one another.
Note that A.transpose() * v can be computed more efficiently as v * A.
Here is the call graph for this function:
Here is the caller graph for this function:| Matrix3 G3D::Matrix3::transpose | ( | ) | const |
|
protected |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:scalar * matrix
|
private |
|
static |
|
staticprotected |
|
staticprotected |
1.8.8