#include <OSGMatrix.h>
Inheritance diagram for osg::TransformationMatrix< ValueTypeT >:


Internal Math | |
| ValueTypeT | rowMulCol4 (const TransformationMatrix &gRowMat, UInt32 iRow, const TransformationMatrix &gColMat, UInt32 iColumn) const |
| ValueTypeT | det2 (const ValueTypeT a1, const ValueTypeT a2, const ValueTypeT b1, const ValueTypeT b2) const |
| ValueTypeT | det3 (const ValueTypeT a1, const ValueTypeT a2, const ValueTypeT a3, const ValueTypeT b1, const ValueTypeT b2, const ValueTypeT b3, const ValueTypeT c1, const ValueTypeT c2, const ValueTypeT c3) const |
| bool | jacobi (ValueTypeT evalues[JacobiRank], VectorType3f evectors[JacobiRank], Int32 &rots) |
| const UInt32 | JacobiRank = 3 |
Public Types | |
Types | |
| typedef ValueTypeT | ValueType |
| Value type, eg Real32. | |
| typedef VectorInterface< ValueTypeT, VecStorage4< ValueTypeT > > | VectorType |
| Matrix vector type, eg Vec4f. | |
| typedef QuaternionBase< ValueType > | QuaternionType |
| Matrix quaternion type. | |
| typedef VectorInterface< ValueTypeT, VecStorage3< ValueTypeT > > | VectorType3f |
| Matrix vec3f type. | |
| typedef PointInterface< ValueTypeT, VecStorage3< ValueTypeT > > | PointType3f |
| Matrix pnt3f type. | |
Public Methods | |
Constructors | |
| TransformationMatrix (void) | |
| TransformationMatrix (const TransformationMatrix &source) | |
| TransformationMatrix (const VectorType3f &vector1, const VectorType3f &vector2, const VectorType3f &vector3) | |
| TransformationMatrix (const VectorType3f &vector1, const VectorType3f &vector2, const VectorType3f &vector3, const VectorType3f &vector4) | |
| TransformationMatrix (const ValueTypeT rVal00, const ValueTypeT rVal10, const ValueTypeT rVal20, const ValueTypeT rVal30, const ValueTypeT rVal01, const ValueTypeT rVal11, const ValueTypeT rVal21, const ValueTypeT rVal31, const ValueTypeT rVal02, const ValueTypeT rVal12, const ValueTypeT rVal22, const ValueTypeT rVal32, const ValueTypeT rVal03, const ValueTypeT rVal13, const ValueTypeT rVal23, const ValueTypeT rVal33) | |
Destructor | |
| ~TransformationMatrix (void) | |
Set | |
| void | setIdentity (void) |
| void | setValue (const TransformationMatrix &mat) |
| void | setValue (const VectorType3f &vector1, const VectorType3f &vector2, const VectorType3f &vector3) |
| void | setValue (const VectorType3f &vector1, const VectorType3f &vector2, const VectorType3f &vector3, const VectorType3f &vector4) |
| void | setValue (const ValueTypeT rVal00, const ValueTypeT rVal10, const ValueTypeT rVal20, const ValueTypeT rVal30, const ValueTypeT rVal01, const ValueTypeT rVal11, const ValueTypeT rVal21, const ValueTypeT rVal31, const ValueTypeT rVal02, const ValueTypeT rVal12, const ValueTypeT rVal22, const ValueTypeT rVal32, const ValueTypeT rVal03, const ValueTypeT rVal13, const ValueTypeT rVal23, const ValueTypeT rVal33) |
| void | setValueTransposed (const ValueTypeT rVal00, const ValueTypeT rVal01, const ValueTypeT rVal02, const ValueTypeT rVal03, const ValueTypeT rVal10, const ValueTypeT rVal11, const ValueTypeT rVal12, const ValueTypeT rVal13, const ValueTypeT rVal20, const ValueTypeT rVal21, const ValueTypeT rVal22, const ValueTypeT rVal23, const ValueTypeT rVal30, const ValueTypeT rVal31, const ValueTypeT rVal32, const ValueTypeT rVal33) |
| void | setValue (const ValueTypeT *pMat, bool bTransposed=true) |
| Set value from an ValueTypeT array, be shure the sizes match. | |
| void | setValue (const VectorType *pMat) |
| Set value from an VectorTypeT array, be shure the sizes match. | |
| void | setValue (const VectorType3f *pMat) |
| Set value from an VectorType3f array, be shure the sizes match. | |
| void | setValue (const Char8 *string, bool bTransposed=true) |
| Set matrix by a given str (like "1.0 0.0 0.0 0.0 ... (16 entries at all)"), be shure the size matches. | |
Get | |
| ValueTypeT * | getValues (void) |
| Returns an C++ pointer to the value store. | |
| const ValueTypeT * | getValues (void) const |
| Returns an C++ pointer to the value store. | |
Set Transformations | |
| void | setScale (const ValueTypeT s) |
| Sets matrix to scale by given uniform factor. | |
| void | setScale (const ValueTypeT sx, const ValueTypeT sy, const ValueTypeT sz) |
| Sets matrix to scale by given uniform factor. | |
| void | setScale (const VectorType3f &s) |
| Sets matrix to scale by given vector. | |
| void | setTranslate (const ValueTypeT tx, const ValueTypeT ty, const ValueTypeT tz) |
| Sets matrix to translate by given values. | |
| void | setTranslate (const VectorType3f &t) |
| Sets matrix to translate by given vector. | |
| void | setTranslate (const PointType3f &t) |
| Sets matrix to translate by given point. | |
| void | setRotate (const QuaternionType &q) |
| Sets matrix to rotate by given rotation. | |
| void | setTransform (const VectorType3f &t) |
| Composes the matrix based on a translation. | |
| void | setTransform (const QuaternionType &r) |
| Composes the matrix based on a rotation. | |
| void | setTransform (const VectorType3f &t, const QuaternionType &r) |
| Composes the matrix based on a translation and rotation. | |
| void | setTransform (const VectorType3f &t, const QuaternionType &r, const VectorType3f &s) |
| Composes the matrix based on a translation, rotation and scale. | |
| void | setTransform (const VectorType3f &t, const QuaternionType &r, const VectorType3f &s, const QuaternionType &so) |
| Composes the matrix based on a translation, rotation, scale and orientation. | |
| void | setTransform (const VectorType3f &translation, const QuaternionType &rotation, const VectorType3f &scaleFactor, const QuaternionType &scaleOrientation, const VectorType3f ¢er) |
Get Transformations | |
| void | getTransform (VectorType3f &translation, QuaternionType &rotation, VectorType3f &scaleFactor, QuaternionType &scaleOrientation, const VectorType3f ¢er) const |
| Decomposes the matrix into a translation, rotation, scale, and scale orientation. Any projection information is discarded. The decomposition depends upon choice of center point for rotation and scaling, which is optional as the last parameter. Note that if the center is 0, decompose() is the same as factor() where "t" is translation, "u" is rotation, "s" is scaleFactor, and "r" is ScaleOrientattion. | |
| void | getTransform (VectorType3f &translation, QuaternionType &rotation, VectorType3f &scaleFactor, QuaternionType &scaleOrientation) const |
| Decomposes the matrix into a translation, rotation and scale. | |
| bool | factor (TransformationMatrix &r, VectorType3f &s, TransformationMatrix &u, VectorType3f &t, TransformationMatrix &proj) const |
| Factors a matrix m into 5 pieces: m = r s rt u t, where rt means transpose of r, and r and u are rotations, s is a scale, and t is a translation. Any projection information is returned in proj. | |
Transform | |
| void | multMatrixPnt (const PointType3f &src, PointType3f &dst) const |
| Multiplies matrix by given column point, where the resulting point is given. | |
| void | multMatrixPnt (PointType3f &pnt) const |
| Multiplies matrix by given column point. | |
| void | multFullMatrixPnt (const PointType3f &src, PointType3f &dst) const |
| Multiplies matrix by given column point, where the resulting point is given. The full (4x4) matrix is used. | |
| void | multFullMatrixPnt (PointType3f &pnt) const |
| Multiplies matrix by given column point. The full (4x4) matrix is used. | |
| void | multMatrixVec (const VectorType3f &src, VectorType3f &dst) const |
| Multiplies matrix by given column vector, where the resulting vector is given. | |
| void | multMatrixVec (VectorType3f &vec) const |
| Multiplies matrix by given column vector. | |
| void | mult (const PointType3f &src, PointType3f &dst) const |
| Transforms the given point by the matrix and stores the result in dest. | |
| void | mult (PointType3f &vec) const |
| Transforms the given point by the matrix. | |
| void | mult (const VectorType3f &src, VectorType3f &dst) const |
| Transforms the given vector by the matrix and stores the result in dest. | |
| void | mult (VectorType3f &vec) const |
| Transforms the given vector by the matrix. | |
| void | multPntMatrix (const PointType3f &src, PointType3f &dst) const |
| Multiplies given row point by matrix, where the resulting point is given (pT * M). | |
| void | multPntMatrix (PointType3f &pnt) const |
| Multiplies given row point by matrix (pT * M). | |
| void | multPntFullMatrix (const PointType3f &src, PointType3f &dst) const |
| Multiplies given row point by matrix, where the resulting point is given. The full (4x4) matrix is used (pT * M). | |
| void | multPntFullMatrix (PointType3f &pnt) const |
| Multiplies given row point by matrix. The full (4x4) matrix is used (pT*M). | |
| void | multVecMatrix (const VectorType3f &src, VectorType3f &dst) const |
| Multiplies given row vector by matrix, where the resulting vector is given (vT * M). | |
| void | multVecMatrix (VectorType3f &vec) const |
| Multiplies given row vector by matrix. | |
Math | |
| bool | equals (const TransformationMatrix &matrix, const ValueType tol) const |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| ValueTypeT | det3 (void) const |
| Returns the determinat of the upper 3x3 submatrix. | |
| ValueTypeT | det (void) const |
| Returns the determinat of the whole 4x4 matrix. | |
| bool | inverse (TransformationMatrix &result) const |
| Stores the inverse of the matrix into result, returns true if the matrix is not singular. | |
| bool | invert (void) |
| Inverts the matrix, returns true if the matrix is not singular. | |
| bool | invertFrom (const TransformationMatrix &matrix) |
| Set the matrix to be the inverse of the given one, returns true if the matrix is not singular. | |
| bool | inverse3 (TransformationMatrix &result) const |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| bool | invert3 (void) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| bool | invertFrom3 (const TransformationMatrix &matrix) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| bool | transposed (TransformationMatrix &result) const |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| bool | transpose (void) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| bool | transposeFrom (const TransformationMatrix &matrix) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| void | mult (const TransformationMatrix &matrix) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| void | multLeft (const TransformationMatrix &matrix) |
| Returns true iff all matrix elements are equal within the given tolerance. | |
| void | add (const TransformationMatrix &matrix) |
| Adds the given matrix to this matrix. | |
| void | scale (ValueTypeT s) |
| Scales the elements of this matrix. | |
| void | addScaled (const TransformationMatrix &matrix, ValueTypeT s) |
| Adds a scaled version of the given matrix to this matrix. | |
| void | negate (void) |
| Negates the matrix in place. | |
| ValueTypeT | norm1 (void) const |
| Returns the 1-norm of _matrix matrix. | |
| ValueTypeT | norm2 (void) const |
| Returns the 2-norm of this matrix. | |
| ValueTypeT | normInfinity (void) const |
| Returns the infinity norm of this matrix. | |
| bool | sqrt (TransformationMatrix &result) const |
| Computes the square root of the matrix and stores it in result, assumes det > 0. | |
| bool | sqrtOf (const TransformationMatrix &matrix) |
| Sets this matrix to the square root of the given matrix, assumes det > 0. | |
| bool | sqrt (void) |
| Sets this matrix to its square root, assumes det > 0. | |
| bool | log (TransformationMatrix &result) const |
| Computes the logarithm of this matrix and stores it in result, assumes det > 0. | |
| bool | logOf (const TransformationMatrix &matrix) |
| Sets this matrix to the logarithm of the given matrix, assumes det > 0. | |
| bool | exp (TransformationMatrix &result) const |
| Computes the exponential of this matrix and stores it in result. | |
| bool | expOf (const TransformationMatrix &matrix) |
| Sets this matrix to the exponential of the given matrix. | |
Element Access | |
| VectorType & | operator[] (UInt32 uiIndex) |
| const VectorType & | operator[] (UInt32 uiIndex) const |
Assignment | |
| TransformationMatrix & | operator= (const TransformationMatrix &source) |
Comparison | |
| bool | operator== (const TransformationMatrix &other) const |
| equal, returns true if all matrix elements are equal with the tolerance of Eps | |
| bool | operator!= (const TransformationMatrix &other) const |
| not equal, returns true if all matrix elements are not equal with the tolerance of Eps | |
Static Public Methods | |
Class Get | |
| const TransformationMatrix & | identity (void) |
Protected Attributes | |
Storage | |
| VectorType | _matrix [4] |
| Value store. | |
Static Private Attributes | |
| TransformationMatrix | _identityMatrix |
|
|||||
|
Value type, eg Real32.
|
|
|||||
|
|
|
|||||
|
Matrix quaternion type.
|
|
|||||
|
Matrix vec3f type.
|
|
|||||
|
Matrix pnt3f type.
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
Set value from an ValueTypeT array, be shure the sizes match.
|
|
||||||||||
|
Set value from an VectorTypeT array, be shure the sizes match.
|
|
||||||||||
|
Set value from an VectorType3f array, be shure the sizes match.
|
|
||||||||||||||||
|
Set matrix by a given str (like "1.0 0.0 0.0 0.0 ... (16 entries at all)"), be shure the size matches.
|
|
||||||||||
|
Returns an C++ pointer to the value store.
|
|
||||||||||
|
Returns an C++ pointer to the value store.
|
|
||||||||||
|
Sets matrix to scale by given uniform factor.
|
|
||||||||||||||||||||
|
Sets matrix to scale by given uniform factor.
|
|
||||||||||
|
Sets matrix to scale by given vector.
|
|
||||||||||||||||||||
|
Sets matrix to translate by given values.
|
|
||||||||||
|
Sets matrix to translate by given vector.
|
|
||||||||||
|
Sets matrix to translate by given point.
|
|
||||||||||
|
Sets matrix to rotate by given rotation.
|
|
||||||||||
|
Composes the matrix based on a translation.
|
|
||||||||||
|
Composes the matrix based on a rotation.
|
|
||||||||||||||||
|
Composes the matrix based on a translation and rotation.
|
|
||||||||||||||||||||
|
Composes the matrix based on a translation, rotation and scale.
|
|
||||||||||||||||||||||||
|
Composes the matrix based on a translation, rotation, scale and orientation.
|
|
||||||||||||||||||||||||||||
|
Composes the matrix based on a translation, rotation, scale, orientation for scale, and center. The "center" is the center point for scaling and rotation. The "scaleOrientation" chooses the primary axes for the scale. |
|
||||||||||||||||||||||||||||
|
Decomposes the matrix into a translation, rotation, scale, and scale orientation. Any projection information is discarded. The decomposition depends upon choice of center point for rotation and scaling, which is optional as the last parameter. Note that if the center is 0, decompose() is the same as factor() where "t" is translation, "u" is rotation, "s" is scaleFactor, and "r" is ScaleOrientattion.
|
|
||||||||||||||||||||||||
|
Decomposes the matrix into a translation, rotation and scale.
|
|
||||||||||||||||||||||||||||
|
Factors a matrix m into 5 pieces: m = r s rt u t, where rt means transpose of r, and r and u are rotations, s is a scale, and t is a translation. Any projection information is returned in proj.
|
|
||||||||||||||||
|
Multiplies matrix by given column point, where the resulting point is given.
|
|
||||||||||
|
Multiplies matrix by given column point.
|
|
||||||||||||||||
|
Multiplies matrix by given column point, where the resulting point is given. The full (4x4) matrix is used.
|
|
||||||||||
|
Multiplies matrix by given column point. The full (4x4) matrix is used.
|
|
||||||||||||||||
|
Multiplies matrix by given column vector, where the resulting vector is given.
|
|
||||||||||
|
Multiplies matrix by given column vector.
|
|
||||||||||||||||
|
Transforms the given point by the matrix and stores the result in dest.
|
|
||||||||||
|
Transforms the given point by the matrix.
|
|
||||||||||||||||
|
Transforms the given vector by the matrix and stores the result in dest.
|
|
||||||||||
|
Transforms the given vector by the matrix.
|
|
||||||||||||||||
|
Multiplies given row point by matrix, where the resulting point is given (pT * M).
|
|
||||||||||
|
Multiplies given row point by matrix (pT * M).
|
|
||||||||||||||||
|
Multiplies given row point by matrix, where the resulting point is given. The full (4x4) matrix is used (pT * M).
|
|
||||||||||
|
Multiplies given row point by matrix. The full (4x4) matrix is used (pT*M).
|
|
||||||||||||||||
|
Multiplies given row vector by matrix, where the resulting vector is given (vT * M).
|
|
||||||||||
|
Multiplies given row vector by matrix.
|
|
||||||||||||||||
|
Returns true iff all matrix elements are equal within the given tolerance.
|
|
||||||||||
|
Returns the determinat of the upper 3x3 submatrix.
|
|
||||||||||
|
Returns the determinat of the whole 4x4 matrix.
|
|
||||||||||
|
Stores the inverse of the matrix into result, returns true if the matrix is not singular.
|
|
||||||||||
|
Inverts the matrix, returns true if the matrix is not singular.
|
|
| ||||