osg::Matrixd Class Reference

`#include <Matrixd>`

Inheritance diagram for osg::Matrixd:

## Public Types

typedef double | value_type
typedef float | other_value_type

## Public Member Functions

| Matrixd ()
| Matrixd (const Matrixd &mat)
| Matrixd (const Matrixf &mat)
| Matrixd (float const *const ptr)
| Matrixd (double const *const ptr)
| Matrixd (const Quat &quat)
| 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)
| ~Matrixd ()
int | compare (const Matrixd &m) const
bool | operator< (const Matrixd &m) const
bool | operator== (const Matrixd &m) const
bool | operator!= (const Matrixd &m) const
value_type & | operator() (int row, int col)
value_type | operator() (int row, int col) const
bool | valid () const
bool | isNaN () const
Matrixd & | operator= (const Matrixd &rhs)
Matrixd & | operator= (const Matrixf &other)
void | set (const Matrixd &rhs)
void | set (const Matrixf &rhs)
void | set (float const *const ptr)
void | set (double const *const ptr)
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)
value_type * | ptr ()
const value_type * | ptr () const
bool | isIdentity () const
void | makeIdentity ()
void | makeScale (const Vec3f &)
void | makeScale (const Vec3d &)
void | makeScale (value_type, value_type, value_type)
void | makeTranslate (const Vec3f &)
void | makeTranslate (const Vec3d &)
void | makeTranslate (value_type, value_type, value_type)
void | makeRotate (const Vec3f &from, const Vec3f &to)
void | makeRotate (const Vec3d &from, const Vec3d &to)
void | makeRotate (value_type angle, const Vec3f &axis)
void | makeRotate (value_type angle, const Vec3d &axis)
void | makeRotate (value_type angle, value_type x, value_type y, value_type z)
void | makeRotate (const Quat &)
void | makeRotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3)
void | makeRotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
void | decompose (osg::Vec3f &translation, osg::Quat &rotation, osg::Vec3f &scale, osg::Quat &so) const
void | decompose (osg::Vec3d &translation, osg::Quat &rotation, osg::Vec3d &scale, osg::Quat &so) const
void | makeOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
bool | getOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
bool | getOrtho (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
void | makeOrtho2D (double left, double right, double bottom, double top)
void | makeFrustum (double left, double right, double bottom, double top, double zNear, double zFar)
bool | getFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
bool | getFrustum (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
void | makePerspective (double fovy, double aspectRatio, double zNear, double zFar)
bool | getPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const
bool | getPerspective (float &fovy, float &aspectRatio, float &zNear, float &zFar) const
void | makeLookAt (const Vec3d &eye, const Vec3d &center, const Vec3d &up)
void | getLookAt (Vec3f &eye, Vec3f &center, Vec3f &up, value_type lookDistance=1.0f) const
void | getLookAt (Vec3d &eye, Vec3d &center, Vec3d &up, value_type lookDistance=1.0f) const
bool | invert (const Matrixd &rhs)
bool | invert_4x3 (const Matrixd &rhs)
bool | invert_4x4 (const Matrixd &rhs)
bool | transpose (const Matrixd &rhs)
bool | transpose3x3 (const Matrixd &rhs)
void | orthoNormalize (const Matrixd &rhs)
Vec3f | preMult (const Vec3f &v) const
Vec3d | preMult (const Vec3d &v) const
Vec3f | postMult (const Vec3f &v) const
Vec3d | postMult (const Vec3d &v) const
Vec3f | operator* (const Vec3f &v) const
Vec3d | operator* (const Vec3d &v) const
Vec4f | preMult (const Vec4f &v) const
Vec4d | preMult (const Vec4d &v) const
Vec4f | postMult (const Vec4f &v) const
Vec4d | postMult (const Vec4d &v) const
Vec4f | operator* (const Vec4f &v) const
Vec4d | operator* (const Vec4d &v) const
void | setRotate (const Quat &q)
Quat | getRotate () const
void | setTrans (value_type tx, value_type ty, value_type tz)
void | setTrans (const Vec3f &v)
void | setTrans (const Vec3d &v)
Vec3d | getTrans () const
Vec3d | getScale () const
void | mult (const Matrixd &, const Matrixd &)
void | preMult (const Matrixd &)
void | postMult (const Matrixd &)
void | preMultTranslate (const Vec3d &v)
void | preMultTranslate (const Vec3f &v)
void | postMultTranslate (const Vec3d &v)
void | postMultTranslate (const Vec3f &v)
void | preMultScale (const Vec3d &v)
void | preMultScale (const Vec3f &v)
void | postMultScale (const Vec3d &v)
void | postMultScale (const Vec3f &v)
void | preMultRotate (const Quat &q)
void | postMultRotate (const Quat &q)
void | operator*= (const Matrixd &other)
Matrixd | operator* (const Matrixd &m) const

## Static Public Member Functions

static Matrixd | identity (void)
static Matrixd | scale (const Vec3f &sv)
static Matrixd | scale (const Vec3d &sv)
static Matrixd | scale (value_type sx, value_type sy, value_type sz)
static Matrixd | translate (const Vec3f &dv)
static Matrixd | translate (const Vec3d &dv)
static Matrixd | translate (value_type x, value_type y, value_type z)
static Matrixd | rotate (const Vec3f &from, const Vec3f &to)
static Matrixd | rotate (const Vec3d &from, const Vec3d &to)
static Matrixd | rotate (value_type angle, value_type x, value_type y, value_type z)
static Matrixd | rotate (value_type angle, const Vec3f &axis)
static Matrixd | rotate (value_type angle, const Vec3d &axis)
static Matrixd | rotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3)
static Matrixd | rotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
static Matrixd | rotate (const Quat &quat)
static Matrixd | inverse (const Matrixd &matrix)
static Matrixd | orthoNormal (const Matrixd &matrix)
static Matrixd | ortho (double left, double right, double bottom, double top, double zNear, double zFar)
static Matrixd | ortho2D (double left, double right, double bottom, double top)
static Matrixd | frustum (double left, double right, double bottom, double top, double zNear, double zFar)
static Matrixd | perspective (double fovy, double aspectRatio, double zNear, double zFar)
static Matrixd | lookAt (const Vec3f &eye, const Vec3f &center, const Vec3f &up)
static Matrixd | lookAt (const Vec3d &eye, const Vec3d &center, const Vec3d &up)
static Vec3f | transform3x3 (const Vec3f &v, const Matrixd &m)
static Vec3d | transform3x3 (const Vec3d &v, const Matrixd &m)
static Vec3f | transform3x3 (const Matrixd &m, const Vec3f &v)
static Vec3d | transform3x3 (const Matrixd &m, const Vec3d &v)

## Protected Attributes

value_type | _mat [4][4]

## Member Typedef Documentation

## other_value_type

typedef float osg::Matrixd::other_value_type

## value_type

typedef double osg::Matrixd::value_type

## Constructor & Destructor Documentation

## Matrixd() [1/7]

osg::Matrixd::Matrixd | ( |  | ) |

inline

References makeIdentity().

Referenced by compare(), frustum(), identity(), inverse(), invert(), invert_4x3(), invert_4x4(), lookAt(), lookAt(), Matrixd(), mult(), operator!=(), operator*(), operator*=(), operator<(), operator=(), operator=(), operator==(), ortho(), ortho2D(), orthoNormal(), orthoNormalize(), perspective(), postMult(), postMultRotate(), preMult(), preMultRotate(), osg::RefMatrixd::RefMatrixd(), osg::RefMatrixd::RefMatrixd(), osg::RefMatrixd::RefMatrixd(), osg::RefMatrixd::RefMatrixd(), osg::RefMatrixd::RefMatrixd(), osg::RefMatrixd::RefMatrixd(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), scale(), scale(), scale(), set(), transform3x3(), transform3x3(), transform3x3(), transform3x3(), translate(), translate(), translate(), transpose(), and transpose3x3().

## Matrixd() [2/7]

osg::Matrixd::Matrixd | ( | const Matrixd & | mat | ) |

inline

References Matrixd(), ptr(), and set().

## Matrixd() [3/7]

osg::Matrixd::Matrixd | ( | const Matrixf & | mat | ) |

## Matrixd() [4/7]

osg::Matrixd::Matrixd | ( | float const *const | ptr | ) |

inline explicit

References ptr(), and set().

## Matrixd() [5/7]

osg::Matrixd::Matrixd | ( | double const *const | ptr | ) |

inline explicit

References ptr(), and set().

## Matrixd() [6/7]

osg::Matrixd::Matrixd | ( | const Quat & | quat | ) |

inline explicit

References makeRotate().

## Matrixd() [7/7]

osg::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 )

