Open Inventor Reference
SoBoxHighlightRenderAction Class Reference

Box highlight - a subclass of SoGLRenderAction which renders the scene graph, then renders wireframe boxes surrounding each selected object. More...

#include <Inventor/actions/SoBoxHighlightRenderAction.h>

Inheritance diagram for SoBoxHighlightRenderAction:
SoGLRenderAction SoAction

Public Member Functions

 SoBoxHighlightRenderAction ()
 Constructor. More...
 
 SoBoxHighlightRenderAction (const SbViewportRegion &viewportRegion)
 Constructor. More...
 
virtual ~SoBoxHighlightRenderAction ()
 
virtual void apply (SoNode *node)
 This renders the passed scene graph, and also renders wireframe boxes around selected objects as specified by the first SoSelection node found in the scene graph. More...
 
virtual void apply (SoPath *path)
 This renders the passed scene graph, and also renders wireframe boxes around selected objects as specified by the first SoSelection node found in the scene graph. More...
 
virtual void apply (const SoPathList &pathList, bool obeysRules=FALSE)
 This renders the passed scene graph, and also renders wireframe boxes around selected objects as specified by the first SoSelection node found in the scene graph. More...
 
void setVisible (bool b)
 This provides a convenient mechansim for turning highlights off or on. More...
 
bool isVisible () const
 Returns whether highlights will be rendered or not. More...
 
void setColor (const SbColor &c)
 Set the color of the highlight. More...
 
const SbColorgetColor ()
 Get the color of the highlight. More...
 
void setLinePattern (unsigned short pattern)
 Set the line pattern of the highlight. More...
 
unsigned short getLinePattern ()
 Get the line pattern of the highlight. More...
 
void setLineWidth (float width)
 Set the line width. More...
 
float getLineWidth ()
 Get the line width. More...
 
- Public Member Functions inherited from SoGLRenderAction
 SoGLRenderAction (const SbViewportRegion &viewportRegion)
 Constructor. More...
 
virtual ~SoGLRenderAction ()
 Destructor. More...
 
void setViewportRegion (const SbViewportRegion &newRegion)
 Changes viewport region to use for rendering. More...
 
const SbViewportRegiongetViewportRegion () const
 Returns viewport region to use for rendering. More...
 
void setUpdateArea (const SbVec2f &origin, const SbVec2f &size)
 
void getUpdateArea (SbVec2f &origin, SbVec2f &size) const
 Sets/returns the current update area, which is the rectangular area of the viewport region that will actually be rendered into. More...
 
void setAbortCallback (SoGLRenderAbortCB *funcArg, void *userData)
 Sets callback to call during rendering to test for an abort condition. More...
 
void setTransparencyType (TransparencyType type)
 
TransparencyType getTransparencyType () const
 Sets/returns transparency quality level to use when rendering. More...
 
void setSmoothing (bool smooth)
 
bool isSmoothing () const
 Sets/returns smoothing flag. More...
 
void setNumPasses (int num)
 
int getNumPasses () const
 Sets/returns number of rendering passes for multipass rendering. More...
 
void setPassUpdate (bool flag)
 
bool isPassUpdate () const
 Sets/returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is FALSE). More...
 
void setPassCallback (SoGLRenderPassCB *funcArg, void *userData)
 Sets a callback function to invoke between passes when antialiasing. More...
 
void setCacheContext (uint32_t context)
 
uint32_t getCacheContext () const
 Sets/returns the OpenGL cache context. More...
 
virtual void invalidateState ()
 Invalidate the state, forcing it to be recreated at the next apply. More...
 
int getCurPass () const
 Returns current rendering pass number. More...
 
bool abortNow ()
 Returns TRUE if render action should abort - checks user callback. More...
 
bool handleTransparency (bool isTransparent=FALSE)
 Returns TRUE if render action handles processing of a transparent object (if it is to be sorted and rendered later). More...
 
bool isDelaying () const
 Returns TRUE if rendering is being delayed because of transparency sorting or delaying. More...
 
void addDelayedPath (SoPath *path)
 Adds to the list of paths to render after all other stuff (including delayed/sorted transparent objects) have been rendered. More...
 
bool isRenderingDelayedPaths () const
 Returns TRUE if currently rendering delayed paths. More...
 
int getCullTestResults ()
 
void setCullTestResults (int b)
 
bool setAllowDelayedPath (bool flag)
 Sets if delayed paths are allowed while rendering. More...
 
bool getAllowDelayedPaths ()
 Returns if delayed paths are currently allowed. 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...
 
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 SoGLRenderAction
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

void updateBbox (SoPath *p)
 
- Protected Member Functions inherited from SoGLRenderAction
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...
 

Protected Attributes

SoSeparatorlocalRoot
 Nodes which comprise the local highlight graph. More...
 
SoLightModellightModel
 
SoBaseColorbaseColor
 
SoDrawStyledrawStyle
 
SoTexture2texture
 
SoTranslationxlate
 
SoMatrixTransformxform
 
SoCubecube
 
bool hlVisible
 
SoPathselPath
 Cached path to selection so we don't search every time. More...
 
- Protected Attributes inherited from SoAction
SoStatestate
 Traversal state. More...
 
SoActionMethodListtraversalMethods
 The list of what to do when. More...
 

Additional Inherited Members

