#include <OgreMatrix4.h>
Public Member Functions | |
Matrix4 () | |
Default constructor. | |
Matrix4 (Real m00, Real m01, Real m02, Real m03, Real m10, Real m11, Real m12, Real m13, Real m20, Real m21, Real m22, Real m23, Real m30, Real m31, Real m32, Real m33) | |
Matrix4 (const Matrix3 &m3x3) | |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling 3x3 matrix. | |
Matrix4 (const Quaternion &rot) | |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling Quaternion. | |
Real * | operator[] (size_t iRow) |
const Real *const | operator[] (size_t iRow) const |
Matrix4 | concatenate (const Matrix4 &m2) const |
Matrix4 | operator* (const Matrix4 &m2) const |
Matrix concatenation using '*'. | |
Vector3 | operator* (const Vector3 &v) const |
Vector transformation using '*'. | |
Vector4 | operator* (const Vector4 &v) const |
Plane | operator* (const Plane &p) const |
Matrix4 | operator+ (const Matrix4 &m2) const |
Matrix addition. | |
Matrix4 | operator- (const Matrix4 &m2) const |
Matrix subtraction. | |
bool | operator== (const Matrix4 &m2) const |
Tests 2 matrices for equality. | |
bool | operator!= (const Matrix4 &m2) const |
Tests 2 matrices for inequality. | |
void | operator= (const Matrix3 &mat3) |
Assignment from 3x3 matrix. | |
Matrix4 | transpose (void) const |
void | setTrans (const Vector3 &v) |
Sets the translation transformation part of the matrix. | |
Vector3 | getTrans () const |
Extracts the translation transformation part of the matrix. | |
void | makeTrans (const Vector3 &v) |
Builds a translation matrix. | |
void | makeTrans (Real tx, Real ty, Real tz) |
void | setScale (const Vector3 &v) |
Sets the scale part of the matrix. | |
void | extract3x3Matrix (Matrix3 &m3x3) const |
Extracts the rotation / scaling part of the Matrix as a 3x3 matrix. | |
bool | hasScale () const |
Determines if this matrix involves a scaling. | |
bool | hasNegativeScale () const |
Determines if this matrix involves a negative scaling. | |
Quaternion | extractQuaternion () const |
Extracts the rotation / scaling part as a quaternion from the Matrix. | |
Matrix4 | operator* (Real scalar) const |
Matrix4 | adjoint () const |
Real | determinant () const |
Matrix4 | inverse () const |
void | makeTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation) |
Building a Matrix4 from orientation / scale / position. | |
void | makeInverseTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation) |
Building an inverse Matrix4 from orientation / scale / position. | |
bool | isAffine (void) const |
Check whether or not the matrix is affine matrix. | |
Matrix4 | inverseAffine (void) const |
Returns the inverse of the affine matrix. | |
Matrix4 | concatenateAffine (const Matrix4 &m2) const |
Concatenate two affine matrix. | |
Vector3 | transformAffine (const Vector3 &v) const |
3-D Vector transformation specially for affine matrix. | |
Vector4 | transformAffine (const Vector4 &v) const |
4-D Vector transformation specially for affine matrix. | |
Static Public Member Functions | |
static Matrix4 | getTrans (const Vector3 &v) |
Gets a translation matrix. | |
static Matrix4 | getTrans (Real t_x, Real t_y, Real t_z) |
Gets a translation matrix - variation for not using a vector. | |
static Matrix4 | getScale (const Vector3 &v) |
Gets a scale matrix. | |
static Matrix4 | getScale (Real s_x, Real s_y, Real s_z) |
Gets a scale matrix - variation for not using a vector. | |
Static Public Attributes | |
static const Matrix4 | ZERO |
static const Matrix4 | IDENTITY |
static const Matrix4 | CLIPSPACE2DTOIMAGESPACE |
Useful little matrix which takes 2D clipspace {-1, 1} to {0,1} and inverts the Y. | |
Protected Attributes | |
union { | |
Real m [4][4] | |
Real _m [16] | |
}; | |
Friends | |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Matrix4 &m) |
Function for writing to a stream. |
[ m[0][0] m[0][1] m[0][2] m[0][3] ] {x} | m[1][0] m[1][1] m[1][2] m[1][3] | * {y} | m[2][0] m[2][1] m[2][2] m[2][3] | {z} [ m[3][0] m[3][1] m[3][2] m[3][3] ] {1}
Definition at line 73 of file OgreMatrix4.h.
Ogre::Matrix4::Matrix4 | ( | ) |
Default constructor.
Definition at line 86 of file OgreMatrix4.h.
Ogre::Matrix4::Matrix4 | ( | Real | m00, | |
Real | m01, | |||
Real | m02, | |||
Real | m03, | |||
Real | m10, | |||
Real | m11, | |||
Real | m12, | |||
Real | m13, | |||
Real | m20, | |||
Real | m21, | |||
Real | m22, | |||
Real | m23, | |||
Real | m30, | |||
Real | m31, | |||
Real | m32, | |||
Real | m33 | |||
) |
Definition at line 90 of file OgreMatrix4.h.
Ogre::Matrix4::Matrix4 | ( | const Matrix3 & | m3x3 | ) |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling 3x3 matrix.
Definition at line 117 of file OgreMatrix4.h.
Ogre::Matrix4::Matrix4 | ( | const Quaternion & | rot | ) |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling Quaternion.
Definition at line 126 of file OgreMatrix4.h.
References Ogre::Quaternion::ToRotationMatrix().
Real* Ogre::Matrix4::operator[] | ( | size_t | iRow | ) |
Definition at line 135 of file OgreMatrix4.h.
const Real* const Ogre::Matrix4::operator[] | ( | size_t | iRow | ) | const |
Definition at line 141 of file OgreMatrix4.h.
Vector transformation using '*'.
Definition at line 189 of file OgreMatrix4.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Definition at line 201 of file OgreMatrix4.h.
References Ogre::Vector4::w, Ogre::Vector4::x, Ogre::Vector4::y, and Ogre::Vector4::z.
Definition at line 210 of file OgreMatrix4.h.
References Ogre::Plane::d, Ogre::Plane::normal, Ogre::Vector3::normalise(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
bool Ogre::Matrix4::operator== | ( | const Matrix4 & | m2 | ) | const |
bool Ogre::Matrix4::operator!= | ( | const Matrix4 & | m2 | ) | const |
void Ogre::Matrix4::operator= | ( | const Matrix3 & | mat3 | ) |
Assignment from 3x3 matrix.
Definition at line 310 of file OgreMatrix4.h.
References Ogre::Matrix3::m.
Matrix4 Ogre::Matrix4::transpose | ( | void | ) | const |
Definition at line 317 of file OgreMatrix4.h.
void Ogre::Matrix4::setTrans | ( | const Vector3 & | v | ) |
Sets the translation transformation part of the matrix.
Definition at line 332 of file OgreMatrix4.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Vector3 Ogre::Matrix4::getTrans | ( | ) | const |
Extracts the translation transformation part of the matrix.
Definition at line 341 of file OgreMatrix4.h.
void Ogre::Matrix4::makeTrans | ( | const Vector3 & | v | ) |
Builds a translation matrix.
Definition at line 349 of file OgreMatrix4.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Definition at line 357 of file OgreMatrix4.h.
Gets a translation matrix.
Definition at line 367 of file OgreMatrix4.h.
References m, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets a translation matrix - variation for not using a vector.
Definition at line 381 of file OgreMatrix4.h.
References m.
void Ogre::Matrix4::setScale | ( | const Vector3 & | v | ) |
Sets the scale part of the matrix.
Definition at line 400 of file OgreMatrix4.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets a scale matrix.
Definition at line 409 of file OgreMatrix4.h.
References m, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets a scale matrix - variation for not using a vector.
Definition at line 422 of file OgreMatrix4.h.
References m.
void Ogre::Matrix4::extract3x3Matrix | ( | Matrix3 & | m3x3 | ) | const |
Extracts the rotation / scaling part of the Matrix as a 3x3 matrix.
m3x3 | Destination Matrix3 |
Definition at line 436 of file OgreMatrix4.h.
References Ogre::Matrix3::m.
bool Ogre::Matrix4::hasScale | ( | ) | const |
Determines if this matrix involves a scaling.
Definition at line 451 of file OgreMatrix4.h.
References Ogre::Math::RealEqual().
bool Ogre::Matrix4::hasNegativeScale | ( | ) | const |
Determines if this matrix involves a negative scaling.
Definition at line 468 of file OgreMatrix4.h.
Quaternion Ogre::Matrix4::extractQuaternion | ( | ) | const |
Extracts the rotation / scaling part as a quaternion from the Matrix.
Definition at line 475 of file OgreMatrix4.h.
Definition at line 488 of file OgreMatrix4.h.
Matrix4 Ogre::Matrix4::adjoint | ( | ) | const |
Real Ogre::Matrix4::determinant | ( | ) | const |
Matrix4 Ogre::Matrix4::inverse | ( | ) | const |
void Ogre::Matrix4::makeTransform | ( | const Vector3 & | position, | |
const Vector3 & | scale, | |||
const Quaternion & | orientation | |||
) |
Building a Matrix4 from orientation / scale / position.
void Ogre::Matrix4::makeInverseTransform | ( | const Vector3 & | position, | |
const Vector3 & | scale, | |||
const Quaternion & | orientation | |||
) |
Building an inverse Matrix4 from orientation / scale / position.
bool Ogre::Matrix4::isAffine | ( | void | ) | const |
Check whether or not the matrix is affine matrix.
Definition at line 540 of file OgreMatrix4.h.
Referenced by concatenateAffine(), and Ogre::AxisAlignedBox::transformAffine().
Matrix4 Ogre::Matrix4::inverseAffine | ( | void | ) | const |
Returns the inverse of the affine matrix.
Concatenate two affine matrix.
Definition at line 555 of file OgreMatrix4.h.
References isAffine(), and m.
3-D Vector transformation specially for affine matrix.
Definition at line 585 of file OgreMatrix4.h.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Referenced by Ogre::AxisAlignedBox::transformAffine().
4-D Vector transformation specially for affine matrix.
Definition at line 599 of file OgreMatrix4.h.
References Ogre::Vector4::w, Ogre::Vector4::x, Ogre::Vector4::y, and Ogre::Vector4::z.
_OgreExport friend std::ostream& operator<< | ( | std::ostream & | o, | |
const Matrix4 & | m | |||
) | [friend] |
Real Ogre::Matrix4::m[4][4] |
Definition at line 78 of file OgreMatrix4.h.
Referenced by concatenate(), concatenateAffine(), getScale(), getTrans(), operator!=(), operator+(), operator-(), and operator==().
Definition at line 79 of file OgreMatrix4.h.
union { ... } [protected] |
const Matrix4 Ogre::Matrix4::ZERO [static] |
Definition at line 482 of file OgreMatrix4.h.
const Matrix4 Ogre::Matrix4::IDENTITY [static] |
Definition at line 483 of file OgreMatrix4.h.
const Matrix4 Ogre::Matrix4::CLIPSPACE2DTOIMAGESPACE [static] |
Useful little matrix which takes 2D clipspace {-1, 1} to {0,1} and inverts the Y.
Definition at line 486 of file OgreMatrix4.h.
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 27 22:04:09 2009