|
TrueReality
v0.1.1912
|
A float Matrix class to be used for generic matrix operations. More...
#include <Matrixd.h>
Public Types | |
| using | value_type = double |
Public Member Functions | |
| Matrixd () | |
| ctor. More... | |
| Matrixd (const osg::Matrixd &mat) | |
| ctor. More... | |
| Matrixd (const osg::Matrixf &mat) | |
| ctor. More... | |
| Matrixd (const Matrixd &mat) | |
| ctor. More... | |
| Matrixd (const Matrixf &mat) | |
| ctor. More... | |
| Matrixd (float const *const ptr) | |
| ctor that takes a 4x4 array of floats and uses them as matrix input. More... | |
| Matrixd (double const *const ptr) | |
| ctor that takes a 4x4 array of double and uses them as matrix input. More... | |
| Matrixd (const Quat &quat) | |
| ctor that takes a quaternion and uses it as matrix input. More... | |
| Matrixd (value_type a00, value_type a01, value_type a02, value_type a03, value_type a10, value_type a11, value_type a12, value_type a13, value_type a20, value_type a21, value_type a22, value_type a23, value_type a30, value_type a31, value_type a32, value_type a33) | |
| ctor. More... | |
| ~Matrixd () | |
| dtor. More... | |
| osg::Matrixd & | GetOSGMatrix () |
| Returns a reference to the internal OSG Matrix. More... | |
| const osg::Matrixd & | GetOSGMatrix () const |
| Returns a reference to the internal OSG Matrix. More... | |
| int | Compare (const Matrixd &m) const |
| Compare the current Matrix to the passed in one. More... | |
| bool | Valid () const |
| Returns true if the Matrix is not NaN. More... | |
| bool | IsNaN () const |
| Returns true if the Matrix is NaN. More... | |
| void | Set (const Matrixd &rhs) |
| Set the current Matrix from a passed in one. More... | |
| void | Set (const Matrixf &rhs) |
| Set the current Matrix from a passed in one. More... | |
| void | Set (float const *const ptr) |
| Set the current Matrix from a passed in values array. More... | |
| void | Set (double const *const ptr) |
| Set the current Matrix from a passed in values array. More... | |
| void | Set (value_type a00, value_type a01, value_type a02, value_type a03, value_type a10, value_type a11, value_type a12, value_type a13, value_type a20, value_type a21, value_type a22, value_type a23, value_type a30, value_type a31, value_type a32, value_type a33) |
| Set the current Matrix from a passed in values. More... | |
| value_type * | Ptr () |
| Pointer to the internal Matrix array. More... | |
| const value_type * | Ptr () const |
| Pointer to the internal Matrix array. More... | |
| void | MakeIdentity () |
| Reset this matrix to be an Identity Matrix. More... | |
| void | MakeScale (const Vec3f &v) |
| Reset this matrix to be a scale matrix of the passed in value. More... | |
| void | MakeScale (const Vec3d &v) |
| Reset this matrix to be a scale matrix of the passed in value. More... | |
| void | MakeScale (value_type x, value_type y, value_type z) |
| Reset this matrix to be a scale matrix of the passed in value. More... | |
| void | MakeTranslate (const Vec3f &v) |
| Reset this matrix to be a translation matrix of the passed in value. More... | |
| void | MakeTranslate (const Vec3d &v) |
| Reset this matrix to be a translation matrix of the passed in value. More... | |
| void | MakeTranslate (value_type x, value_type y, value_type z) |
| Reset this matrix to be a translation matrix of the passed in value. More... | |
| void | MakeRotate (const Vec3f &from, const Vec3f &to) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (const Vec3d &from, const Vec3d &to) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (value_type angle, const Vec3f &axis) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (value_type angle, const Vec3d &axis) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (value_type angle, value_type x, value_type y, value_type z) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (const Quat &q) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | MakeRotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3) |
| Reset this matrix to be a rotational matrix of the passed in value. More... | |
| void | Decompose (Vec3f &translation, Quat &rotation, Vec3f &scale, Quat &so) const |
| Decomposes the matrix into translation, rotation, scale and scale orientation. More... | |
| void | Decompose (Vec3d &translation, Quat &rotation, Vec3d &scale, Quat &so) const |
| Decompose the matrix into translation, rotation, scale and scale orientation. More... | |
| void | MakeOrtho (double left, double right, double bottom, double top, double zNear, double zFar) |
| Set to an orthographic projection. More... | |
| void | MakeOrtho (float left, float right, float bottom, float top, float zNear, float zFar) |
| Set to an orthographic projection. More... | |
| bool | GetOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
| Get the orthographic settings of the orthographic projection matrix. More... | |
| bool | GetOrtho (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const |
| float version of getOrtho(..) Get the orthographic settings of the orthographic projection matrix. More... | |
| void | MakeOrtho2D (double left, double right, double bottom, double top) |
| Set to a 2D orthographic projection. More... | |
| void | MakeOrtho2D (float left, float right, float bottom, float top) |
| Set to a 2D orthographic projection. More... | |
| void | MakeFrustum (double left, double right, double bottom, double top, double zNear, double zFar) |
| Set to a perspective projection. More... | |
| void | MakeFrustum (float left, float right, float bottom, float top, float zNear, float zFar) |
| Set to a perspective projection. More... | |
| bool | GetFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
| Get the frustum settings of a perspective projection matrix. More... | |
| bool | GetFrustum (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const |
| float version of getFrustum(..) Get the frustum settings of a perspective projection matrix. More... | |
| void | MakePerspective (double fovy, double aspectRatio, double zNear, double zFar) |
| Set to a symmetrical perspective projection. More... | |
| void | MakePerspective (float fovy, float aspectRatio, float zNear, float zFar) |
| Set to a symmetrical perspective projection. More... | |
| bool | GetPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const |
| Get the frustum settings of a symmetric perspective projection matrix. More... | |
| bool | GetPerspective (float &fovy, float &aspectRatio, float &zNear, float &zFar) const |
| float version of getPerspective(..) Get the frustum settings of a symmetric perspective projection matrix. More... | |
| void | MakeLookAt (const Vec3f &eye, const Vec3f ¢er, const Vec3f &up) |
| Set the position and orientation to be a view matrix, using the same convention as gluLookAt. More... | |
| void | MakeLookAt (const Vec3d &eye, const Vec3d ¢er, const Vec3d &up) |
| Set the position and orientation to be a view matrix, using the same convention as gluLookAt. More... | |
| void | GetLookAt (Vec3f &eye, Vec3f ¢er, Vec3f &up, value_type lookDistance=1.0f) const |
| Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. More... | |
| void | GetLookAt (Vec3d &eye, Vec3d ¢er, Vec3d &up, value_type lookDistance=1.0f) const |
| Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. More... | |
| bool | Invert (const Matrixd &rhs) |
| Invert the matrix rhs, automatically select invert_4x3 or invert_4x4. More... | |
| bool | Invert_4x3 (const Matrixd &rhs) |
| 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1. More... | |
| bool | Invert_4x4 (const Matrixd &rhs) |
| Full 4x4 matrix invert. More... | |
| void | OrthoNormalize (const Matrixd &rhs) |
| Ortho-normalize the 3x3 rotation & scale matrix. More... | |
| void | SetRotate (const Quat &q) |
| Applies the rotation to the matrix. More... | |
| Quat | GetRotate () const |
| Get the matrix rotation as a Quat. More... | |
| void | SetTrans (value_type tx, value_type ty, value_type tz) |
| Sets the translation area of the matrix. More... | |
| void | SetTrans (const Vec3f &v) |
| Sets the translation area of the matrix. More... | |
| void | SetTrans (const Vec3d &v) |
| Sets the translation area of the matrix. More... | |
| Vec3d | GetTrans () const |
| Returns the translation area of the matrix. More... | |
| Vec3d | GetScale () const |
| Returns the matrix scale. More... | |
| void | SetScale (value_type x, value_type y, value_type z) |
| Sets the scale values of the matrix. More... | |
| void | SetScale (const Vec3f &v) |
| Sets the scale values of the matrix. More... | |
| void | SetScale (const Vec3d &v) |
| Sets the scale values of the matrix. More... | |
| Vec3f | PreMult (const Vec3f &v) const |
| PreMultiply the matrix by the passed in vector. More... | |
| Vec3d | PreMult (const Vec3d &v) const |
| PreMultiply the matrix by the passed in vector. More... | |
| Vec3f | PostMult (const Vec3f &v) const |
| PostMultiply the matrix by the passed in vector. More... | |
| Vec3d | PostMult (const Vec3d &v) const |
| PostMultiply the matrix by the passed in vector. More... | |
| Vec4f | PreMult (const Vec4f &v) const |
| PreMultiply the matrix by the passed in vector. More... | |
| Vec4d | PreMult (const Vec4d &v) const |
| PreMultiply the matrix by the passed in vector. More... | |
| Vec4f | PostMult (const Vec4f &v) const |
| PostMultiply the matrix by the passed in vector. More... | |
| Vec4d | PostMult (const Vec4d &v) const |
| PostMultiply the matrix by the passed in vector. More... | |
| void | Mult (const Matrixd &m1, const Matrixd &m2) |
| Basic Matrixd multiplication, our workhorse methods. More... | |
| void | PreMult (const Matrixd &m) |
| Basic Matrixd multiplication, our workhorse methods. More... | |
| void | PostMult (const Matrixd &m) |
| Basic Matrixd multiplication, our workhorse methods. More... | |
| void | PreMultTranslate (const Vec3d &v) |
| Optimized version of preMult(translate(v));. More... | |
| void | PreMultTranslate (const Vec3f &v) |
| Optimized version of preMult(translate(v));. More... | |
| void | PostMultTranslate (const Vec3d &v) |
| Optimized version of postMult(translate(v));. More... | |
| void | PostMultTranslate (const Vec3f &v) |
| Optimized version of postMult(translate(v));. More... | |
| void | PreMultScale (const Vec3d &v) |
| Optimized version of preMult(scale(v));. More... | |
| void | PreMultScale (const Vec3f &v) |
| Optimized version of preMult(scale(v));. More... | |
| void | PostMultScale (const Vec3d &v) |
| Optimized version of postMult(scale(v));. More... | |
| void | PostMultScale (const Vec3f &v) |
| Optimized version of postMult(scale(v));. More... | |
| void | PreMultRotate (const Quat &q) |
| Optimized version of preMult(rotate(q));. More... | |
| void | PostMultRotate (const Quat &q) |
| Optimized version of postMult(rotate(q));. More... | |
| std::string | ToString (int precision=-1) |
| Convert this object into a string representation. More... | |
| Matrixd & | operator= (const Matrixd &rhs) |
| Set operator. More... | |
| Matrixd & | operator= (const Matrixf &rhs) |
| Set operator. More... | |
| bool | operator> (const Matrixd &m) const |
| Greater than by operator. More... | |
| bool | operator< (const Matrixd &m) const |
| Less than by operator. More... | |
| bool | operator== (const Matrixd &m) const |
| Equality operator. More... | |
| bool | operator!= (const Matrixd &m) const |
| Inequality operator. More... | |
| Vec3f | operator* (const Vec3f &v) const |
| Multiply by vector. More... | |
| Vec3d | operator* (const Vec3d &v) const |
| Multiply by vector. More... | |
| Vec4f | operator* (const Vec4f &v) const |
| Multiply by vector. More... | |
| Vec4d | operator* (const Vec4d &v) const |
| Multiply by vector. More... | |
| void | operator*= (const Matrixd &other) |
| Unary Multiply by a matrix. More... | |
| Matrixd | operator* (const Matrixd &m) const |
| Multiply by a matrix. More... | |
| Matrixd | operator* (value_type rhs) const |
| Multiply by scalar. More... | |
| Matrixd & | operator*= (value_type rhs) |
| Unary multiply by scalar. More... | |
| Matrixd | operator/ (value_type rhs) const |
| Divide by scalar. More... | |
| Matrixd & | operator/= (value_type rhs) |
| Unary divide by scalar. More... | |
| Matrixd | operator+ (const Matrixd &rhs) const |
| Binary vector add. More... | |
| Matrixd & | operator+= (const Matrixd &rhs) |
| Unary vector add. More... | |
| Matrixd | operator- (const Matrixd &rhs) const |
| Binary vector subtract. More... | |
| Matrixd & | operator-= (const Matrixd &rhs) |
| Unary vector subtract. More... | |
| value_type & | operator() (int row, int col) |
| Returns a specific row and column value of the matrix. More... | |
| value_type | operator() (int row, int col) const |
| Returns a specific row and column value of the matrix. More... | |
| operator osg::Matrixd () const | |
| Implicit conversion operator to OSG Matrix. More... | |
| operator osg::Matrixd & () | |
| Implicit conversion operator to OSG Matrix. More... | |
| operator const osg::Matrixd & () const | |
| Implicit conversion operator to OSG Matrix. More... | |
| operator osg::Matrixd * () | |
| Implicit conversion operator to OSG Matrix. More... | |
Static Public Member Functions | |
| static Matrixd | Identity (void) |
| Static method to create an Identity matrix. More... | |
| static Matrixd | Scale (const Vec3f &sv) |
| Static method to create a Scale matrix. More... | |
| static Matrixd | Scale (const Vec3d &sv) |
| Static method to create a Scale matrix. More... | |
| static Matrixd | Scale (value_type sx, value_type sy, value_type sz) |
| Static method to create a Scale matrix. More... | |
| static Matrixd | Translate (const Vec3f &dv) |
| Static method to create a Translate matrix. More... | |
| static Matrixd | Translate (const Vec3d &dv) |
| Static method to create a Translate matrix. More... | |
| static Matrixd | Translate (value_type x, value_type y, value_type z) |
| Static method to create a Translate matrix. More... | |
| static Matrixd | Rotate (const Vec3f &from, const Vec3f &to) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (const Vec3d &from, const Vec3d &to) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (value_type angle, value_type x, value_type y, value_type z) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (value_type angle, const Vec3f &axis) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (value_type angle, const Vec3d &axis) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Rotate (const Quat &quat) |
| Static method to create a Rotational matrix. More... | |
| static Matrixd | Inverse (const Matrixd &matrix) |
| Static method to create an inverted matrix. More... | |
| static Matrixd | OrthoNormal (const Matrixd &matrix) |
| Static method to create an Ortho Normalized matrix. More... | |
| static Matrixd | Ortho (double left, double right, double bottom, double top, double zNear, double zFar) |
| Create an orthographic projection matrix. More... | |
| static Matrixd | Ortho (float left, float right, float bottom, float top, float zNear, float zFar) |
| Create an orthographic projection matrix. More... | |
| static Matrixd | Ortho2D (double left, double right, double bottom, double top) |
| Create a 2D orthographic projection matrix. More... | |
| static Matrixd | Ortho2D (float left, float right, float bottom, float top) |
| Create a 2D orthographic projection matrix. More... | |
| static Matrixd | Frustum (double left, double right, double bottom, double top, double zNear, double zFar) |
| Create a perspective projection matrix. More... | |
| static Matrixd | Frustum (float left, float right, float bottom, float top, float zNear, float zFar) |
| Create a perspective projection matrix. More... | |
| static Matrixd | Perspective (float fovy, float aspectRatio, float zNear, float zFar) |
| Create a symmetrical perspective projection matrix. More... | |
| static Matrixd | Perspective (double fovy, double aspectRatio, double zNear, double zFar) |
| Create a symmetrical perspective projection matrix. More... | |
| static Matrixd | LookAt (const Vec3f &eye, const Vec3f ¢er, const Vec3f &up) |
| Create the position and orientation matrix as per a camera, using the same convention as gluLookAt. More... | |
| static Matrixd | LookAt (const Vec3d &eye, const Vec3d ¢er, const Vec3d &up) |
| Create the position and orientation matrix as per a camera, using the same convention as gluLookAt. More... | |
| static Vec3f | Transform3x3 (const Vec3f &v, const Matrixd &m) |
| Apply a 3x3 transform of v*M[0..2,0..2]. More... | |
| static Vec3d | Transform3x3 (const Vec3d &v, const Matrixd &m) |
| Apply a 3x3 transform of v*M[0..2,0..2]. More... | |
| static Vec3f | Transform3x3 (const Matrixd &m, const Vec3f &v) |
| Apply a 3x3 transform of M[0..2,0..2]*v. More... | |
| static Vec3d | Transform3x3 (const Matrixd &m, const Vec3d &v) |
| Apply a 3x3 transform of M[0..2,0..2]*v. More... | |
Protected Attributes | |
| osg::Matrixd | mMatrix |
A float Matrix class to be used for generic matrix operations.
| using trBase::Matrixd::value_type = double |
| trBase::Matrixd::Matrixd | ( | ) |
ctor.
| trBase::Matrixd::Matrixd | ( | const osg::Matrixd & | mat | ) |
| trBase::Matrixd::Matrixd | ( | const osg::Matrixf & | mat | ) |
| trBase::Matrixd::Matrixd | ( | const Matrixd & | mat | ) |
ctor.
| mat | The matrix. |
| trBase::Matrixd::Matrixd | ( | const Matrixf & | mat | ) |
|
explicit |
ctor that takes a 4x4 array of floats and uses them as matrix input.
| ptr | The pointer. |
|
explicit |
ctor that takes a 4x4 array of double and uses them as matrix input.
| ptr | The pointer. |
|
explicit |
ctor that takes a quaternion and uses it as matrix input.
| quat | The quaternion. |
| trBase::Matrixd::Matrixd | ( | value_type | a00, |
| value_type | a01, | ||
| value_type | a02, | ||
| value_type | a03, | ||
| value_type | a10, | ||
| value_type | a11, | ||
| value_type | a12, | ||
| value_type | a13, | ||
| value_type | a20, | ||
| value_type | a21, | ||
| value_type | a22, | ||
| value_type | a23, | ||
| value_type | a30, | ||
| value_type | a31, | ||
| value_type | a32, | ||
| value_type | a33 | ||
| ) |
ctor.
| a00 | The [0][0] value of the matrix. |
| a01 | The [0][1] value of the matrix. |
| a02 | The [0][2] value of the matrix. |
| a03 | The [0][3] value of the matrix. |
| a10 | The [1][0] value of the matrix. |
| a11 | The [1][1] value of the matrix. |
| a12 | The [1][2] value of the matrix. |
| a13 | The [1][3] value of the matrix. |
| a20 | The [2][0] value of the matrix. |
| a21 | The [2][1] value of the matrix. |
| a22 | The [2][2] value of the matrix. |
| a23 | The [2][3] value of the matrix. |
| a30 | The [3][0] value of the matrix. |
| a31 | The [3][1] value of the matrix. |
| a32 | The [3][2] value of the matrix. |
| a33 | The [3][3] value of the matrix. |
| trBase::Matrixd::~Matrixd | ( | ) |
dtor.
Definition at line 64 of file Matrixd.cpp.
| int trBase::Matrixd::Compare | ( | const Matrixd & | m | ) | const |
Compare the current Matrix to the passed in one.
Returns -1, 0, or 1.
| m | The constant matrixd& to compare to this object. |
| void trBase::Matrixd::Decompose | ( | Vec3f & | translation, |
| Quat & | rotation, | ||
| Vec3f & | scale, | ||
| Quat & | so | ||
| ) | const |
Decomposes the matrix into translation, rotation, scale and scale orientation.
| [in,out] | translation | The translation. |
| [in,out] | rotation | The rotation. |
| [in,out] | scale | The scale. |
| [in,out] | so | The so. |
| void trBase::Matrixd::Decompose | ( | Vec3d & | translation, |
| Quat & | rotation, | ||
| Vec3d & | scale, | ||
| Quat & | so | ||
| ) | const |
Decompose the matrix into translation, rotation, scale and scale orientation.
| [in,out] | translation | The translation. |
| [in,out] | rotation | The rotation. |
| [in,out] | scale | The scale. |
| [in,out] | so | The so. |
|
static |
Create a perspective projection matrix.
See glFrustum for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
|
static |
Create a perspective projection matrix.
See glFrustum for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Definition at line 126 of file Matrixd.cpp.
References MakeFrustum().

| bool trBase::Matrixd::GetFrustum | ( | double & | left, |
| double & | right, | ||
| double & | bottom, | ||
| double & | top, | ||
| double & | zNear, | ||
| double & | zFar | ||
| ) | const |
Get the frustum settings of a perspective projection matrix.
Note, if matrix is not a perspective matrix then invalid values will be returned.
| [in,out] | left | The left. |
| [in,out] | right | The right. |
| [in,out] | bottom | The bottom. |
| [in,out] | top | The top. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
| bool trBase::Matrixd::GetFrustum | ( | float & | left, |
| float & | right, | ||
| float & | bottom, | ||
| float & | top, | ||
| float & | zNear, | ||
| float & | zFar | ||
| ) | const |
float version of getFrustum(..) Get the frustum settings of a perspective projection matrix.
Note, if matrix is not a perspective matrix then invalid values will be returned.
| [in,out] | left | The left. |
| [in,out] | right | The right. |
| [in,out] | bottom | The bottom. |
| [in,out] | top | The top. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
Definition at line 92 of file Matrixd.cpp.
References mMatrix.
| void trBase::Matrixd::GetLookAt | ( | Vec3f & | eye, |
| Vec3f & | center, | ||
| Vec3f & | up, | ||
| value_type | lookDistance = 1.0f |
||
| ) | const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
| [in,out] | eye | The eye. |
| [in,out] | center | The center. |
| [in,out] | up | The up. |
| lookDistance | (Optional) The look distance. |
| void trBase::Matrixd::GetLookAt | ( | Vec3d & | eye, |
| Vec3d & | center, | ||
| Vec3d & | up, | ||
| value_type | lookDistance = 1.0f |
||
| ) | const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
| [in,out] | eye | The eye. |
| [in,out] | center | The center. |
| [in,out] | up | The up. |
| lookDistance | (Optional) The look distance. |
| bool trBase::Matrixd::GetOrtho | ( | double & | left, |
| double & | right, | ||
| double & | bottom, | ||
| double & | top, | ||
| double & | zNear, | ||
| double & | zFar | ||
| ) | const |
Get the orthographic settings of the orthographic projection matrix.
Note, if matrix is not an orthographic matrix then invalid values will be returned.
| [in,out] | left | The left. |
| [in,out] | right | The right. |
| [in,out] | bottom | The bottom. |
| [in,out] | top | The top. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
| bool trBase::Matrixd::GetOrtho | ( | float & | left, |
| float & | right, | ||
| float & | bottom, | ||
| float & | top, | ||
| float & | zNear, | ||
| float & | zFar | ||
| ) | const |
float version of getOrtho(..) Get the orthographic settings of the orthographic projection matrix.
Note, if matrix is not an orthographic matrix then invalid values will be returned.
| [in,out] | left | The left. |
| [in,out] | right | The right. |
| [in,out] | bottom | The bottom. |
| [in,out] | top | The top. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
Definition at line 74 of file Matrixd.cpp.
References mMatrix.
| osg::Matrixd & trBase::Matrixd::GetOSGMatrix | ( | ) |
Returns a reference to the internal OSG Matrix.
| const osg::Matrixd & trBase::Matrixd::GetOSGMatrix | ( | ) | const |
Returns a reference to the internal OSG Matrix.
| bool trBase::Matrixd::GetPerspective | ( | double & | fovy, |
| double & | aspectRatio, | ||
| double & | zNear, | ||
| double & | zFar | ||
| ) | const |
Get the frustum settings of a symmetric perspective projection matrix.
Return false if matrix is not a perspective matrix, where parameter values are undefined. Note, if matrix is not a symmetric perspective matrix then the shear will be lost.
| [in,out] | fovy | The fovy. |
| [in,out] | aspectRatio | The aspect ratio. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
| bool trBase::Matrixd::GetPerspective | ( | float & | fovy, |
| float & | aspectRatio, | ||
| float & | zNear, | ||
| float & | zFar | ||
| ) | const |
float version of getPerspective(..) Get the frustum settings of a symmetric perspective projection matrix.
Return false if matrix is not a perspective matrix, where parameter values are undefined. Note, if matrix is not a symmetric perspective matrix then the shear will be lost.
| [in,out] | fovy | The fovy. |
| [in,out] | aspectRatio | The aspect ratio. |
| [in,out] | zNear | The near. |
| [in,out] | zFar | The far. |
Definition at line 104 of file Matrixd.cpp.
References mMatrix.
| Quat trBase::Matrixd::GetRotate | ( | ) | const |
Get the matrix rotation as a Quat.
Note that this function assumes a non-scaled matrix and will return incorrect results for scaled matrixces. Consider decompose() instead.
| Vec3d trBase::Matrixd::GetScale | ( | ) | const |
Returns the matrix scale.
| Vec3d trBase::Matrixd::GetTrans | ( | ) | const |
Returns the translation area of the matrix.
|
static |
Static method to create an Identity matrix.
| bool trBase::Matrixd::Invert | ( | const Matrixd & | rhs | ) |
Invert the matrix rhs, automatically select invert_4x3 or invert_4x4.
| rhs | The right hand side. |
| bool trBase::Matrixd::Invert_4x3 | ( | const Matrixd & | rhs | ) |
4x3 matrix invert, not right hand column is assumed to be 0,0,0,1.
| rhs | The right hand side. |
| bool trBase::Matrixd::Invert_4x4 | ( | const Matrixd & | rhs | ) |
Full 4x4 matrix invert.
| rhs | The right hand side. |
| bool trBase::Matrixd::IsNaN | ( | ) | const |
Returns true if the Matrix is NaN.
|
static |
Create the position and orientation matrix as per a camera, using the same convention as gluLookAt.
| eye | The eye. |
| center | The center. |
| up | The up. |
|
static |
Create the position and orientation matrix as per a camera, using the same convention as gluLookAt.
| eye | The eye. |
| center | The center. |
| up | The up. |
| void trBase::Matrixd::MakeFrustum | ( | double | left, |
| double | right, | ||
| double | bottom, | ||
| double | top, | ||
| double | zNear, | ||
| double | zFar | ||
| ) |
Set to a perspective projection.
See glFrustum for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Referenced by Frustum().

| void trBase::Matrixd::MakeFrustum | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | zNear, | ||
| float | zFar | ||
| ) |
Set to a perspective projection.
See glFrustum for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Definition at line 86 of file Matrixd.cpp.
References mMatrix.
| void trBase::Matrixd::MakeIdentity | ( | ) |
Reset this matrix to be an Identity Matrix.
Set the position and orientation to be a view matrix, using the same convention as gluLookAt.
| eye | The eye. |
| center | The center. |
| up | The up. |
Set the position and orientation to be a view matrix, using the same convention as gluLookAt.
| eye | The eye. |
| center | The center. |
| up | The up. |
| void trBase::Matrixd::MakeOrtho | ( | double | left, |
| double | right, | ||
| double | bottom, | ||
| double | top, | ||
| double | zNear, | ||
| double | zFar | ||
| ) |
Set to an orthographic projection.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Referenced by Ortho().

| void trBase::Matrixd::MakeOrtho | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | zNear, | ||
| float | zFar | ||
| ) |
Set to an orthographic projection.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Definition at line 68 of file Matrixd.cpp.
References mMatrix.
| void trBase::Matrixd::MakeOrtho2D | ( | double | left, |
| double | right, | ||
| double | bottom, | ||
| double | top | ||
| ) |
Set to a 2D orthographic projection.
See glOrtho2D for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
Referenced by Ortho2D().