## ~Matrixd()

osg::Matrixd::~Matrixd | ( |  | ) |

inline

## Member Function Documentation

## compare()

int osg::Matrixd::compare | ( | const Matrixd & | m | ) | const

References Matrixd().

Referenced by operator!=(), operator<(), and operator==().

## decompose() [1/2]

void osg::Matrixd::decompose | ( | osg::Vec3d & | translation,
|  | osg::Quat & | rotation,
|  | osg::Vec3d & | scale,
|  | osg::Quat & | so ) const

decompose the matrix into translation, rotation, scale and scale orientation.

References scale().

## decompose() [2/2]

void osg::Matrixd::decompose | ( | osg::Vec3f & | translation,
|  | osg::Quat & | rotation,
|  | osg::Vec3f & | scale,
|  | osg::Quat & | so ) const

decompose the matrix into translation, rotation, scale and scale orientation.

References scale().

## frustum()

Matrixd osg::Matrixd::frustum | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top,
|  | double | zNear,
|  | double | zFar )

inline static

Create a perspective projection. See glFrustum for further details.

References makeFrustum(), and Matrixd().

Referenced by orthoNormalize().

## getFrustum() [1/2]

bool osg::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.

## getFrustum() [2/2]

bool osg::Matrixd::getFrustum | ( | float & | left,
|  | float & | right,
|  | float & | bottom,
|  | float & | top,
|  | float & | zNear,
|  | float & | zFar ) const

