OGRE-Next
3.0.0
Object-Oriented Graphics Rendering Engine
|
Class encapsulating a standard 4x4 homogeneous matrix. More...
#include <OgreMatrix4.h>
Public Member Functions | |
Matrix4 () | |
Default constructor. More... | |
Matrix4 (const Matrix3 &m3x3) | |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling 3x3 matrix. More... | |
Matrix4 (const Quaternion &rot) | |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling Quaternion. More... | |
Matrix4 (const Real *arr) | |
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 | adjoint () const |
Matrix4 | concatenate (const Matrix4 &m2) const |
Matrix4 | concatenateAffine (const Matrix4 &m2) const |
Concatenate two affine matrices. More... | |
void | decomposition (Vector3 &position, Vector3 &scale, Quaternion &orientation) const |
Decompose a Matrix4 to orientation / scale / position. More... | |
Real | determinant () const |
void | extract3x3Matrix (Matrix3 &m3x3) const |
Extracts the rotation / scaling part of the Matrix as a 3x3 matrix. More... | |
Quaternion | extractQuaternion () const |
Extracts the rotation / scaling part as a quaternion from the Matrix. More... | |
Vector3 | getTrans () const |
Extracts the translation transformation part of the matrix. More... | |
bool | hasNegativeScale () const |
Determines if this matrix involves a negative scaling. More... | |
bool | hasScale () const |
Determines if this matrix involves a scaling. More... | |
Matrix4 | inverse () const |
Matrix4 | inverseAffine () const |
Returns the inverse of the affine matrix. More... | |
bool | isAffine () const |
Check whether or not the matrix is affine matrix. More... | |
void | makeInverseTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation) |
Building an inverse Matrix4 from orientation / scale / position. More... | |
void | makeTrans (const Vector3 &v) |
Builds a translation matrix. More... | |
void | makeTrans (Real tx, Real ty, Real tz) |
void | makeTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation) |
Building a Matrix4 from orientation / scale / position. More... | |
bool | operator!= (const Matrix4 &m2) const |
Tests 2 matrices for inequality. More... | |
Matrix4 | operator* (const Matrix4 &m2) const |
Matrix concatenation using '*'. More... | |
Plane | operator* (const Plane &p) const |
Vector3 | operator* (const Vector3 &v) const |
Vector transformation using '*'. More... | |
Vector4 | operator* (const Vector4 &v) const |
Matrix4 | operator* (Real scalar) const |
Matrix4 | operator+ (const Matrix4 &m2) const |
Matrix addition. More... | |
Matrix4 | operator- (const Matrix4 &m2) const |
Matrix subtraction. More... | |
void | operator= (const Matrix3 &mat3) |
Assignment from 3x3 matrix. More... | |
bool | operator== (const Matrix4 &m2) const |
Tests 2 matrices for equality. More... | |
Real * | operator[] (size_t iRow) |
const Real * | operator[] (size_t iRow) const |
void | setScale (const Vector3 &v) |
Sets the scale part of the matrix. More... | |
void | setTrans (const Vector3 &v) |
Sets the translation transformation part of the matrix. More... | |
void | swap (Matrix4 &other) |
Exchange the contents of this matrix with another. More... | |
Vector3 | transformAffine (const Vector3 &v) const |
3-D Vector transformation specially for an affine matrix. More... | |
Vector4 | transformAffine (const Vector4 &v) const |
4-D Vector transformation specially for an affine matrix. More... | |
Vector3 | transformDirectionAffine (const Vector3 &v) const |
3-D Vector transformation specially for an affine matrix. More... | |
Matrix4 | transpose () const |
Static Public Member Functions | |
static Matrix4 | getScale (const Vector3 &v) |
Gets a scale matrix. More... | |
static Matrix4 | getScale (Real s_x, Real s_y, Real s_z) |
Gets a scale matrix - variation for not using a vector. More... | |
static Matrix4 | getTrans (const Vector3 &v) |
Gets a translation matrix. More... | |
static Matrix4 | getTrans (Real t_x, Real t_y, Real t_z) |
Gets a translation matrix - variation for not using a vector. More... | |
Static Public Attributes | |
static const Matrix4 | CLIPSPACE2DTOIMAGESPACE |
Useful little matrix which takes 2D clipspace {-1, 1} to {0,1} and inverts the Y. More... | |
static const Matrix4 | IDENTITY |
static const Matrix4 | ZERO |
static const Matrix4 | ZEROAFFINE |
Class encapsulating a standard 4x4 homogeneous matrix.
[ 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}
|
inline |
Default constructor.
|
inline |
|
inline |
|
inline |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling 3x3 matrix.
|
inline |
Creates a standard 4x4 transformation matrix with a zero translation part from a rotation/scaling Quaternion.
References Ogre::Quaternion::ToRotationMatrix().
Matrix4 Ogre::Matrix4::adjoint | ( | ) | const |
Concatenate two affine matrices.
References isAffine(), and m.
void Ogre::Matrix4::decomposition | ( | Vector3 & | position, |
Vector3 & | scale, | ||
Quaternion & | orientation | ||
) | const |
Decompose a Matrix4 to orientation / scale / position.
Real Ogre::Matrix4::determinant | ( | ) | const |
|
inline |
Extracts the rotation / scaling part of the Matrix as a 3x3 matrix.
m3x3 | Destination Matrix3 |
|
inline |
Extracts the rotation / scaling part as a quaternion from the Matrix.
Gets a scale matrix.
References m, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets a scale matrix - variation for not using a vector.
References m.
|
inline |
Extracts the translation transformation part of the matrix.
Gets a translation matrix.
References m, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Gets a translation matrix - variation for not using a vector.
References m.
|
inline |
Determines if this matrix involves a negative scaling.
|
inline |
Determines if this matrix involves a scaling.
References Ogre::Math::RealEqual().
Matrix4 Ogre::Matrix4::inverse | ( | ) | const |
Matrix4 Ogre::Matrix4::inverseAffine | ( | ) | const |
Returns the inverse of the affine matrix.
Referenced by Ogre::VrData::set().
|
inline |
Check whether or not the matrix is affine matrix.
Referenced by concatenateAffine(), and Ogre::AxisAlignedBox::transformAffine().
void Ogre::Matrix4::makeInverseTransform | ( | const Vector3 & | position, |
const Vector3 & | scale, | ||
const Quaternion & | orientation | ||
) |
Building an inverse Matrix4 from orientation / scale / position.
|
inline |
Builds a translation matrix.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
void Ogre::Matrix4::makeTransform | ( | const Vector3 & | position, |
const Vector3 & | scale, | ||
const Quaternion & | orientation | ||
) |
|
inline |
Tests 2 matrices for inequality.
References m.
Vector transformation using '*'.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
References Ogre::Vector4::w, Ogre::Vector4::x, Ogre::Vector4::y, and Ogre::Vector4::z.
Matrix subtraction.
References m.
|
inline |
Assignment from 3x3 matrix.
|
inline |
Tests 2 matrices for equality.
References m.
|
inline |
|
inline |
|
inline |
Sets the scale part of the matrix.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
|
inline |
Sets the translation transformation part of the matrix.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
|
inline |
Exchange the contents of this matrix with another.
References m, and std::swap().
3-D Vector transformation specially for an affine matrix.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
Referenced by Ogre::AxisAlignedBox::transformAffine().
4-D Vector transformation specially for an affine matrix.
References Ogre::Vector4::w, Ogre::Vector4::x, Ogre::Vector4::y, and Ogre::Vector4::z.
3-D Vector transformation specially for an affine matrix.
References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.
|
inline |
Referenced by operator*().
Real Ogre::Matrix4::_m[16] |
Referenced by Ogre::ArrayMatrix4::createAllFromMatrix4(), Ogre::ArrayMatrix4::getAsMatrix4(), Ogre::SimpleMatrix4::load(), Ogre::SimpleMatrixAf4x3::load(), Ogre::ArrayMatrix4::setAll(), Ogre::ArrayMatrixAf4x3::setAll(), Ogre::ArrayMatrix4::setFromMatrix4(), Ogre::SimpleMatrixAf4x3::store(), and Ogre::SimpleMatrixAf4x3::store4x3().
|
static |
Useful little matrix which takes 2D clipspace {-1, 1} to {0,1} and inverts the Y.
|
static |
Real Ogre::Matrix4::m[4][4] |
Referenced by concatenate(), concatenateAffine(), getScale(), getTrans(), operator!=(), operator+(), operator-(), operator==(), and swap().
|
static |
|
static |