Stores the current model matrix. More...
#include <Inventor/elements/SoModelMatrixElement.h>
Public Member Functions | |
virtual void | push (SoState *state) |
Overrides push() method to copy values from next instance in the stack. | |
virtual void | print (FILE *fp) const |
Prints element (for debugging). | |
Public Member Functions inherited from SoElement | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
Pops element. | |
virtual SoType | getTypeId () const |
Returns type identifier for element instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
static void | makeIdentity (SoState *state, SoNode *node) |
Sets the model matrix to the identity matrix. | |
static void | set (SoState *state, SoNode *node, const SbMatrix &matrix, SbBool sendToGL=TRUE) |
Sets the model matrix to the given matrix. | |
static void | mult (SoState *state, SoNode *node, const SbMatrix &matrix) |
Multiplies the given matrix into the model matrix. | |
static void | translateBy (SoState *state, SoNode *node, const SbVec3f &translation) |
This multiplies a matrix that performs the specified transformation into the model matrix. | |
static void | rotateBy (SoState *state, SoNode *node, const SbRotation &rotation) |
This multiplies a matrix that performs the specified transformation into the model matrix. | |
static void | scaleBy (SoState *state, SoNode *node, const SbVec3f &scaleFactor) |
This multiplies a matrix that performs the specified transformation into the model matrix. | |
static SbMatrix | pushMatrix (SoState *state) |
This method is used by the TransformSeparator node. | |
static void | popMatrix (SoState *state, const SbMatrix &m) |
This method is used by the TransformSeparator node. | |
static void | setCullMatrix (SoState *state, SoNode *node, const SbMatrix &matrix) |
Sets the transformation that defines the volume that view-volume culling should be tested against. | |
static const SbMatrix & | getCombinedCullMatrix (SoState *state) |
This method gets the model*cullMatrix combined matrix (which is cached by this element). | |
static const SbMatrix & | get (SoState *state) |
Returns current model matrix from the state. | |
static const SbMatrix & | get (SoState *state, SbBool &isIdent) |
Returns current model matrix from the state, sets given flag to TRUE if matrix is known to be identity. | |
Static Public Member Functions inherited from SoAccumulatedElement | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
Static Public Member Functions inherited from SoElement | |
static SoType | getClassTypeId () |
Returns type identifier for SoElement class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Friends | |
class | SoLocalBBoxMatrixElement |
Stores the current model matrix.
This element stores the current model matrix - the cumulative transformation applied to subsequent shapes. Because the matrix is cumulative, this class is derived from SoAccumulatedElement. The set() method replaces the current matrix, while all the others (mult(), translateBy(), etc.) multiply into it. Node id's of the nodes that affect the element are accumulated properly.
This element also stores the current view-volume culling transformation, which is normally the view*projection matrices (set by cameras), but which may be modified by sophisticated culling schemes.
SoMatrixTransform, SoRotation, SoRotationXYZ, SoScale, SoTransform, SoTranslation, SoUnits
Definition at line 80 of file SoModelMatrixElement.h.
Returns current model matrix from the state.
Returns current model matrix from the state, sets given flag to TRUE if matrix is known to be identity.
|
static |
Returns the stack id for this element.
|
static |
Returns the type identifier for this class.
This method gets the model*cullMatrix combined matrix (which is cached by this element).
Sets the model matrix to the identity matrix.
|
static |
Multiplies the given matrix into the model matrix.
This method is used by the TransformSeparator node.
WARNING! For proper caching behavior, the matrix returned by pushMatrix() must be used ONLY as a later argument to popMatrix(), and you must NOT modify the matrix between the push and the pop. If you need the matrix for any other reason, you MUST use the get() routine.
|
virtual |
Prints element (for debugging).
Reimplemented from SoAccumulatedElement.
|
virtual |
Overrides push() method to copy values from next instance in the stack.
Reimplemented from SoAccumulatedElement.
Reimplemented in SoBBoxModelMatrixElement.
This method is used by the TransformSeparator node.
WARNING! For proper caching behavior, the matrix returned by pushMatrix() must be used ONLY as a later argument to popMatrix(), and you must NOT modify the matrix between the push and the pop. If you need the matrix for any other reason, you MUST use the get() routine.
|
static |
This multiplies a matrix that performs the specified transformation into the model matrix.
|
static |
This multiplies a matrix that performs the specified transformation into the model matrix.
|
static |
Sets the model matrix to the given matrix.
This method will (indirectly) call glLoadMatrix with the new matrix unless the 'sendToGL' parameter is explicitly FALSE.
|
static |
Sets the transformation that defines the volume that view-volume culling should be tested against.
|
static |
This multiplies a matrix that performs the specified transformation into the model matrix.
|
friend |
Definition at line 277 of file SoModelMatrixElement.h.