float version of getFrustum(..)

## getLookAt() [1/2]

void osg::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.

## getLookAt() [2/2]

void osg::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.

Referenced by osgManipulator::PointerInfo::setCamera().

## getOrtho() [1/2]

bool osg::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.

## getOrtho() [2/2]

bool osg::Matrixd::getOrtho | ( | float & | left,
|  | float & | right,
|  | float & | bottom,
|  | float & | top,
|  | float & | zNear,
|  | float & | zFar ) const

float version of getOrtho(..)

## getPerspective() [1/2]

bool osg::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. Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. In these configuration one should use the AsFrustum method instead.

## getPerspective() [2/2]

bool osg::Matrixd::getPerspective | ( | float & | fovy,
|  | float & | aspectRatio,
|  | float & | zNear,
|  | float & | zFar ) const

float version of getPerspective(..)

## getRotate()

Quat osg::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.

## getScale()

Vec3d osg::Matrixd::getScale | ( |  | ) | const

inline

References _mat, and osg::Vec3d::length().

## getTrans()

Vec3d osg::Matrixd::getTrans | ( |  | ) | const

inline

References _mat.

## identity()

Matrixd osg::Matrixd::identity | ( | void |  | ) |

inline static

References makeIdentity(), and Matrixd().

Referenced by osg::View::addSlave(), osgAnimation::RigTransformSoftware::VertexGroup::computeMatrixForVertexSet(), and orthoNormalize().

## inverse()

Matrixd osg::Matrixd::inverse | ( | const Matrixd & | matrix | ) |

inline static

References invert(), and Matrixd().

Referenced by osgGA::AnimationPathManipulator::getInverseMatrix(), osgUtil::LineSegmentIntersector::Intersection::getWorldIntersectNormal(), osgUtil::RayIntersector::Intersection::getWorldIntersectNormal(), orthoNormalize(), osgGA::DriveManipulator::setByInverseMatrix(), and osgGA::SphericalManipulator::setByInverseMatrix().

## invert()

bool osg::Matrixd::invert | ( | const Matrixd & | rhs | ) |

inline

invert the matrix rhs, automatically select invert_4x3 or invert_4x4.

References _mat, invert_4x3(), invert_4x4(), and Matrixd().

Referenced by inverse(), osg::Plane::transform(), and osg::Polytope::transform().

## invert_4x3()

bool osg::Matrixd::invert_4x3 | ( | const Matrixd & | rhs | ) |

4x3 matrix invert, not right hand column is assumed to be 0,0,0,1.

References Matrixd().

