Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# osg::Matrixf Class Reference

Inheritance diagram for osg::Matrixf:

[legend]
List of all members.

## Public Types
typedef float | value_type
## Public Member Functions
| Matrixf ()
| Matrixf (const Matrixf &mat)
| Matrixf (const Matrixd &mat)
| Matrixf (float const *const ptr)
| Matrixf (double const *const ptr)
| Matrixf (const Quat &quat)
| Matrixf (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)
| ~Matrixf ()
int | compare (const Matrixf &m) const
bool | operator< (const Matrixf &m) const
bool | operator== (const Matrixf &m) const
bool | operator!= (const Matrixf &m) const
value_type & | operator() (int row, int col)
value_type | operator() (int row, int col) const
bool | valid () const
bool | isNaN () const
Matrixf & | operator= (const Matrixf &rhs)
Matrixf & | operator= (const Matrixd &other)
void | set (const Matrixf &rhs)
void | set (const Matrixd &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)
void | set (const Quat &q)
void | get (Quat &q) const
value_type * | ptr ()
const value_type * | ptr () 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 | makeOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
| Set to an orthographic projection.
bool | getOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
| Get the othogrraphic settings of the orthographic projection matrix.
void | makeOrtho2D (double left, double right, double bottom, double top)
| Set to a 2D orthographic projection.
void | makeFrustum (double left, double right, double bottom, double top, double zNear, double zFar)
| Set to a perspective projection.
bool | getFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
| Get the frustum settings of a perspective projection matrix.
void | makePerspective (double fovy, double aspectRatio, double zNear, double zFar)
| Set to a symmetrical perspective projection.
bool | getPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const
| Get the frustum settings of a symmetric perspective projection matrix.
void | 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.
void | 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.
void | 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.
bool | invert (const Matrixf &rhs)
| invert the matrix rhs.
bool | invert_4x4_orig (const Matrixf &)
| full 4x4 matrix invert.
bool | invert_4x4_new (const Matrixf &)
| full 4x4 matrix invert.
void | orthoNormalize (const Matrixf &rhs)
| ortho-normalize the 3x3 rotation & scale matrix
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 | 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 Matrixf &, const Matrixf &)
void | preMult (const Matrixf &)
void | postMult (const Matrixf &)
void | operator *= (const Matrixf &other)
Matrixf | operator * (const Matrixf &m) const
## Static Public Member Functions
Matrixf | identity (void)
Matrixf | scale (const Vec3f &sv)
Matrixf | scale (const Vec3d &sv)
Matrixf | scale (value_type sx, value_type sy, value_type sz)
Matrixf | translate (const Vec3f &dv)
Matrixf | translate (const Vec3d &dv)
Matrixf | translate (value_type x, value_type y, value_type z)
Matrixf | rotate (const Vec3f &from, const Vec3f &to)
Matrixf | rotate (const Vec3d &from, const Vec3d &to)
Matrixf | rotate (value_type angle, value_type x, value_type y, value_type z)
Matrixf | rotate (value_type angle, const Vec3f &axis)
Matrixf | rotate (value_type angle, const Vec3d &axis)
Matrixf | rotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3)
Matrixf | rotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
Matrixf | rotate (const Quat &quat)
Matrixf | inverse (const Matrixf &matrix)
Matrixf | orthoNormal (const Matrixf &matrix)
Matrixf | ortho (double left, double right, double bottom, double top, double zNear, double zFar)
| Create an orthographic projection matrix.
Matrixf | ortho2D (double left, double right, double bottom, double top)
| Create a 2D orthographic projection.
Matrixf | frustum (double left, double right, double bottom, double top, double zNear, double zFar)
| Create a perspective projection.
Matrixf | perspective (double fovy, double aspectRatio, double zNear, double zFar)
| Create a symmetrical perspective projection.
Matrixf | lookAt (const Vec3f &eye, const Vec3f &center, const Vec3f &up)
| Create the position and orientation as per a camera, using the same convention as gluLookAt.
Matrixf | lookAt (const Vec3d &eye, const Vec3d &center, const Vec3d &up)
| Create the position and orientation as per a camera, using the same convention as gluLookAt.
Vec3f | transform3x3 (const Vec3f &v, const Matrixf &m)
| apply a 3x3 transform of v*M[0..2,0..2].
Vec3d | transform3x3 (const Vec3d &v, const Matrixf &m)
| apply a 3x3 transform of v*M[0..2,0..2].
Vec3f | transform3x3 (const Matrixf &m, const Vec3f &v)
| apply a 3x3 transform of M[0..2,0..2]*v.
Vec3d | transform3x3 (const Matrixf &m, const Vec3d &v)
| apply a 3x3 transform of M[0..2,0..2]*v.
## Protected Attributes
value_type | _mat [4][4]

