Home | Download | Screen shots | Discussion | Documentation | Links |
---|
Public Methods | |
VrmlMatrix () throw () | |
Default constructor. | |
VrmlMatrix (float f11, float f12, float f13, float f14, float f21, float f22, float f23, float f24, float f31, float f32, float f33, float f34, float f41, float f42, float f43, float f44) throw () | |
Construct VrmlMatrix with given 16 elements in row-major order. | |
VrmlMatrix (const float m[4][4]) throw () | |
Construct from an array. | |
float (&operator[](size_t index) throw())[4] | |
const | float (&operator[](size_t index) const throw())[4] |
const | float (&get() const throw())[4][4] |
void | setRotate (const float axisAngle[4]) throw () |
Sets matrix to rotate by given rotation Graphics Gems p466. | |
void | setRotate (const SFRotation &axisAngle) throw () |
Sets matrix to rotate by given rotation Graphics Gems p466. | |
void | setScale (float s) throw () |
Sets matrix to scale by given uniform factor. | |
void | setScale (const float s[3]) throw () |
Sets matrix to scale by given vector in array[X Y Z]. | |
void | setScale (const SFVec3f &s) throw () |
Sets matrix to scale by given SFVec3f object. | |
void | setTranslate (const float t[3]) throw () |
Sets matrix to translate by given vector in array[X Y Z]. | |
void | setTranslate (const SFVec3f &t) throw () |
Sets matrix to translate by given SFVec3f object. | |
void | setTransform (const SFVec3f &translation, const SFRotation &rotation, const SFVec3f &scale, const SFRotation &scaleOrientation, const SFVec3f ¢er) throw () |
Set the matrix from translation, rotation, scale, scaleOrientation, and center. | |
void | getTransform (SFVec3f &translation, SFRotation &rotation, SFVec3f &scale) const throw () |
Get the translation, rotation and scale from the orthogonal transformation matrix. | |
void | getTransform (SFVec3f &translation, SFRotation &rotation, SFVec3f &scale, SFVec3f &shear) const throw () |
Get the translation, rotation, scale and shear from affine transformation matrix. | |
const VrmlMatrix | affine_inverse () const throw () |
Get the inverse of an affine matrix. | |
const VrmlMatrix | transpose () const throw () |
Get the transposition of the matrix. | |
const VrmlMatrix | multLeft (const VrmlMatrix &mat) const throw () |
Premultiplies matrix by given matrix on the left. | |
const VrmlMatrix | multRight (const VrmlMatrix &mat) const throw () |
Postmultiplies matrix by given matrix on the right. | |
void | multMatrixVec (const SFVec3f &src, SFVec3f &dst) const throw () |
Postmultiplies matrix by a column vector on the right. | |
void | multMatrixVec (const float src[3], float dst[3]) const throw () |
void | multVecMatrix (const SFVec3f &src, SFVec3f &dst) const throw () |
Premultiplies matrix by given row vector on left. | |
void | multVecMatrix (const float src[3], float dst[3]) const throw () |
float | det3 (int r1, int r2, int r3, int c1, int c2, int c3) const throw () |
Return determinant of 3x3 submatrix by given row and column indices. | |
float | det4 () const throw () |
Return determinant of entire matrix. | |
Private Attributes | |
float | matrix [4][4] |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &out, const VrmlMatrix &mat) |
Stream output. | |
bool | operator== (const VrmlMatrix &lhs, const VrmlMatrix &rhs) throw() |
Equality comparison operator. |
Matrices are stored in row-major order. Some parts are taken from MathUtils (thanks to Chris Morley) but format is not same.
|
Default constructor. Matrix is initialized to the identity matrix. |
|
Construct VrmlMatrix with given 16 elements in row-major order.
|
|
Construct from an array.
|
|
Get the inverse of an affine matrix.
|
|
Return determinant of 3x3 submatrix by given row and column indices.
|
|
Return determinant of entire matrix.
|
|
Get the translation, rotation, scale and shear from affine transformation matrix. Here any projection information in matrix is ignored. As VRML allows non-uniform scaling, it is safe to call this routine. The caller is responsible for assuring that the transformation is in fact affine, otherwise the results are undefined. Some portions are taken from Graphics Gems 2.
|
|
Get the translation, rotation and scale from the orthogonal transformation matrix. Here any projection or shear information in the matrix is ignored. The caller is responsible for assuring that the transformation is in fact orthogonal, otherwise the results are undefined. Some portions are taken from Graphics Gems 2.
|
|
Premultiplies matrix by given matrix on the left.
|
|
Postmultiplies matrix by a column vector on the right.
|
|
Postmultiplies matrix by given matrix on the right.
|
|
Premultiplies matrix by given row vector on left.
|
|
Sets matrix to rotate by given rotation Graphics Gems p466.
|
|
Sets matrix to rotate by given rotation Graphics Gems p466.
|
|
Sets matrix to scale by given SFVec3f object.
|
|
Sets matrix to scale by given vector in array[X Y Z].
|
|
Sets matrix to scale by given uniform factor.
|
|
Set the matrix from translation, rotation, scale, scaleOrientation, and center.
|
|
Sets matrix to translate by given SFVec3f object.
|
|
Sets matrix to translate by given vector in array[X Y Z].
|
|
Get the transposition of the matrix.
|
|
Stream output.
|
|
Equality comparison operator. All componenents must match exactly.
|