OpenSceneGraph 3.6.5
osg::Matrixf Class Reference

#include <Matrixf>

Inheritance diagram for osg::Matrixf:

Public Types

typedef float value_type
typedef double other_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_typeoperator() (int row, int col)
value_type operator() (int row, int col) const
bool valid () const
bool isNaN () const
Matrixfoperator= (const Matrixf &rhs)
Matrixfoperator= (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)
value_typeptr ()
const value_typeptr () 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
 decompose the matrix into translation, rotation, scale and scale orientation.
void decompose (osg::Vec3d &translation, osg::Quat &rotation, osg::Vec3d &scale, osg::Quat &so) const
 decompose the matrix into translation, rotation, scale and scale orientation.
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 orthographic settings of the orthographic projection matrix.
bool getOrtho (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
 float version of getOrtho(..)
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.
bool getFrustum (float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
 float version of getFrustum(..)
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.
bool getPerspective (float &fovy, float &aspectRatio, float &zNear, float &zFar) const
 float version of getPerspective(..)
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, automatically select invert_4x3 or invert_4x4.
bool invert_4x3 (const Matrixf &rhs)
 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1.
bool invert_4x4 (const Matrixf &rhs)
 full 4x4 matrix invert.
bool transpose (const Matrixf &rhs)
 transpose matrix
bool transpose3x3 (const Matrixf &rhs)
 transpose orthogonal part of the matrix
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 setRotate (const Quat &q)
Quat getRotate () const
 Get the matrix rotation as a Quat.
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 preMultTranslate (const Vec3d &v)
 Optimized version of preMult(translate(v));.
void preMultTranslate (const Vec3f &v)
void postMultTranslate (const Vec3d &v)
 Optimized version of postMult(translate(v));.
void postMultTranslate (const Vec3f &v)
void preMultScale (const Vec3d &v)
 Optimized version of preMult(scale(v));.
void preMultScale (const Vec3f &v)
void postMultScale (const Vec3d &v)
 Optimized version of postMult(scale(v));.
void postMultScale (const Vec3f &v)
void preMultRotate (const Quat &q)
 Optimized version of preMult(rotate(q));.
void postMultRotate (const Quat &q)
 Optimized version of postMult(rotate(q));.
void operator*= (const Matrixf &other)
Matrixf operator* (const Matrixf &m) const
Matrixf operator* (value_type rhs) const
 Multiply by scalar.
Matrixfoperator*= (value_type rhs)
 Unary multiply by scalar.
Matrixf operator/ (value_type rhs) const
 Divide by scalar.
Matrixfoperator/= (value_type rhs)
 Unary divide by scalar.
Matrixf operator+ (const Matrixf &rhs) const
 Binary vector add.
Matrixfoperator+= (const Matrixf &rhs)
 Unary vector add.

Static Public Member Functions

static Matrixf identity (void)
static Matrixf scale (const Vec3f &sv)
static Matrixf scale (const Vec3d &sv)
static Matrixf scale (value_type sx, value_type sy, value_type sz)
static Matrixf translate (const Vec3f &dv)
static Matrixf translate (const Vec3d &dv)
static Matrixf translate (value_type x, value_type y, value_type z)
static Matrixf rotate (const Vec3f &from, const Vec3f &to)
static Matrixf rotate (const Vec3d &from, const Vec3d &to)
static Matrixf rotate (value_type angle, value_type x, value_type y, value_type z)
static Matrixf rotate (value_type angle, const Vec3f &axis)
static Matrixf rotate (value_type angle, const Vec3d &axis)
static Matrixf rotate (value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3)
static Matrixf rotate (value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
static Matrixf rotate (const Quat &quat)
static Matrixf inverse (const Matrixf &matrix)
static Matrixf orthoNormal (const Matrixf &matrix)
static Matrixf ortho (double left, double right, double bottom, double top, double zNear, double zFar)
 Create an orthographic projection matrix.
static Matrixf ortho2D (double left, double right, double bottom, double top)
 Create a 2D orthographic projection.
static Matrixf frustum (double left, double right, double bottom, double top, double zNear, double zFar)
 Create a perspective projection.
static Matrixf perspective (double fovy, double aspectRatio, double zNear, double zFar)
 Create a symmetrical perspective projection.
static 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.
static 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.
static Vec3f transform3x3 (const Vec3f &v, const Matrixf &m)
 apply a 3x3 transform of v*M[0..2,0..2].
static Vec3d transform3x3 (const Vec3d &v, const Matrixf &m)
 apply a 3x3 transform of v*M[0..2,0..2].
static Vec3f transform3x3 (const Matrixf &m, const Vec3f &v)
 apply a 3x3 transform of M[0..2,0..2]*v.
static 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

◆ other_value_type

◆ value_type

typedef float osg::Matrixf::value_type

Constructor & Destructor Documentation

◆ Matrixf() [1/7]

◆ Matrixf() [2/7]

osg::Matrixf::Matrixf ( const Matrixf & mat)
inline

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

◆ Matrixf() [3/7]

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

◆ Matrixf() [4/7]

osg::Matrixf::Matrixf ( float const *const ptr)
inlineexplicit

References ptr(), and set().

◆ Matrixf() [5/7]

osg::Matrixf::Matrixf ( double const *const ptr)
inlineexplicit

References ptr(), and set().

◆ Matrixf() [6/7]

osg::Matrixf::Matrixf ( const Quat & quat)
inlineexplicit

References makeRotate().

◆ Matrixf() [7/7]

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 )

◆ ~Matrixf()

osg::Matrixf::~Matrixf ( )
inline

Member Function Documentation

◆ compare()

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

References Matrixf().

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

◆ decompose() [1/2]

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

Matrixf osg::Matrixf::frustum ( double left,
double right,
double bottom,
double top,
double zNear,
double zFar )
inlinestatic

Create a perspective projection.

See glFrustum for further details.

References makeFrustum(), and Matrixf().

Referenced by orthoNormalize().

◆ getFrustum() [1/2]

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.

◆ getFrustum() [2/2]

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

float version of getFrustum(..)

◆ getLookAt() [1/2]

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.

◆ getLookAt() [2/2]

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.

◆ getOrtho() [1/2]

bool osg::Matrixf::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::Matrixf::getOrtho ( float & left,
float & right,
float & bottom,
float & top,
float & zNear,
float & zFar ) const

float version of getOrtho(..)

◆ getPerspective() [1/2]

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.

◆ getPerspective() [2/2]

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

float version of getPerspective(..)

◆ getRotate()

Quat osg::Matrixf::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::Matrixf::getScale ( ) const
inline

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

◆ getTrans()

Vec3d osg::Matrixf::getTrans ( ) const
inline

References _mat.

◆ identity()

Matrixf osg::Matrixf::identity ( void )
inlinestatic

References makeIdentity(), and Matrixf().

Referenced by orthoNormalize().

◆ inverse()

Matrixf osg::Matrixf::inverse ( const Matrixf & matrix)
inlinestatic

References invert(), and Matrixf().

Referenced by orthoNormalize().

◆ invert()

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

invert the matrix rhs, automatically select invert_4x3 or invert_4x4.

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

Referenced by inverse().

◆ invert_4x3()

bool osg::Matrixf::invert_4x3 ( const Matrixf & rhs)

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

References Matrixf().

Referenced by invert().

◆ invert_4x4()

bool osg::Matrixf::invert_4x4 ( const Matrixf & rhs)

full 4x4 matrix invert.

References Matrixf().

Referenced by invert().

◆ isIdentity()

bool osg::Matrixf::isIdentity ( ) const
inline

References _mat.

◆ isNaN()

bool osg::Matrixf::isNaN ( ) const
inline

References _mat, and osg::isNaN().

Referenced by valid().

◆ lookAt() [1/2]

Matrixf osg::Matrixf::lookAt ( const Vec3d & eye,
const Vec3d & center,
const Vec3d & up )
inlinestatic

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

References makeLookAt(), and Matrixf().

◆ lookAt() [2/2]

Matrixf osg::Matrixf::lookAt ( const Vec3f & eye,
const Vec3f & center,
const Vec3f & up )
inlinestatic

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

References makeLookAt(), and Matrixf().

Referenced by orthoNormalize().

◆ makeFrustum()

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.

Referenced by frustum().

◆ makeIdentity()

void osg::Matrixf::makeIdentity ( )

Referenced by identity(), and Matrixf().

◆ makeLookAt()

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.

Referenced by lookAt(), and lookAt().

◆ makeOrtho()

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.

Referenced by makeOrtho2D(), and ortho().

◆ makeOrtho2D()

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

Referenced by perspective().

◆ makeRotate() [1/8]

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

◆ makeRotate() [2/8]

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

◆ makeRotate() [3/8]

◆ makeRotate() [4/8]

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

◆ makeRotate() [5/8]

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

◆ makeRotate() [6/8]

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

◆ makeRotate() [7/8]

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

◆ makeRotate() [8/8]

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

◆ makeScale() [1/3]

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

◆ makeScale() [2/3]

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

Referenced by scale().

◆ makeScale() [3/3]

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

◆ makeTranslate() [1/3]

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

◆ makeTranslate() [2/3]

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

Referenced by translate().

◆ makeTranslate() [3/3]

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

◆ mult()

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

References Matrixf().

Referenced by operator*().

◆ operator!=()

bool osg::Matrixf::operator!= ( const Matrixf & m) const
inline

References compare(), and Matrixf().

◆ operator()() [1/2]

value_type & osg::Matrixf::operator() ( int row,
int col )
inline

References _mat.

◆ operator()() [2/2]

value_type osg::Matrixf::operator() ( int row,
int col ) const
inline

References _mat.

◆ operator*() [1/6]

Matrixf osg::Matrixf::operator* ( const Matrixf & m) const
inline

References Matrixf(), and mult().

◆ operator*() [2/6]

Vec3d osg::Matrixf::operator* ( const Vec3d & v) const
inline

References postMult().

◆ operator*() [3/6]

Vec3f osg::Matrixf::operator* ( const Vec3f & v) const
inline

References postMult().

◆ operator*() [4/6]

Vec4d osg::Matrixf::operator* ( const Vec4d & v) const
inline

References postMult().

◆ operator*() [5/6]

Vec4f osg::Matrixf::operator* ( const Vec4f & v) const
inline

References postMult().

◆ operator*() [6/6]

Matrixf osg::Matrixf::operator* ( value_type rhs) const
inline

Multiply by scalar.

References _mat, and Matrixf().

◆ operator*=() [1/2]

void osg::Matrixf::operator*= ( const Matrixf & other)
inline

References Matrixf(), and postMult().

◆ operator*=() [2/2]

Matrixf & osg::Matrixf::operator*= ( value_type rhs)
inline

Unary multiply by scalar.

References _mat, and Matrixf().

◆ operator+()

Matrixf osg::Matrixf::operator+ ( const Matrixf & rhs) const
inline

Binary vector add.

References _mat, and Matrixf().

◆ operator+=()

Matrixf & osg::Matrixf::operator+= ( const Matrixf & rhs)
inline

Unary vector add.

Slightly more efficient because no temporary intermediate object.

References _mat, and Matrixf().

◆ operator/()

Matrixf osg::Matrixf::operator/ ( value_type rhs) const
inline

Divide by scalar.

References _mat, and Matrixf().

◆ operator/=()

Matrixf & osg::Matrixf::operator/= ( value_type rhs)
inline

Unary divide by scalar.

References _mat, and Matrixf().

◆ operator<()

bool osg::Matrixf::operator< ( const Matrixf & m) const
inline

References compare(), and Matrixf().

◆ operator=() [1/2]

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

References Matrixf().

◆ operator=() [2/2]

Matrixf & osg::Matrixf::operator= ( const Matrixf & rhs)
inline

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

◆ operator==()

bool osg::Matrixf::operator== ( const Matrixf & m) const
inline

References compare(), and Matrixf().

◆ ortho()

Matrixf osg::Matrixf::ortho ( double left,
double right,
double bottom,
double top,
double zNear,
double zFar )
inlinestatic

Create an orthographic projection matrix.

See glOrtho for further details.

References makeOrtho(), and Matrixf().

Referenced by orthoNormalize().

◆ ortho2D()

Matrixf osg::Matrixf::ortho2D ( double left,
double right,
double bottom,
double top )
inlinestatic

Create a 2D orthographic projection.

See glOrtho for further details.

References makeOrtho2D(), and Matrixf().

Referenced by orthoNormalize().

◆ orthoNormal()

Matrixf osg::Matrixf::orthoNormal ( const Matrixf & matrix)
inlinestatic

References Matrixf(), and orthoNormalize().

Referenced by orthoNormalize().

◆ orthoNormalize()

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

ortho-normalize the 3x3 rotation & scale matrix

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

Referenced by orthoNormal().

◆ perspective()

Matrixf osg::Matrixf::perspective ( double fovy,
double aspectRatio,
double zNear,
double zFar )
inlinestatic

Create a symmetrical perspective projection.

See gluPerspective for further details. Aspect ratio is defined as width/height.

References makePerspective(), and Matrixf().

Referenced by orthoNormalize().

◆ postMult() [1/5]

◆ postMult() [2/5]

Vec3d osg::Matrixf::postMult ( const Vec3d & v) const
inline

◆ postMult() [3/5]

Vec3f osg::Matrixf::postMult ( const Vec3f & v) const
inline

◆ postMult() [4/5]

Vec4d osg::Matrixf::postMult ( const Vec4d & v) const
inline

◆ postMult() [5/5]

Vec4f osg::Matrixf::postMult ( const Vec4f & v) const
inline

◆ postMultRotate()

void osg::Matrixf::postMultRotate ( const Quat & q)
inline

Optimized version of postMult(rotate(q));.

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

Referenced by postMult().

◆ postMultScale() [1/2]

void osg::Matrixf::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::Matrixf::postMultScale ( const Vec3f & v)
inline

References _mat.

◆ postMultTranslate() [1/2]

void osg::Matrixf::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::Matrixf::postMultTranslate ( const Vec3f & v)
inline

References _mat.

◆ preMult() [1/5]

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

References Matrixf().

◆ preMult() [2/5]

Vec3d osg::Matrixf::preMult ( const Vec3d & v) const
inline

◆ preMult() [3/5]

Vec3f osg::Matrixf::preMult ( const Vec3f & v) const
inline

◆ preMult() [4/5]

Vec4d osg::Matrixf::preMult ( const Vec4d & v) const
inline

◆ preMult() [5/5]

Vec4f osg::Matrixf::preMult ( const Vec4f & v) const
inline

◆ preMultRotate()

void osg::Matrixf::preMultRotate ( const Quat & q)
inline

Optimized version of preMult(rotate(q));.

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

Referenced by postMult().

◆ preMultScale() [1/2]

void osg::Matrixf::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::Matrixf::preMultScale ( const Vec3f & v)
inline

References _mat.

◆ preMultTranslate() [1/2]

void osg::Matrixf::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::Matrixf::preMultTranslate ( const Vec3f & v)
inline

References _mat.

◆ ptr() [1/2]

value_type * osg::Matrixf::ptr ( )
inline

References _mat.

Referenced by Matrixf(), Matrixf(), Matrixf(), operator=(), set(), set(), and set().

◆ ptr() [2/2]

const value_type * osg::Matrixf::ptr ( ) const
inline

References _mat.

◆ rotate() [1/8]

Matrixf osg::Matrixf::rotate ( const Quat & quat)
inlinestatic

References Matrixf().

◆ rotate() [2/8]

Matrixf osg::Matrixf::rotate ( const Vec3d & from,
const Vec3d & to )
inlinestatic

References makeRotate(), and Matrixf().

◆ rotate() [3/8]

Matrixf osg::Matrixf::rotate ( const Vec3f & from,
const Vec3f & to )
inlinestatic

References makeRotate(), and Matrixf().

Referenced by orthoNormalize().

◆ rotate() [4/8]

Matrixf osg::Matrixf::rotate ( value_type angle,
const Vec3d & axis )
inlinestatic

References makeRotate(), and Matrixf().

◆ rotate() [5/8]

Matrixf osg::Matrixf::rotate ( value_type angle,
const Vec3f & axis )
inlinestatic

References makeRotate(), and Matrixf().

◆ rotate() [6/8]

Matrixf osg::Matrixf::rotate ( value_type angle,
value_type x,
value_type y,
value_type z )
inlinestatic

References makeRotate(), and Matrixf().

◆ rotate() [7/8]

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

References makeRotate(), and Matrixf().

◆ rotate() [8/8]

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

References makeRotate(), and Matrixf().

◆ scale() [1/3]

Matrixf osg::Matrixf::scale ( const Vec3d & sv)
inlinestatic

◆ scale() [2/3]

Matrixf osg::Matrixf::scale ( const Vec3f & sv)
inlinestatic

◆ scale() [3/3]

Matrixf osg::Matrixf::scale ( value_type sx,
value_type sy,
value_type sz )
inlinestatic

References makeScale(), and Matrixf().

◆ set() [1/5]

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

◆ set() [2/5]

void osg::Matrixf::set ( const Matrixf & rhs)
inline

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

Referenced by Matrixf(), Matrixf(), Matrixf(), operator=(), orthoNormalize(), and set().

◆ set() [3/5]

void osg::Matrixf::set ( double const *const ptr)
inline

References _mat, and ptr().

◆ set() [4/5]

void osg::Matrixf::set ( float const *const ptr)
inline

References _mat, and ptr().

◆ set() [5/5]

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 )

◆ setRotate()

void osg::Matrixf::setRotate ( const Quat & q)

Referenced by postMultRotate(), and preMultRotate().

◆ setTrans() [1/3]

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

◆ setTrans() [2/3]

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

◆ setTrans() [3/3]

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

◆ transform3x3() [1/4]

Vec3d osg::Matrixf::transform3x3 ( const Matrixf & m,
const Vec3d & v )
inlinestatic

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

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

◆ transform3x3() [2/4]

Vec3f osg::Matrixf::transform3x3 ( const Matrixf & m,
const Vec3f & v )
inlinestatic

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

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

◆ transform3x3() [3/4]

Vec3d osg::Matrixf::transform3x3 ( const Vec3d & v,
const Matrixf & m )
inlinestatic

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

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

◆ transform3x3() [4/4]

Vec3f osg::Matrixf::transform3x3 ( const Vec3f & v,
const Matrixf & m )
inlinestatic

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

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

◆ translate() [1/3]

Matrixf osg::Matrixf::translate ( const Vec3d & dv)
inlinestatic

◆ translate() [2/3]

Matrixf osg::Matrixf::translate ( const Vec3f & dv)
inlinestatic

◆ translate() [3/3]

Matrixf osg::Matrixf::translate ( value_type x,
value_type y,
value_type z )
inlinestatic

References makeTranslate(), and Matrixf().

◆ transpose()

bool osg::Matrixf::transpose ( const Matrixf & rhs)

transpose matrix

References Matrixf().

◆ transpose3x3()

bool osg::Matrixf::transpose3x3 ( const Matrixf & rhs)

transpose orthogonal part of the matrix

References Matrixf().

◆ valid()

bool osg::Matrixf::valid ( ) const
inline

References isNaN().

Member Data Documentation

◆ _mat


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

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.