| void trBase::Matrixd::MakeOrtho2D | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top | ||
| ) |
Set to a 2D orthographic projection.
See glOrtho2D for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
Definition at line 80 of file Matrixd.cpp.
References mMatrix.
| void trBase::Matrixd::MakePerspective | ( | double | fovy, |
| double | aspectRatio, | ||
| double | zNear, | ||
| double | zFar | ||
| ) |
Set to a symmetrical perspective projection.
See gluPerspective for further details. Aspect ratio is defined as width/height.
| fovy | The fovy. |
| aspectRatio | The aspect ratio. |
| zNear | The near. |
| zFar | The far. |
Referenced by Perspective().

| void trBase::Matrixd::MakePerspective | ( | float | fovy, |
| float | aspectRatio, | ||
| float | zNear, | ||
| float | zFar | ||
| ) |
Set to a symmetrical perspective projection.
See gluPerspective for further details. Aspect ratio is defined as width/height.
| fovy | The fovy. |
| aspectRatio | The aspect ratio. |
| zNear | The near. |
| zFar | The far. |
Definition at line 98 of file Matrixd.cpp.
References mMatrix.
Reset this matrix to be a rotational matrix of the passed in value.
| from | Source for the. |
| to | to. |
Reset this matrix to be a rotational matrix of the passed in value.
| from | Source for the. |
| to | to. |
| void trBase::Matrixd::MakeRotate | ( | value_type | angle, |
| const Vec3f & | axis | ||
| ) |
Reset this matrix to be a rotational matrix of the passed in value.
| angle | The angle. |
| axis | The axis. |
| void trBase::Matrixd::MakeRotate | ( | value_type | angle, |
| const Vec3d & | axis | ||
| ) |
Reset this matrix to be a rotational matrix of the passed in value.
| angle | The angle. |
| axis | The axis. |
| void trBase::Matrixd::MakeRotate | ( | value_type | angle, |
| value_type | x, | ||
| value_type | y, | ||
| value_type | z | ||
| ) |
Reset this matrix to be a rotational matrix of the passed in value.
| angle | The angle. |
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
| void trBase::Matrixd::MakeRotate | ( | const Quat & | q | ) |
Reset this matrix to be a rotational matrix of the passed in value.
| q | The Quat to process. |
| void trBase::Matrixd::MakeRotate | ( | value_type | angle1, |
| const Vec3f & | axis1, | ||
| value_type | angle2, | ||
| const Vec3f & | axis2, | ||
| value_type | angle3, | ||
| const Vec3f & | axis3 | ||
| ) |
Reset this matrix to be a rotational matrix of the passed in value.
| angle1 | The first angle. |
| axis1 | The first axis. |
| angle2 | The second angle. |
| axis2 | The second axis. |
| angle3 | The third angle. |
| axis3 | The third axis. |
| void trBase::Matrixd::MakeRotate | ( | value_type | angle1, |
| const Vec3d & | axis1, | ||
| value_type | angle2, | ||
| const Vec3d & | axis2, | ||
| value_type | angle3, | ||
| const Vec3d & | axis3 | ||
| ) |
Reset this matrix to be a rotational matrix of the passed in value.
| angle1 | The first angle. |
| axis1 | The first axis. |
| angle2 | The second angle. |
| axis2 | The second axis. |
| angle3 | The third angle. |
| axis3 | The third axis. |
| void trBase::Matrixd::MakeScale | ( | const Vec3f & | v | ) |
Reset this matrix to be a scale matrix of the passed in value.
| v | The Vec3f to process. |
| void trBase::Matrixd::MakeScale | ( | const Vec3d & | v | ) |
Reset this matrix to be a scale matrix of the passed in value.
| v | The Vec3d to process. |
| void trBase::Matrixd::MakeScale | ( | value_type | x, |
| value_type | y, | ||
| value_type | z | ||
| ) |
Reset this matrix to be a scale matrix of the passed in value.
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
| void trBase::Matrixd::MakeTranslate | ( | const Vec3f & | v | ) |
Reset this matrix to be a translation matrix of the passed in value.
| v | The Vec3f to process. |
| void trBase::Matrixd::MakeTranslate | ( | const Vec3d & | v | ) |
Reset this matrix to be a translation matrix of the passed in value.
| v | The Vec3d to process. |
| void trBase::Matrixd::MakeTranslate | ( | value_type | x, |
| value_type | y, | ||
| value_type | z | ||
| ) |
Reset this matrix to be a translation matrix of the passed in value.
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
| trBase::Matrixd::operator const osg::Matrixd & | ( | ) | const |
Implicit conversion operator to OSG Matrix.
| trBase::Matrixd::operator osg::Matrixd | ( | ) | const |
Implicit conversion operator to OSG Matrix.
| trBase::Matrixd::operator osg::Matrixd & | ( | ) |
Implicit conversion operator to OSG Matrix.
| trBase::Matrixd::operator osg::Matrixd * | ( | ) |
Implicit conversion operator to OSG Matrix.
| bool trBase::Matrixd::operator!= | ( | const Matrixd & | m | ) | const |
Inequality operator.
| m | The Matrixd to process. |
| value_type & trBase::Matrixd::operator() | ( | int | row, |
| int | col | ||
| ) |
Returns a specific row and column value of the matrix.
| row | The row. |
| col | The col. |
| value_type trBase::Matrixd::operator() | ( | int | row, |
| int | col | ||
| ) | const |
Returns a specific row and column value of the matrix.
| row | The row. |
| col | The col. |
| Matrixd trBase::Matrixd::operator* | ( | value_type | rhs | ) | const |
Multiply by scalar.
| rhs | The right hand side. |
| void trBase::Matrixd::operator*= | ( | const Matrixd & | other | ) |
Unary Multiply by a matrix.
| other | The other. |
| Matrixd & trBase::Matrixd::operator*= | ( | value_type | rhs | ) |
Unary multiply by scalar.
More efficient than *.
| rhs | The right hand side. |
Binary vector add.
| rhs | The right hand side. |
Unary vector add.
More efficient than +.
| rhs | The right hand side. |
Binary vector subtract.
| rhs | The right hand side. |
Unary vector subtract.
More efficient than -.
| rhs | The right hand side. |
| Matrixd trBase::Matrixd::operator/ | ( | value_type | rhs | ) | const |
Divide by scalar.
| rhs | The right hand side. |
| Matrixd & trBase::Matrixd::operator/= | ( | value_type | rhs | ) |
Unary divide by scalar.
More efficient than /.
| rhs | The right hand side. |
| bool trBase::Matrixd::operator< | ( | const Matrixd & | m | ) | const |
Less than by operator.
| m | The Matrixd to process. |
Set operator.
| rhs | The right hand side. |
Set operator.
| rhs | The right hand side. |
Definition at line 51 of file Matrixd.cpp.
References trBase::Matrixf::Ptr(), and Set().