## Member Typedef Documentation

typedef float osg::Matrixf::value_type

## Constructor & Destructor Documentation

osg::Matrixf::Matrixf | ( |  | ) | `[inline]`

osg::Matrixf::Matrixf | ( | const Matrixf & | mat | ) | `[inline]`

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

osg::Matrixf::Matrixf | ( | float const *const | ptr | ) | `[inline, explicit]`

osg::Matrixf::Matrixf | ( | double const *const | ptr | ) | `[inline, explicit]`

osg::Matrixf::Matrixf | ( | const Quat & | quat | ) | `[inline, explicit]`

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

osg::Matrixf::~Matrixf | ( |  | ) | `[inline]`

## Member Function Documentation

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

Matrixf osg::Matrixf::frustum | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top,
|  | double | zNear,
|  | double | zFar
| ) | `[inline, static]`

| Create a perspective projection. See glFrustum for further details.

void osg::Matrixf::get | ( | Quat & | q | ) | const

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

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

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

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

| Get the othogrraphic settings of the orthographic projection matrix. Note, if matrix is not an orthographic matrix then invalid values will be returned.

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

Vec3d osg::Matrixf::getScale | ( |  | ) | const`[inline]`

Vec3d osg::Matrixf::getTrans | ( |  | ) | const`[inline]`

Matrixf osg::Matrixf::identity | ( | void |  | ) | `[inline, static]`

Matrixf osg::Matrixf::inverse | ( | const Matrixf & | matrix | ) | `[inline, static]`

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

| invert the matrix rhs.

bool osg::Matrixf::invert_4x4_new | ( | const Matrixf & |  | ) |

| full 4x4 matrix invert.

bool osg::Matrixf::invert_4x4_orig | ( | const Matrixf & |  | ) |

| full 4x4 matrix invert.

bool osg::Matrixf::isNaN | ( |  | ) | const`[inline]`

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

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

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

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

void osg::Matrixf::makeIdentity | ( |  | ) |

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

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

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

void osg::Matrixf::makeOrtho2D | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top
| ) | `[inline]`

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Matrixf osg::Matrixf::operator * | ( | const Matrixf & | m | ) | const`[inline]`

Vec4d osg::Matrixf::operator * | ( | const Vec4d & | v | ) | const`[inline]`

Vec4f osg::Matrixf::operator * | ( | const Vec4f & | v | ) | const`[inline]`

Vec3d osg::Matrixf::operator * | ( | const Vec3d & | v | ) | const`[inline]`

Vec3f osg::Matrixf::operator * | ( | const Vec3f & | v | ) | const`[inline]`

void osg::Matrixf::operator *= | ( | const Matrixf & | other | ) | `[inline]`

bool osg::Matrixf::operator!= | ( | const Matrixf & | m | ) | const`[inline]`

value_type osg::Matrixf::operator() | ( | int | row,
|  | int | col
| ) | const`[inline]`

value_type& osg::Matrixf::operator() | ( | int | row,
|  | int | col
| ) | `[inline]`

bool osg::Matrixf::operator< | ( | const Matrixf & | m | ) | const`[inline]`

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

Matrixf& osg::Matrixf::operator= | ( | const Matrixf & | rhs | ) | `[inline]`

bool osg::Matrixf::operator== | ( | const Matrixf & | m | ) | const`[inline]`

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

Matrixf osg::Matrixf::ortho2D | ( | double | left,
|  | double | right,
|  | double | bottom,
|  | double | top
| ) | `[inline, static]`

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