Referenced by invert().

## invert_4x4()

bool osg::Matrixd::invert_4x4 | ( | const Matrixd & | rhs | ) |

full 4x4 matrix invert.

References Matrixd().

Referenced by invert().

## isIdentity()

bool osg::Matrixd::isIdentity | ( |  | ) | const

inline

References _mat.

## isNaN()

bool osg::Matrixd::isNaN | ( |  | ) | const

inline

References _mat, and osg::isNaN().

Referenced by valid().

## lookAt() [1/2]

Matrixd osg::Matrixd::lookAt | ( | const Vec3d & | eye,
|  | const Vec3d & | center,
|  | const Vec3d & | up )

inline static

Create the position and orientation as per a camera, using the same convention as gluLookAt.

References makeLookAt(), and Matrixd().

## lookAt() [2/2]

Matrixd osg::Matrixd::lookAt | ( | const Vec3f & | eye,
|  | const Vec3f & | center,
|  | const Vec3f & | up )

inline static

Create the position and orientation as per a camera, using the same convention as gluLookAt.

References makeLookAt(), and Matrixd().

Referenced by orthoNormalize().

## makeFrustum()

void osg::Matrixd::makeFrustum | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top,
|  | double | zNear,
|  | double | zFar )

Set to a perspective projection. See glFrustum for further details.

Referenced by frustum().

## makeIdentity()

void osg::Matrixd::makeIdentity | ( |  | ) |

Referenced by osg::Transform::computeLocalToWorldMatrix(), osg::Transform::computeWorldToLocalMatrix(), identity(), and Matrixd().

## makeLookAt()

void osg::Matrixd::makeLookAt | ( | const Vec3d & | eye,
|  | const Vec3d & | center,
|  | const Vec3d & | up )

Set the position and orientation to be a view matrix, using the same convention as gluLookAt.

Referenced by lookAt(), and lookAt().

## makeOrtho()

void osg::Matrixd::makeOrtho | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top,
|  | double | zNear,
|  | double | zFar )

Set to an orthographic projection. See glOrtho for further details.

Referenced by makeOrtho2D(), and ortho().

## makeOrtho2D()

void osg::Matrixd::makeOrtho2D | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top )

inline

Set to a 2D orthographic projection. See glOrtho2D for further details.

References makeOrtho().

Referenced by ortho2D().

## makePerspective()

void osg::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.

Referenced by perspective().

## makeRotate() [1/8]

void osg::Matrixd::makeRotate | ( | const Quat & |  | ) |

## makeRotate() [2/8]

void osg::Matrixd::makeRotate | ( | const Vec3d & | from,
|  | const Vec3d & | to )

## makeRotate() [3/8]

void osg::Matrixd::makeRotate | ( | const Vec3f & | from,
|  | const Vec3f & | to )

Referenced by osg::AnimationPath::ControlPoint::getInverse(), osg::AnimationPath::ControlPoint::getMatrix(), Matrixd(), orthoNormalize(), rotate(), rotate(), rotate(), rotate(), rotate(), rotate(), and rotate().

## makeRotate() [4/8]

void osg::Matrixd::makeRotate | ( | value_type | angle,
|  | const Vec3d & | axis )

## makeRotate() [5/8]

void osg::Matrixd::makeRotate | ( | value_type | angle,
|  | const Vec3f & | axis )

## makeRotate() [6/8]

void osg::Matrixd::makeRotate | ( | value_type | angle,
|  | value_type | x,
|  | value_type | y,
|  | value_type | z )

## makeRotate() [7/8]

void osg::Matrixd::makeRotate | ( | value_type | angle1,
|  | const Vec3d & | axis1,
|  | value_type | angle2,
|  | const Vec3d & | axis2,
|  | value_type | angle3,
|  | const Vec3d & | axis3 )

## makeRotate() [8/8]

void osg::Matrixd::makeRotate | ( | value_type | angle1,
|  | const Vec3f & | axis1,
|  | value_type | angle2,
|  | const Vec3f & | axis2,
|  | value_type | angle3,
|  | const Vec3f & | axis3 )

## makeScale() [1/3]

void osg::Matrixd::makeScale | ( | const Vec3d & |  | ) |

## makeScale() [2/3]

void osg::Matrixd::makeScale | ( | const Vec3f & |  | ) |