| bool trBase::Matrixd::operator== | ( | const Matrixd & | m | ) | const |
Equality operator.
| m | The Matrixd to process. |
| bool trBase::Matrixd::operator> | ( | const Matrixd & | m | ) | const |
Greater than by operator.
| m | The Matrixd to process. |
|
static |
Create an orthographic projection matrix.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
|
static |
Create an orthographic projection matrix.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
| zNear | The near. |
| zFar | The far. |
Definition at line 110 of file Matrixd.cpp.
References MakeOrtho().

|
static |
Create a 2D orthographic projection matrix.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
|
static |
Create a 2D orthographic projection matrix.
See glOrtho for further details.
| left | The left. |
| right | The right. |
| bottom | The bottom. |
| top | The top. |
Definition at line 118 of file Matrixd.cpp.
References MakeOrtho2D().

| void trBase::Matrixd::OrthoNormalize | ( | const Matrixd & | rhs | ) |
Ortho-normalize the 3x3 rotation & scale matrix.
| rhs | The right hand side. |
|
static |
Create a symmetrical perspective projection matrix.
See gluPerspective for further details. Aspect ratio is defined as width/height.
| fovy | The fovy. |
| aspectRatio | The aspect ratio. |
| zNear | The near. |
| zFar | The far. |
Definition at line 134 of file Matrixd.cpp.
References MakePerspective().

