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

osg::Matrix Class Reference

Inheritance diagram for osg::Matrix:

Inheritance graph
[legend]
List of all members.

Public Methods

 Matrix ()
 Matrix (const Matrix &other)
 Matrix (float const *const def)
 Matrix (float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
virtual Object * cloneType () const
 Clone the type of an object, with Object* return type.

virtual Object * clone (const CopyOp &) const
 Clone the an object, with Object* return type.

virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
 return the name of the object's library.

virtual const char * className () const
 return the name of the object's class type.

virtual ~Matrix ()
int compare (const Matrix &m) const
bool operator< (const Matrix &m) const
bool operator== (const Matrix &m) const
bool operator!= (const Matrix &m) const
float & operator() (int row, int col)
float operator() (int row, int col) const
const bool valid () const
const bool isNaN () const
Matrix & operator= (const Matrix &other)
void set (const Matrix &other)
void set (float const *const ptr)
void set (float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
float * ptr ()
const float * ptr () const
void makeIdentity ()
void makeScale (const Vec3 &)
void makeScale (float, float, float)
void makeTranslate (const Vec3 &)
void makeTranslate (float, float, float)
void makeRotate (const Vec3 &from, const Vec3 &to)
void makeRotate (float angle, const Vec3 &axis)
void makeRotate (float angle, float x, float y, float z)
void makeRotate (const Quat &)
void makeRotate (float angle1, const Vec3 &axis1, float angle2, const Vec3 &axis2, float angle3, const Vec3 &axis3)
void makeOrtho (const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
 Set to a orthographic projection.

void makeOrtho2D (const double left, const double right, const double bottom, const double top)
 Set to a 2D orthographic projection.

void makeFrustum (const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
 Set to a perspective projection.

void makePerspective (const double fovy, const double aspectRatio, const double zNear, const double zFar)
 Set to a symmetrical perspective projection, See gluPerspective for further details.

void makeLookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up)
 Set to the position and orientation as per a camera, using the same convention as gluLookAt.

bool invert (const Matrix &)
Vec3 preMult (const Vec3 &v) const
Vec3 postMult (const Vec3 &v) const
Vec3 operator * (const Vec3 &v) const
Vec4 preMult (const Vec4 &v) const
Vec4 postMult (const Vec4 &v) const
Vec4 operator * (const Vec4 &v) const
void setTrans (float tx, float ty, float tz)
void setTrans (const Vec3 &v)
Vec3 getTrans () const
Vec3 getScale () const
void mult (const Matrix &, const Matrix &)
void preMult (const Matrix &)
void postMult (const Matrix &)
void operator *= (const Matrix &other)
Matrix operator * (const Matrix &m) const

Static Public Methods

Matrix identity (void)
Matrix scale (const Vec3 &sv)
Matrix scale (float sx, float sy, float sz)
Matrix translate (const Vec3 &dv)
Matrix translate (float x, float y, float z)
Matrix rotate (const Vec3 &from, const Vec3 &to)
Matrix rotate (float angle, float x, float y, float z)
Matrix rotate (float angle, const Vec3 &axis)
Matrix rotate (float angle1, const Vec3 &axis1, float angle2, const Vec3 &axis2, float angle3, const Vec3 &axis3)
Matrix rotate (const Quat &quat)
Matrix inverse (const Matrix &matrix)
Matrix ortho (const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
 Create a orthographic projection.

Matrix ortho2D (const double left, const double right, const double bottom, const double top)
 Create a 2D orthographic projection.

Matrix frustum (const double left, const double right, const double bottom, const double top, const double zNear, const double zFar)
 Create a perspective projection.

Matrix perspective (const double fovy, const double aspectRatio, const double zNear, const double zFar)
 Create a symmetrical perspective projection, See gluPerspective for further details.

Matrix lookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up)
 Create the position and orientation as per a camera, using the same convention as gluLookAt.

Vec3 transform3x3 (const Vec3 &v, const Matrix &m)
 apply apply an 3x3 transform of v*M[0..2,0..2]

Vec3 transform3x3 (const Matrix &m, const Vec3 &v)
 apply apply an 3x3 transform of M[0..2,0..2]*v


Constructor & Destructor Documentation

osg::Matrix::Matrix (    ) 
 

osg::Matrix::Matrix (  const Matrix &    other ) 
 

osg::Matrix::Matrix (  float const *const    def )  [explicit]
 

osg::Matrix::Matrix (  float    a00,
float    a01,
float    a02,
float    a03,
float    a10,
float    a11,
float    a12,
float    a13,
float    a20,
float    a21,
float    a22,
float    a23,
float    a30,
float    a31,
float    a32,
float    a33
) 
 

virtual osg::Matrix::~Matrix (    )  [inline, virtual]
 


Member Function Documentation

virtual const char* osg::Matrix::className (    )  const [inline, virtual]
 

return the name of the object's class type.

Must be defined by derived classes.

Implements osg::Object.

virtual Object* osg::Matrix::clone (  const CopyOp &    )  const [inline, virtual]
 

Clone the an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

virtual Object* osg::Matrix::cloneType (    )  const [inline, virtual]
 

Clone the type of an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

int osg::Matrix::compare (  const Matrix &    m )  const [inline]
 

Matrix osg::Matrix::frustum (  const double    left,
const double    right,
const double    bottom,
const double    top,
const double    zNear,
const double    zFar
)  [inline, static]
 

Create a perspective projection.

See glFrustum for further details.

Vec3 osg::Matrix::getScale (    )  const [inline]
 

Vec3 osg::Matrix::getTrans (    )  const [inline]
 

Matrix osg::Matrix::identity (  void    )  [inline, static]
 

Matrix osg::Matrix::inverse (  const Matrix &    matrix )  [inline, static]
 

bool osg::Matrix::invert (  const Matrix &    ) 
 

const bool osg::Matrix::isNaN (    )  const [inline]
 

virtual bool osg::Matrix::isSameKindAs (  const Object *    obj )  const [inline, virtual]
 

Reimplemented from osg::Object.

virtual const char* osg::Matrix::libraryName (    )  const [inline, virtual]
 

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention the is that the namspace of a library is the same as the library name.

Implements osg::Object.

Matrix osg::Matrix::lookAt (  const Vec3 &    eye,
const Vec3 &    center,
const Vec3 &    up
)  [inline, static]
 

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

void osg::Matrix::makeFrustum (  const double    left,
const double    right,
const double    bottom,
const double    top,
const double    zNear,
const double    zFar
) 
 

Set to a perspective projection.

See glFrustum for further details.

void osg::Matrix::makeIdentity (    ) 
 

void osg::Matrix::makeLookAt (  const Vec3 &    eye,
const Vec3 &    center,
const Vec3 &    up
) 
 

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

void osg::Matrix::makeOrtho (  const double    left,
const double    right,
const double    bottom,
const double    top,
const double    zNear,
const double    zFar
) 
 

Set to a orthographic projection.

See glOrtho for further details.

void osg::Matrix::makeOrtho2D (  const double    left,
const double    right,
const double    bottom,
const double    top
)  [inline]
 

Set to a 2D orthographic projection.

See glOrtho2D for further details.

void osg::Matrix::makePerspective (  const double    fovy,
const double    aspectRatio,
const double    zNear,
const double    zFar
) 
 

Set to a symmetrical perspective projection, See gluPerspective for further details.

Aspect ratio is defined as width/height.

void osg::Matrix::makeRotate (  float    angle1,
const Vec3 &    axis1,
float    angle2,
const Vec3 &    axis2,
float    angle3,
const Vec3 &    axis3
) 
 

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

void osg::Matrix::makeRotate (  float    angle,
float    x,
float    y,
float    z
) 
 

void osg::Matrix::makeRotate (  float    angle,
const Vec3 &    axis
) 
 

void osg::Matrix::makeRotate (  const Vec3 &    from,
const Vec3 &    to
) 
 

void osg::Matrix::makeScale (  float   ,
float   ,
float   
) 
 

void osg::Matrix::makeScale (  const Vec3 &    ) 
 

void osg::Matrix::makeTranslate (  float   ,
float   ,
float   
) 
 

void osg::Matrix::makeTranslate (  const Vec3 &    ) 
 

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

Matrix osg::Matrix::operator * (  const Matrix &    m )  const [inline]
 

Vec4 osg::Matrix::operator * (  const Vec4 &    v )  const [inline]
 

Vec3 osg::Matrix::operator * (  const Vec3 &    v )  const [inline]
 

void osg::Matrix::operator *= (  const Matrix &    other )  [inline]
 

bool osg::Matrix::operator!= (  const Matrix &    m )  const [inline]
 

float osg::Matrix::operator() (  int    row,
int    col
)  const [inline]
 

float& osg::Matrix::operator() (  int    row,
int    col
)  [inline]
 

bool osg::Matrix::operator< (  const Matrix &    m )  const [inline]
 

Matrix& osg::Matrix::operator= (  const Matrix &    other )  [inline]
 

bool osg::Matrix::operator== (  const Matrix &    m )  const [inline]
 

Matrix osg::Matrix::ortho (  const double    left,
const double    right,
const double    bottom,
const double    top,
const double    zNear,
const double    zFar
)  [inline, static]
 

Create a orthographic projection.

See glOrtho for further details.

Matrix osg::Matrix::ortho2D (  const double    left,
const double    right,
const double    bottom,
const double    top
)  [inline, static]
 

Create a 2D orthographic projection.

See glOrtho for further details.

Matrix osg::Matrix::perspective (  const double    fovy,
const double    aspectRatio,
const double    zNear,
const double    zFar
)  [inline, static]
 

Create a symmetrical perspective projection, See gluPerspective for further details.

Aspect ratio is defined as width/height.

void osg::Matrix::postMult (  const Matrix &    ) 
 

Vec4 osg::Matrix::postMult (  const Vec4 &    v )  const [inline]
 

Vec3 osg::Matrix::postMult (  const Vec3 &    v )  const [inline]
 

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

Vec4 osg::Matrix::preMult (  const Vec4 &    v )  const [inline]
 

Vec3 osg::Matrix::preMult (  const Vec3 &    v )  const [inline]
 

const float* osg::Matrix::ptr (    )  const [inline]
 

float* osg::Matrix::ptr (    )  [inline]
 

Matrix osg::Matrix::rotate (  const Quat &    quat )  [inline, static]
 

Matrix osg::Matrix::rotate (  float    angle1,
const Vec3 &    axis1,
float    angle2,
const Vec3 &    axis2,
float    angle3,
const Vec3 &    axis3
)  [inline, static]
 

Matrix osg::Matrix::rotate (  float    angle,
const Vec3 &    axis
)  [inline, static]
 

Matrix osg::Matrix::rotate (  float    angle,
float    x,
float    y,
float    z
)  [inline, static]
 

Matrix osg::Matrix::rotate (  const Vec3 &    from,
const Vec3 &    to
)  [inline, static]
 

Matrix osg::Matrix::scale (  float    sx,
float    sy,
float    sz
)  [inline, static]
 

Matrix osg::Matrix::scale (  const Vec3 &    sv )  [inline, static]
 

void osg::Matrix::set (  float    a00,
float    a01,
float    a02,
float    a03,
float    a10,
float    a11,
float    a12,
float    a13,
float    a20,
float    a21,
float    a22,
float    a23,
float    a30,
float    a31,
float    a32,
float    a33
) 
 

void osg::Matrix::set (  float const *const    ptr )  [inline]
 

void osg::Matrix::set (  const Matrix &    other )  [inline]
 

void osg::Matrix::setTrans (  const Vec3 &    v ) 
 

void osg::Matrix::setTrans (  float    tx,
float    ty,
float    tz
) 
 

Vec3 osg::Matrix::transform3x3 (  const Matrix &    m,
const Vec3 &    v
)  [inline, static]
 

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

Vec3 osg::Matrix::transform3x3 (  const Vec3 &    v,
const Matrix &    m
)  [inline, static]
 

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

Matrix osg::Matrix::translate (  float    x,
float    y,
float    z
)  [inline, static]
 

Matrix osg::Matrix::translate (  const Vec3 &    dv )  [inline, static]
 

const bool osg::Matrix::valid (    )  const [inline]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:33 2002 for the Open Scene Graph by doxygen 1.2.16.