Open Inventor Reference
SoGetMatrixAction Class Reference

Computes transformation matrix for subgraph. More...

#include <Inventor/actions/SoGetMatrixAction.h>

Inheritance diagram for SoGetMatrixAction:
SoAction

Public Member Functions

 SoGetMatrixAction (const SbViewportRegion &newRegion)
 Constructor takes viewport region to use for picking. More...
 
virtual ~SoGetMatrixAction ()
 Destructor. More...
 
void setViewportRegion (const SbViewportRegion &newRegion)
 Sets/returns current viewport region to use for action. More...
 
const SbViewportRegiongetViewportRegion () const
 Sets/returns current viewport region to use for action. More...
 
SbMatrixgetMatrix ()
 Returns cumulative transformation matrix. More...
 
SbMatrixgetInverse ()
 Returns cumulative inverse transformation matrix. More...
 
SbMatrixgetTextureMatrix ()
 Returns cumulative transformation matrix. More...
 
SbMatrixgetTextureInverse ()
 Returns cumulative inverse transformation matrix. More...
 
- Public Member Functions inherited from SoAction
virtual ~SoAction ()
 Destructor. More...
 
virtual SoType getTypeId () const =0
 Returns the type identifier for a specific instance. More...
 
bool isOfType (SoType type) const
 Returns TRUE if this instance is of the type specified in type or is derived from that type. More...
 
virtual void apply (SoNode *node)
 
virtual void apply (SoPath *path)
 
virtual void apply (const SoPathList &pathList, bool obeysRules=FALSE)
 Initiates an action on the graph defined either by a node, path, or list of paths. More...
 
virtual void invalidateState ()
 Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied. More...
 
AppliedCode getWhatAppliedTo () const
 Returns code indicating what action is being applied to. More...
 
SoNodegetNodeAppliedTo () const
 These returns a pointer to the node, path, or path list the action is being applied to. More...
 
SoPathgetPathAppliedTo () const
 
const SoPathListgetPathListAppliedTo () const
 A single path list may be split into several, one for each different head node. More...
 
const SoPathListgetOriginalPathListAppliedTo () const
 
bool isLastPathListAppliedTo () const
 
PathCode getPathCode (int &numIndices, const int *&indices)
 Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to. More...
 
void traverse (SoNode *node)
 Does traversal of a graph rooted by a node. More...
 
bool hasTerminated () const
 Returns TRUE if the traversal has reached a termination condition. More...
 
const SoPathgetCurPath ()
 Returns a pointer to the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed. More...
 
SoStategetState () const
 Get the state from the action. More...
 
PathCode getCurPathCode () const
 These methods maintain the current path accumulated so far during traversal. More...
 
void pushCurPath (int childIndex)
 
void popCurPath (PathCode prevPathCode)
 
virtual SoNodegetCurPathTail ()
 This is virtual, so that SoCallbackAction can use current node. More...
 
void usePathCode (int &numIndices, const int *&indices)
 called by inline getPathCode: More...
 
void pushCurPath ()
 Optimized versions of push/pop when we know path codes won't change: More...
 
void popPushCurPath (int childIndex)
 
void popCurPath ()
 
const SoLightweightPathgetCurrentLightweightPath () const
 Returns the current "light" path. More...
 
void setCurrentLightweightPath (const SoLightweightPath &path)
 Sets the current "light" path. More...
 

Static Public Member Functions

static void initClass ()
 
- Static Public Member Functions inherited from SoAction
static SoType getClassTypeId ()
 Returns the type identifier for this class. More...
 
static void nullAction (SoAction *, SoNode *)
 Null action method that can be stored in lookup table when desired. More...
 
static void initClass ()
 
static void initClasses ()
 Initialize ALL Inventor action classes. More...
 

Protected Member Functions

virtual void beginTraversal (SoNode *node)
 Initiates action on graph. More...
 
- Protected Member Functions inherited from SoAction
 SoAction ()
 Constructor. More...
 
virtual const SoEnabledElementsListgetEnabledElements () const
 Returns the list of enabled elements for a given action subclass. More...
 
void setTerminated (bool flag)
 Allows subclass instance to indicate that traversal has reached a termination condition. More...
 
virtual bool shouldCompactPathLists () const
 This method is used when applying an action to an SoPathList. More...
 

Additional Inherited Members

- Public Types inherited from SoAction
enum  AppliedCode { NODE , PATH , PATH_LIST }
 This enum is used to determine what the action is being applied to. More...
 
enum  PathCode { NO_PATH , IN_PATH , BELOW_PATH , OFF_PATH }
 This enum may be used during traversal of nodes to indicate where the node is with respect to the path being traversed. More...
 
- Protected Attributes inherited from SoAction
SoStatestate
 Traversal state. More...
 
SoActionMethodListtraversalMethods
 The list of what to do when. More...
 
- Static Protected Attributes inherited from SoAction
static SoEnabledElementsListenabledElements
 Holds list of enabled elements for the SoAction class. More...
 
static SoActionMethodListmethods
 ... and the methods More...
 

Detailed Description

This action computes transformation matrices for a given subgraph. It computes the cumulative transformation matrix and its inverse, along with a cumulative texture transformation matrix and its inverse.

This action is unlike most others in that it does not traverse downwards from groups. When applied to a node, it computes the matrix for just that node. (This makes sense for transformation nodes, but not for others, really.) It is much more useful when applied to a path. When applied to a path, it gathers the transformation info for all nodes in the path and those that affect nodes in the path, but it stops when it hits the last node in the path; it does not traverse downwards from it as other actions (such as rendering) do. This behavior makes the most sense for this action.

See Also
SoGetBoundingBoxAction

Definition at line 90 of file SoGetMatrixAction.h.

Constructor & Destructor Documentation

◆ SoGetMatrixAction()

SoGetMatrixAction::SoGetMatrixAction ( const SbViewportRegion newRegion)

Even though the matrix computation may not involve a window per se, some nodes need this information to determine their placement.

◆ ~SoGetMatrixAction()

virtual SoGetMatrixAction::~SoGetMatrixAction ( )
virtual

Member Function Documentation

◆ beginTraversal()

virtual void SoGetMatrixAction::beginTraversal ( SoNode node)
protectedvirtual

Reimplemented from SoAction.

◆ getInverse()

SbMatrix& SoGetMatrixAction::getInverse ( )
inline

Warning: the matrix returned by this routine should not be changed (unless you are implementing your own transformation nodes).

Definition at line 118 of file SoGetMatrixAction.h.

◆ getMatrix()

SbMatrix& SoGetMatrixAction::getMatrix ( )
inline

Warning: the matrix returned by this routine should not be changed (unless you are implementing your own transformation nodes).

Definition at line 114 of file SoGetMatrixAction.h.

◆ getTextureInverse()

SbMatrix& SoGetMatrixAction::getTextureInverse ( )
inline

Warning: the matrix returned by this routine should not be changed (unless you are implementing your own transformation nodes).

Definition at line 127 of file SoGetMatrixAction.h.

◆ getTextureMatrix()

SbMatrix& SoGetMatrixAction::getTextureMatrix ( )
inline

Warning: the matrix returned by this routine should not be changed (unless you are implementing your own transformation nodes).

Definition at line 123 of file SoGetMatrixAction.h.

◆ getViewportRegion()

const SbViewportRegion& SoGetMatrixAction::getViewportRegion ( ) const
inline

Definition at line 109 of file SoGetMatrixAction.h.

◆ initClass()

static void SoGetMatrixAction::initClass ( )
static

◆ setViewportRegion()

void SoGetMatrixAction::setViewportRegion ( const SbViewportRegion newRegion)

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