Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoBBoxModelMatrixElement Class Reference

Stores the current model matrix for use with the SoGetBoundingBoxAction. More...

#include <Inventor/elements/SoBBoxModelMatrixElement.h>

+ Inheritance diagram for SoBBoxModelMatrixElement:

Public Member Functions

virtual void push (SoState *state)
 Overrides push() method to copy values from next instance in the stack.
 
- Public Member Functions inherited from SoModelMatrixElement
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 reset (SoState *state, SoNode *node)
 Allows the SoGetBoundingBoxAction to reset the current model matrix to identity and all currently-open local matrices to identity.
 
static void pushMatrix (SoState *state, SbMatrix &matrix, SbMatrix &localmatrix)
 Because two model matrices are kept track of during the getBoundingBoxAction (the local model matrix, used by separators to calculate their bbox caches, and the real model matrix), replacement routines for pushMatrix/popMatrix must be given; SoTransformSeparator::getBoundingBox uses these methods to correctly keep both matrices up-to-date.
 
static void popMatrix (SoState *state, const SbMatrix &matrix, const SbMatrix &localmatrix)
 See description for pushMatrix().
 
- Static Public Member Functions inherited from SoModelMatrixElement
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 SbMatrixgetCombinedCullMatrix (SoState *state)
 This method gets the model*cullMatrix combined matrix (which is cached by this element).
 
static const SbMatrixget (SoState *state)
 Returns current model matrix from the state.
 
static const SbMatrixget (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.
 

Detailed Description

Stores the current model matrix for use with the SoGetBoundingBoxAction.

This element stores the current model matrix for use with the SoGetBoundingBoxAction. Overrides the virtual methods on SoModelMatrixElement to also set the current SoLocalBBoxMatrixElement.

This class relies on SoModelMatrixElement to store the matrix in the instance, and inherits most of its methods from it.

SEE ALSO

SoTransformSeparator, SoResetTransform

Definition at line 79 of file SoBBoxModelMatrixElement.h.

Member Function Documentation

◆ getClassStackIndex()

static int SoBBoxModelMatrixElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoBBoxModelMatrixElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ popMatrix()

static void SoBBoxModelMatrixElement::popMatrix ( SoState state,
const SbMatrix matrix,
const SbMatrix localmatrix 
)
static

See description for pushMatrix().

◆ push()

virtual void SoBBoxModelMatrixElement::push ( SoState state)
virtual

Overrides push() method to copy values from next instance in the stack.

Reimplemented from SoModelMatrixElement.

◆ pushMatrix()

static void SoBBoxModelMatrixElement::pushMatrix ( SoState state,
SbMatrix matrix,
SbMatrix localmatrix 
)
static

Because two model matrices are kept track of during the getBoundingBoxAction (the local model matrix, used by separators to calculate their bbox caches, and the real model matrix), replacement routines for pushMatrix/popMatrix must be given; SoTransformSeparator::getBoundingBox uses these methods to correctly keep both matrices up-to-date.

◆ reset()

static void SoBBoxModelMatrixElement::reset ( SoState state,
SoNode node 
)
static

Allows the SoGetBoundingBoxAction to reset the current model matrix to identity and all currently-open local matrices to identity.


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