Matrixf osg::Matrixf::orthoNormal | ( | const Matrixf & | matrix | ) | `[inline, static]`

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

| ortho-normalize the 3x3 rotation & scale matrix

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

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

Vec4d osg::Matrixf::postMult | ( | const Vec4d & | v | ) | const`[inline]`

Vec4f osg::Matrixf::postMult | ( | const Vec4f & | v | ) | const`[inline]`

Vec3d osg::Matrixf::postMult | ( | const Vec3d & | v | ) | const`[inline]`

Vec3f osg::Matrixf::postMult | ( | const Vec3f & | v | ) | const`[inline]`

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

Vec4d osg::Matrixf::preMult | ( | const Vec4d & | v | ) | const`[inline]`

Vec4f osg::Matrixf::preMult | ( | const Vec4f & | v | ) | const`[inline]`

Vec3d osg::Matrixf::preMult | ( | const Vec3d & | v | ) | const`[inline]`

Vec3f osg::Matrixf::preMult | ( | const Vec3f & | v | ) | const`[inline]`

const value_type* osg::Matrixf::ptr | ( |  | ) | const`[inline]`

value_type* osg::Matrixf::ptr | ( |  | ) | `[inline]`

Matrixf osg::Matrixf::rotate | ( | const Quat & | quat | ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | value_type | angle1,
|  | const Vec3d & | axis1,
|  | value_type | angle2,
|  | const Vec3d & | axis2,
|  | value_type | angle3,
|  | const Vec3d & | axis3
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | value_type | angle1,
|  | const Vec3f & | axis1,
|  | value_type | angle2,
|  | const Vec3f & | axis2,
|  | value_type | angle3,
|  | const Vec3f & | axis3
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | value_type | angle,
|  | const Vec3d & | axis
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | value_type | angle,
|  | const Vec3f & | axis
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | value_type | angle,
|  | value_type | x,
|  | value_type | y,
|  | value_type | z
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | const Vec3d & | from,
|  | const Vec3d & | to
| ) | `[inline, static]`

Matrixf osg::Matrixf::rotate | ( | const Vec3f & | from,
|  | const Vec3f & | to
| ) | `[inline, static]`

Matrixf osg::Matrixf::scale | ( | value_type | sx,
|  | value_type | sy,
|  | value_type | sz
| ) | `[inline, static]`

Matrixf osg::Matrixf::scale | ( | const Vec3d & | sv | ) | `[inline, static]`

Matrixf osg::Matrixf::scale | ( | const Vec3f & | sv | ) | `[inline, static]`

void osg::Matrixf::set | ( | const Quat & | q | ) |

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

void osg::Matrixf::set | ( | double const *const | ptr | ) | `[inline]`

void osg::Matrixf::set | ( | float const *const | ptr | ) | `[inline]`

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

void osg::Matrixf::set | ( | const Matrixf & | rhs | ) | `[inline]`

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

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

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

Vec3d osg::Matrixf::transform3x3 | ( | const Matrixf & | m,
|  | const Vec3d & | v
| ) | `[inline, static]`

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

Vec3f osg::Matrixf::transform3x3 | ( | const Matrixf & | m,
|  | const Vec3f & | v
| ) | `[inline, static]`

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

Vec3d osg::Matrixf::transform3x3 | ( | const Vec3d & | v,
|  | const Matrixf & | m
| ) | `[inline, static]`

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

Vec3f osg::Matrixf::transform3x3 | ( | const Vec3f & | v,
|  | const Matrixf & | m
| ) | `[inline, static]`

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

Matrixf osg::Matrixf::translate | ( | value_type | x,
|  | value_type | y,
|  | value_type | z
| ) | `[inline, static]`

Matrixf osg::Matrixf::translate | ( | const Vec3d & | dv | ) | `[inline, static]`

Matrixf osg::Matrixf::translate | ( | const Vec3f & | dv | ) | `[inline, static]`

bool osg::Matrixf::valid | ( |  | ) | const`[inline]`

## Member Data Documentation

value_type osg::Matrixf::_mat[4][4]`[protected]`

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

- Matrixf