Referenced by scale().

## makeScale() [3/3]

void osg::Matrixd::makeScale | ( | value_type | ,
|  | value_type | ,
|  | value_type | )

## makeTranslate() [1/3]

void osg::Matrixd::makeTranslate | ( | const Vec3d & |  | ) |

## makeTranslate() [2/3]

void osg::Matrixd::makeTranslate | ( | const Vec3f & |  | ) |

Referenced by osg::EllipsoidModel::computeLocalToWorldTransformFromLatLongHeight(), osg::EllipsoidModel::computeLocalToWorldTransformFromXYZ(), and translate().

## makeTranslate() [3/3]

void osg::Matrixd::makeTranslate | ( | value_type | ,
|  | value_type | ,
|  | value_type | )

## mult()

void osg::Matrixd::mult | ( | const Matrixd & | ,
|  | const Matrixd & | )

References Matrixd().

Referenced by operator*().

## operator!=()

bool osg::Matrixd::operator!= | ( | const Matrixd & | m | ) | const

inline

References compare(), and Matrixd().

## operator()() [1/2]

value_type & osg::Matrixd::operator() | ( | int | row,
|  | int | col )

inline

References _mat.

## operator()() [2/2]

value_type osg::Matrixd::operator() | ( | int | row,
|  | int | col ) const

inline

References _mat.

## operator*() [1/5]

Matrixd osg::Matrixd::operator* | ( | const Matrixd & | m | ) | const

inline

References Matrixd(), and mult().

## operator*() [2/5]

Vec3d osg::Matrixd::operator* | ( | const Vec3d & | v | ) | const

inline

References postMult().

## operator*() [3/5]

Vec3f osg::Matrixd::operator* | ( | const Vec3f & | v | ) | const

inline

References postMult().

## operator*() [4/5]

Vec4d osg::Matrixd::operator* | ( | const Vec4d & | v | ) | const

inline

References postMult().

## operator*() [5/5]

Vec4f osg::Matrixd::operator* | ( | const Vec4f & | v | ) | const

inline

References postMult().

## operator*=()

void osg::Matrixd::operator*= | ( | const Matrixd & | other | ) |

inline

References Matrixd(), and postMult().

## operator<()

bool osg::Matrixd::operator< | ( | const Matrixd & | m | ) | const

inline

References compare(), and Matrixd().

## operator=() [1/2]

Matrixd & osg::Matrixd::operator= | ( | const Matrixd & | rhs | ) |

inline

References Matrixd(), ptr(), and set().

## operator=() [2/2]

Matrixd & osg::Matrixd::operator= | ( | const Matrixf & | other | ) |

References Matrixd().

## operator==()

bool osg::Matrixd::operator== | ( | const Matrixd & | m | ) | const

inline

References compare(), and Matrixd().

## ortho()

Matrixd osg::Matrixd::ortho | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top,
|  | double | zNear,
|  | double | zFar )

inline static

Create an orthographic projection matrix. See glOrtho for further details.

References makeOrtho(), and Matrixd().

Referenced by orthoNormalize().

## ortho2D()

Matrixd osg::Matrixd::ortho2D | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top )

inline static

Create a 2D orthographic projection. See glOrtho for further details.

References makeOrtho2D(), and Matrixd().

Referenced by orthoNormalize().

## orthoNormal()

Matrixd osg::Matrixd::orthoNormal | ( | const Matrixd & | matrix | ) |

inline static

References Matrixd(), and orthoNormalize().

Referenced by orthoNormalize().

## orthoNormalize()

void osg::Matrixd::orthoNormalize | ( | const Matrixd & | rhs | ) |

ortho-normalize the 3x3 rotation & scale matrix

References frustum(), identity(), inverse(), lookAt(), makeRotate(), Matrixd(), ortho(), ortho2D(), orthoNormal(), perspective(), postMult(), preMult(), rotate(), scale(), set(), and translate().

Referenced by orthoNormal().

## perspective()

Matrixd osg::Matrixd::perspective | ( | double | fovy,
|  | double | aspectRatio,
|  | double | zNear,
|  | double | zFar )

inline static

Create a symmetrical perspective projection. See gluPerspective for further details. Aspect ratio is defined as width/height.