- Public Types inherited from SoGLRenderAction
enum  TransparencyType {
  SCREEN_DOOR , ADD , DELAYED_ADD , SORTED_OBJECT_ADD ,
  BLEND , DELAYED_BLEND , SORTED_OBJECT_BLEND
}
 Various levels of transparency rendering quality. More...
 
enum  AbortCode { CONTINUE , ABORT , PRUNE , DELAY }
 Possible return codes from a render abort callback. More...
 
typedef AbortCode SoGLRenderAbortCB(void *userData)
 Callback functions for render abort should be of this type. More...
 
- 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...
 
- 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

A selection highlight style.

SoBoxHighlightRenderAction is a render action which renders the specified scene graph, then renders wireframe boxes surrounding each selected object. Selected objects are specified by the first SoSelection node in the scene to which this action is applied. If an SoGetBoundingBoxAction applied to a selected object produces an empty bounding box, no highlight is rendered for that object. A highlight render action can be passed to the setGLRenderAction() method of SoQtRenderArea to have an effect on scene graphs.

See Also
SoLineHighlightRenderAction, SoGLRenderAction, SoSelection, SoQtRenderArea, SoDrawStyle, SoInteraction

Definition at line 105 of file SoBoxHighlightRenderAction.h.

Constructor & Destructor Documentation

◆ SoBoxHighlightRenderAction() [1/2]

SoBoxHighlightRenderAction::SoBoxHighlightRenderAction ( )

◆ SoBoxHighlightRenderAction() [2/2]

SoBoxHighlightRenderAction::SoBoxHighlightRenderAction ( const SbViewportRegion viewportRegion)

◆ ~SoBoxHighlightRenderAction()

virtual SoBoxHighlightRenderAction::~SoBoxHighlightRenderAction ( )
virtual

Member Function Documentation

◆ apply() [1/3]

virtual void SoBoxHighlightRenderAction::apply ( const SoPathList pathList,
bool  obeysRules = FALSE 
)
virtual

Reimplemented from SoAction.

◆ apply() [2/3]

virtual void SoBoxHighlightRenderAction::apply ( SoNode node)
virtual

Reimplemented from SoAction.

◆ apply() [3/3]

virtual void SoBoxHighlightRenderAction::apply ( SoPath path)
virtual

Reimplemented from SoAction.

◆ getColor()

const SbColor& SoBoxHighlightRenderAction::getColor ( )

◆ getLinePattern()

unsigned short SoBoxHighlightRenderAction::getLinePattern ( )

◆ getLineWidth()

float SoBoxHighlightRenderAction::getLineWidth ( )

◆ initClass()

static void SoBoxHighlightRenderAction::initClass ( )
static

◆ isVisible()

bool SoBoxHighlightRenderAction::isVisible ( ) const
inline

Definition at line 141 of file SoBoxHighlightRenderAction.h.

◆ setColor()

void SoBoxHighlightRenderAction::setColor ( const SbColor c)

Default is red (1,0,0). Application is responsible for forcing a redraw of the scene to see the effects of this change.

◆ setLinePattern()

void SoBoxHighlightRenderAction::setLinePattern ( unsigned short  pattern)

Default is solid, 0xffff. The pattern of bits in the passed variable specifies the pattern of the line. See SoDrawStyle for a description. Application is responsible for forcing a redraw of the scene to see the effects of this change.

◆ setLineWidth()

void SoBoxHighlightRenderAction::setLineWidth ( float  width)

◆ setVisible()

void SoBoxHighlightRenderAction::setVisible ( bool  b)
inline

When FALSE is passed, subsequent calls to apply() render the scene graph without rendering highlights. The application is responsible for forcing a redraw of the scene after changing this state. The default visibility is on.

Definition at line 139 of file SoBoxHighlightRenderAction.h.

◆ updateBbox()

void SoBoxHighlightRenderAction::updateBbox ( SoPath p)
protected

Member Data Documentation

◆ baseColor

SoBaseColor* SoBoxHighlightRenderAction::baseColor
protected

Definition at line 171 of file SoBoxHighlightRenderAction.h.

◆ cube

SoCube* SoBoxHighlightRenderAction::cube
protected

Definition at line 176 of file SoBoxHighlightRenderAction.h.

◆ drawStyle

SoDrawStyle* SoBoxHighlightRenderAction::drawStyle
protected

Definition at line 172 of file SoBoxHighlightRenderAction.h.

◆ hlVisible

bool SoBoxHighlightRenderAction::hlVisible
protected

Definition at line 178 of file SoBoxHighlightRenderAction.h.

◆ lightModel

SoLightModel* SoBoxHighlightRenderAction::lightModel
protected

Definition at line 170 of file SoBoxHighlightRenderAction.h.

◆ localRoot

SoSeparator* SoBoxHighlightRenderAction::localRoot
protected

Definition at line 169 of file SoBoxHighlightRenderAction.h.

◆ selPath

SoPath* SoBoxHighlightRenderAction::selPath
protected

Definition at line 181 of file SoBoxHighlightRenderAction.h.

◆ texture

SoTexture2* SoBoxHighlightRenderAction::texture
protected

Definition at line 173 of file SoBoxHighlightRenderAction.h.

◆ xform

SoMatrixTransform* SoBoxHighlightRenderAction::xform
protected

Definition at line 175 of file SoBoxHighlightRenderAction.h.

◆ xlate

SoTranslation* SoBoxHighlightRenderAction::xlate
protected

Definition at line 174 of file SoBoxHighlightRenderAction.h.


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