|
static |
Create a symmetrical perspective projection matrix.
See gluPerspective for further details. Aspect ratio is defined as width/height.
| fovy | The fovy. |
| aspectRatio | The aspect ratio. |
| zNear | The near. |
| zFar | The far. |
| void trBase::Matrixd::PostMult | ( | const Matrixd & | m | ) |
| void trBase::Matrixd::PostMultRotate | ( | const Quat & | q | ) |
Optimized version of postMult(rotate(q));.
| q | The Quat to process. |
| void trBase::Matrixd::PostMultScale | ( | const Vec3d & | v | ) |
Optimized version of postMult(scale(v));.
| v | The Vec3d to process. |
| void trBase::Matrixd::PostMultScale | ( | const Vec3f & | v | ) |
Optimized version of postMult(scale(v));.
| v | The Vec3f to process. |
| void trBase::Matrixd::PostMultTranslate | ( | const Vec3d & | v | ) |
Optimized version of postMult(translate(v));.
| v | The Vec3d to process. |
| void trBase::Matrixd::PostMultTranslate | ( | const Vec3f & | v | ) |
Optimized version of postMult(translate(v));.
| v | The Vec3f to process. |
| void trBase::Matrixd::PreMult | ( | const Matrixd & | m | ) |
| void trBase::Matrixd::PreMultRotate | ( | const Quat & | q | ) |
Optimized version of preMult(rotate(q));.
| q | The Quat to process. |
| void trBase::Matrixd::PreMultScale | ( | const Vec3d & | v | ) |
Optimized version of preMult(scale(v));.
| v | The Vec3d to process. |
| void trBase::Matrixd::PreMultScale | ( | const Vec3f & | v | ) |
Optimized version of preMult(scale(v));.
| v | The Vec3f to process. |
| void trBase::Matrixd::PreMultTranslate | ( | const Vec3d & | v | ) |
Optimized version of preMult(translate(v));.
| v | The Vec3d to process. |
| void trBase::Matrixd::PreMultTranslate | ( | const Vec3f & | v | ) |
Optimized version of preMult(translate(v));.
| v | The Vec3f to process. |
| value_type * trBase::Matrixd::Ptr | ( | ) |
Pointer to the internal Matrix array.
Referenced by trBase::Matrixf::operator=(), and trBase::Matrixf::Set().