References makePerspective(), and Matrixd().

Referenced by orthoNormalize().

## postMult() [1/5]

void osg::Matrixd::postMult | ( | const Matrixd & |  | ) |

References Matrixd(), postMultRotate(), postMultScale(), postMultTranslate(), preMultRotate(), preMultScale(), and preMultTranslate().

## postMult() [2/5]

Vec3d osg::Matrixd::postMult | ( | const Vec3d & | v | ) | const

inline

References _mat, osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## postMult() [3/5]

Vec3f osg::Matrixd::postMult | ( | const Vec3f & | v | ) | const

inline

References _mat, osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

Referenced by operator*(), operator*(), operator*(), operator*(), operator*=(), orthoNormalize(), and postMultRotate().

## postMult() [4/5]

Vec4d osg::Matrixd::postMult | ( | const Vec4d & | v | ) | const

inline

References _mat, osg::Vec4d::w(), osg::Vec4d::x(), osg::Vec4d::y(), and osg::Vec4d::z().

## postMult() [5/5]

Vec4f osg::Matrixd::postMult | ( | const Vec4f & | v | ) | const

inline

References _mat, osg::Vec4f::w(), osg::Vec4f::x(), osg::Vec4f::y(), and osg::Vec4f::z().

## postMultRotate()

void osg::Matrixd::postMultRotate | ( | const Quat & | q | ) |

inline

Optimized version of postMult(rotate(q));

References Matrixd(), postMult(), setRotate(), and osg::Quat::zeroRotation().

Referenced by postMult().

## postMultScale() [1/2]

void osg::Matrixd::postMultScale | ( | const Vec3d & | v | ) |

inline

Optimized version of postMult(scale(v));

References _mat.

Referenced by osg::AnimationPath::ControlPoint::getInverse(), and postMult().

## postMultScale() [2/2]

void osg::Matrixd::postMultScale | ( | const Vec3f & | v | ) |

inline

References _mat.

## postMultTranslate() [1/2]

void osg::Matrixd::postMultTranslate | ( | const Vec3d & | v | ) |

inline

Optimized version of postMult(translate(v));

References _mat.

Referenced by osg::AnimationPath::ControlPoint::getMatrix(), and postMult().

## postMultTranslate() [2/2]

void osg::Matrixd::postMultTranslate | ( | const Vec3f & | v | ) |

inline

References _mat.

## preMult() [1/5]

void osg::Matrixd::preMult | ( | const Matrixd & |  | ) |

References Matrixd().

## preMult() [2/5]

Vec3d osg::Matrixd::preMult | ( | const Vec3d & | v | ) | const

inline

References _mat, osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## preMult() [3/5]

Vec3f osg::Matrixd::preMult | ( | const Vec3f & | v | ) | const

inline

References _mat, osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

Referenced by osg::operator*(), osg::operator*(), osg::operator*(), osg::operator*(), orthoNormalize(), preMultRotate(), osgParticle::ParticleProcessor::rotateLocalToWorld(), osgParticle::ParticleProcessor::rotateWorldToLocal(), osgParticle::Particle::transformAngleVelocity(), osgParticle::ParticleProcessor::transformLocalToWorld(), osgParticle::Particle::transformPositionVelocity(), osgParticle::Particle::transformPositionVelocity(), and osgParticle::ParticleProcessor::transformWorldToLocal().

## preMult() [4/5]

Vec4d osg::Matrixd::preMult | ( | const Vec4d & | v | ) | const

inline

References _mat, osg::Vec4d::w(), osg::Vec4d::x(), osg::Vec4d::y(), and osg::Vec4d::z().

## preMult() [5/5]

Vec4f osg::Matrixd::preMult | ( | const Vec4f & | v | ) | const

inline

References _mat, osg::Vec4f::w(), osg::Vec4f::x(), osg::Vec4f::y(), and osg::Vec4f::z().

## preMultRotate()

void osg::Matrixd::preMultRotate | ( | const Quat & | q | ) |

inline

Optimized version of preMult(rotate(q));

References Matrixd(), preMult(), setRotate(), and osg::Quat::zeroRotation().

Referenced by postMult().

## preMultScale() [1/2]

void osg::Matrixd::preMultScale | ( | const Vec3d & | v | ) |

inline

Optimized version of preMult(scale(v));

