Open Inventor Reference
SoGLModelMatrixElement Class Reference

Element that stores the current model matrix in GL. More...

#include <Inventor/elements/SoGLModelMatrixElement.h>

Inheritance diagram for SoGLModelMatrixElement:
SoModelMatrixElement SoAccumulatedElement SoElement

List of all members.

Public Member Functions

virtual void init (SoState *state)
 Initializes element.
virtual void push (SoState *state)
 Override push()/pop() methods so side effects can occur in GL.
virtual void pop (SoState *state, const SoElement *prevTopElement)

Static Public Member Functions

static void initClass ()
 Initializes the SoGLModelMatrixElement class.

Protected Member Functions

virtual void makeEltIdentity ()
 Overrides SoModelMatrixElement::makeEltIdentity() to print an error message.
virtual void setElt (const SbMatrix &matrix)
 Sets the matrix in an instance to the given matrix.
virtual void multElt (const SbMatrix &matrix)
 Multiplies into the matrix in an instance.
virtual void translateEltBy (const SbVec3f &translation)
 Each of these performs the appropriate operation on the matrix in an instance.
virtual void rotateEltBy (const SbRotation &translation)
virtual void scaleEltBy (const SbVec3f &scaleFactor)
virtual SbMatrix pushMatrixElt ()
 virtual methods for push/pop so GL element can Do The Right Thing:
virtual void popMatrixElt (const SbMatrix &m)
virtual ~SoGLModelMatrixElement ()

Detailed Description

Overrides the virtual methods on SoModelMatrixElement to send the matrix to GL when necessary.

Note that this class relies on SoModelMatrixElement to store the matrix in the instance. This is less expensive in the long run than asking GL for the matrix when it is needed.

Because GL stores the model and view matrices in one matrix, this has to do a little extra work when setting the model matrix to identity or another matrix. (It has to set the GL model-view matrix correctly.)

Definition at line 80 of file SoGLModelMatrixElement.h.


Constructor & Destructor Documentation

virtual SoGLModelMatrixElement::~SoGLModelMatrixElement ( ) [protected, virtual]

Member Function Documentation

virtual void SoGLModelMatrixElement::init ( SoState state) [virtual]

Reimplemented from SoModelMatrixElement.

static void SoGLModelMatrixElement::initClass ( ) [static]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::makeEltIdentity ( ) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::multElt ( const SbMatrix matrix) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::pop ( SoState state,
const SoElement prevTopElement 
) [virtual]

Reimplemented from SoElement.

virtual void SoGLModelMatrixElement::popMatrixElt ( const SbMatrix m) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::push ( SoState state) [virtual]

Reimplemented from SoModelMatrixElement.

virtual SbMatrix SoGLModelMatrixElement::pushMatrixElt ( ) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::rotateEltBy ( const SbRotation translation) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::scaleEltBy ( const SbVec3f scaleFactor) [protected, virtual]

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::setElt ( const SbMatrix matrix) [protected, virtual]

Assumes that the passed matrix contains the correct combination of view and model matrices.

Reimplemented from SoModelMatrixElement.

virtual void SoGLModelMatrixElement::translateEltBy ( const SbVec3f translation) [protected, virtual]

Reimplemented from SoModelMatrixElement.


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