| const value_type * trBase::Matrixd::Ptr | ( | ) | const |
Pointer to the internal Matrix array.
|
static |
Static method to create a Rotational matrix.
| angle | The angle. |
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
|
static |
Static method to create a Rotational matrix.
| angle | The angle. |
| axis | The axis. |
|
static |
Static method to create a Rotational matrix.
| angle | The angle. |
| axis | The axis. |
|
static |
Static method to create a Rotational matrix.
| angle1 | The first angle. |
| axis1 | The first axis. |
| angle2 | The second angle. |
| axis2 | The second axis. |
| angle3 | The third angle. |
| axis3 | The third axis. |
|
static |
Static method to create a Rotational matrix.
| angle1 | The first angle. |
| axis1 | The first axis. |
| angle2 | The second angle. |
| axis2 | The second axis. |
| angle3 | The third angle. |
| axis3 | The third axis. |
|
static |
Static method to create a Scale matrix.
| sx | The sx. |
| sy | The sy. |
| sz | The size. |
| void trBase::Matrixd::Set | ( | const Matrixd & | rhs | ) |
Set the current Matrix from a passed in one.
| rhs | The Right hand side to set. |
Referenced by operator=(), and Set().

| void trBase::Matrixd::Set | ( | const Matrixf & | rhs | ) |
Set the current Matrix from a passed in one.
| rhs | The Right hand side to set. |
Definition at line 58 of file Matrixd.cpp.
References trBase::Matrixf::Ptr(), and Set().