References _mat.

Referenced by osg::AnimationPath::ControlPoint::getMatrix(), and postMult().

## preMultScale() [2/2]

void osg::Matrixd::preMultScale | ( | const Vec3f & | v | ) |

inline

References _mat.

## preMultTranslate() [1/2]

void osg::Matrixd::preMultTranslate | ( | const Vec3d & | v | ) |

inline

Optimized version of preMult(translate(v));

References _mat.

Referenced by osg::AnimationPath::ControlPoint::getInverse(), and postMult().

## preMultTranslate() [2/2]

void osg::Matrixd::preMultTranslate | ( | const Vec3f & | v | ) |

inline

References _mat.

## ptr() [1/2]

value_type * osg::Matrixd::ptr | ( |  | ) |

inline

References _mat.

Referenced by osgAnimation::RigTransformSoftware::VertexGroup::accummulateMatrix(), Matrixd(), Matrixd(), Matrixd(), operator=(), set(), set(), and set().

## ptr() [2/2]

const value_type * osg::Matrixd::ptr | ( |  | ) | const

inline

References _mat.

## rotate() [1/8]

Matrixd osg::Matrixd::rotate | ( | const Quat & | quat | ) |

inline static

References Matrixd().

## rotate() [2/8]

Matrixd osg::Matrixd::rotate | ( | const Vec3d & | from,
|  | const Vec3d & | to )

inline static

References makeRotate(), and Matrixd().

## rotate() [3/8]

Matrixd osg::Matrixd::rotate | ( | const Vec3f & | from,
|  | const Vec3f & | to )

inline static

References makeRotate(), and Matrixd().

Referenced by osgManipulator::Rotate3DCommand::getMotionMatrix(), and orthoNormalize().

## rotate() [4/8]

Matrixd osg::Matrixd::rotate | ( | value_type | angle,
|  | const Vec3d & | axis )

inline static

References makeRotate(), and Matrixd().

## rotate() [5/8]

Matrixd osg::Matrixd::rotate | ( | value_type | angle,
|  | const Vec3f & | axis )

inline static

References makeRotate(), and Matrixd().

## rotate() [6/8]

Matrixd osg::Matrixd::rotate | ( | value_type | angle,
|  | value_type | x,
|  | value_type | y,
|  | value_type | z )

inline static

References makeRotate(), and Matrixd().

## rotate() [7/8]

Matrixd osg::Matrixd::rotate | ( | value_type | angle1,
|  | const Vec3d & | axis1,
|  | value_type | angle2,
|  | const Vec3d & | axis2,
|  | value_type | angle3,
|  | const Vec3d & | axis3 )

inline static

References makeRotate(), and Matrixd().

## rotate() [8/8]

Matrixd osg::Matrixd::rotate | ( | value_type | angle1,
|  | const Vec3f & | axis1,
|  | value_type | angle2,
|  | const Vec3f & | axis2,
|  | value_type | angle3,
|  | const Vec3f & | axis3 )

inline static

References makeRotate(), and Matrixd().

## scale() [1/3]

Matrixd osg::Matrixd::scale | ( | const Vec3d & | sv | ) |

inline static

References Matrixd(), scale(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## scale() [2/3]

Matrixd osg::Matrixd::scale | ( | const Vec3f & | sv | ) |

inline static

References Matrixd(), scale(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

Referenced by osg::Viewport::computeWindowMatrix(), decompose(), decompose(), osgManipulator::Scale1DCommand::getMotionMatrix(), osgManipulator::Scale2DCommand::getMotionMatrix(), osgManipulator::ScaleUniformCommand::getMotionMatrix(), orthoNormalize(), scale(), and scale().

## scale() [3/3]

Matrixd osg::Matrixd::scale | ( | value_type | sx,
|  | value_type | sy,
|  | value_type | sz )

inline static

References makeScale(), and Matrixd().

## set() [1/5]

void osg::Matrixd::set | ( | const Matrixd & | rhs | ) |

inline

References Matrixd(), ptr(), and set().

Referenced by osg::CullStack::createOrReuseMatrix(), Matrixd(), Matrixd(), Matrixd(), operator=(), orthoNormalize(), and set().

## set() [2/5]

void osg::Matrixd::set | ( | const Matrixf & | rhs | ) |

## set() [3/5]

void osg::Matrixd::set | ( | double const *const | ptr | ) |

inline

References _mat, and ptr().

## set() [4/5]

void osg::Matrixd::set | ( | float const *const | ptr | ) |

inline

References _mat, and ptr().

## set() [5/5]

void osg::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 )

## setRotate()

void osg::Matrixd::setRotate | ( | const Quat & | q | ) |

Referenced by postMultRotate(), and preMultRotate().

## setTrans() [1/3]

void osg::Matrixd::setTrans | ( | const Vec3d & | v | ) |

## setTrans() [2/3]

void osg::Matrixd::setTrans | ( | const Vec3f & | v | ) |

## setTrans() [3/3]

void osg::Matrixd::setTrans | ( | value_type | tx,
|  | value_type | ty,
|  | value_type | tz )

## transform3x3() [1/4]

Vec3d osg::Matrixd::transform3x3 | ( | const Matrixd & | m,
|  | const Vec3d & | v )

inline static

apply a 3x3 transform of M[0..2,0..2]*v.

References _mat, Matrixd(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## transform3x3() [2/4]

Vec3f osg::Matrixd::transform3x3 | ( | const Matrixd & | m,
|  | const Vec3f & | v )

inline static

apply a 3x3 transform of M[0..2,0..2]*v.

References _mat, Matrixd(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

## transform3x3() [3/4]

Vec3d osg::Matrixd::transform3x3 | ( | const Vec3d & | v,
|  | const Matrixd & | m )

inline static

apply a 3x3 transform of v*M[0..2,0..2].

References _mat, Matrixd(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## transform3x3() [4/4]

Vec3f osg::Matrixd::transform3x3 | ( | const Vec3f & | v,
|  | const Matrixd & | m )

inline static

apply a 3x3 transform of v*M[0..2,0..2].

References _mat, Matrixd(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

Referenced by osgAnimation::RigTransformSoftware::computeNormal(), osgUtil::LineSegmentIntersector::Intersection::getWorldIntersectNormal(), osgUtil::RayIntersector::Intersection::getWorldIntersectNormal(), osgParticle::Particle::transformPositionVelocity(), and osgParticle::Particle::transformPositionVelocity().

## translate() [1/3]

Matrixd osg::Matrixd::translate | ( | const Vec3d & | dv | ) |

inline static

References Matrixd(), translate(), osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().

## translate() [2/3]

Matrixd osg::Matrixd::translate | ( | const Vec3f & | dv | ) |

inline static

References Matrixd(), translate(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().

Referenced by osg::Viewport::computeWindowMatrix(), osgManipulator::Scale1DCommand::getMotionMatrix(), osgManipulator::Scale2DCommand::getMotionMatrix(), osgManipulator::ScaleUniformCommand::getMotionMatrix(), osgManipulator::TranslateInLineCommand::getMotionMatrix(), osgManipulator::TranslateInPlaneCommand::getMotionMatrix(), orthoNormalize(), translate(), and translate().

## translate() [3/3]

Matrixd osg::Matrixd::translate | ( | value_type | x,
|  | value_type | y,
|  | value_type | z )

inline static

References makeTranslate(), and Matrixd().

## transpose()

bool osg::Matrixd::transpose | ( | const Matrixd & | rhs | ) |

transpose a matrix

References Matrixd().

## transpose3x3()

bool osg::Matrixd::transpose3x3 | ( | const Matrixd & | rhs | ) |

transpose orthogonal part of the matrix

References Matrixd().

## valid()

bool osg::Matrixd::valid | ( |  | ) | const

inline

References isNaN().

## Member Data Documentation

## _mat

value_type osg::Matrixd::_mat[4][4]

protected

Referenced by getScale(), getTrans(), invert(), isIdentity(), isNaN(), operator()(), operator()(), postMult(), postMult(), postMult(), postMult(), postMultScale(), postMultScale(), postMultTranslate(), postMultTranslate(), preMult(), preMult(), preMult(), preMult(), preMultScale(), preMultScale(), preMultTranslate(), preMultTranslate(), ptr(), ptr(), set(), set(), transform3x3(), transform3x3(), transform3x3(), and transform3x3().

The documentation for this class was generated from the following file:

- Matrixd