| void trBase::Matrixd::Set | ( | float const *const | ptr | ) |
Set the current Matrix from a passed in values array.
| ptr | The pointer. |
| void trBase::Matrixd::Set | ( | double const *const | ptr | ) |
Set the current Matrix from a passed in values array.
| void trBase::Matrixd::Set | ( | value_type | a00, |
| value_type | a01, | ||
| value_type | a02, | ||
| value_type | a03, | ||
| value_type | a10, | ||
| value_type | a11, | ||
| value_type | a12, | ||
| value_type | a13, | ||
| value_type | a20, | ||
| value_type | a21, | ||
| value_type | a22, | ||
| value_type | a23, | ||
| value_type | a30, | ||
| value_type | a31, | ||
| value_type | a32, | ||
| value_type | a33 | ||
| ) |
Set the current Matrix from a passed in values.
| a00 | The [0][0] value of the matrix. |
| a01 | The [0][1] value of the matrix. |
| a02 | The [0][2] value of the matrix. |
| a03 | The [0][3] value of the matrix. |
| a10 | The [1][0] value of the matrix. |
| a11 | The [1][1] value of the matrix. |
| a12 | The [1][2] value of the matrix. |
| a13 | The [1][3] value of the matrix. |
| a20 | The [2][0] value of the matrix. |
| a21 | The [2][1] value of the matrix. |
| a22 | The [2][2] value of the matrix. |
| a23 | The [2][3] value of the matrix. |
| a30 | The [3][0] value of the matrix. |
| a31 | The [3][1] value of the matrix. |
| a32 | The [3][2] value of the matrix. |
| a33 | The [3][3] value of the matrix. |
| void trBase::Matrixd::SetRotate | ( | const Quat & | q | ) |
Applies the rotation to the matrix.
| q | The Quat to process. |
| void trBase::Matrixd::SetScale | ( | value_type | x, |
| value_type | y, | ||
| value_type | z | ||
| ) |
Sets the scale values of the matrix.
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
| void trBase::Matrixd::SetScale | ( | const Vec3f & | v | ) |
Sets the scale values of the matrix.
| v | The Vec3f to process. |
| void trBase::Matrixd::SetScale | ( | const Vec3d & | v | ) |
Sets the scale values of the matrix.
| v | The Vec3d to process. |
| void trBase::Matrixd::SetTrans | ( | value_type | tx, |
| value_type | ty, | ||
| value_type | tz | ||
| ) |
Sets the translation area of the matrix.
| tx | The transmit. |
| ty | The ty. |
| tz | The tz. |
| void trBase::Matrixd::SetTrans | ( | const Vec3f & | v | ) |
Sets the translation area of the matrix.
| v | The Vec3f to process. |
| void trBase::Matrixd::SetTrans | ( | const Vec3d & | v | ) |
Sets the translation area of the matrix.
| v | The Vec3d to process. |
| std::string trBase::Matrixd::ToString | ( | int | precision = -1 | ) |
Convert this object into a string representation.
| precision | (Optional) The precision. |
|
static |
Static method to create a Translate matrix.
| x | The value_type to process. |
| y | The value_type to process. |
| z | The value_type to process. |
| bool trBase::Matrixd::Valid | ( | ) | const |
Returns true if the Matrix is not NaN.
|
protected |
Definition at line 1750 of file Matrixd.h.
Referenced by GetFrustum(), GetOrtho(), GetPerspective(), MakeFrustum(), MakeOrtho(), MakeOrtho2D(), and MakePerspective().