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

List of all members.

Public Member Functions

 SoBoxHighlightRenderAction ()
 Constructor.
 SoBoxHighlightRenderAction (const SbViewportRegion &viewportRegion)
 Constructor.
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.
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.
virtual void apply (const SoPathList &pathList, SbBool 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.
void setVisible (SbBool b)
 This provides a convenient mechansim for turning highlights off or on.
SbBool isVisible () const
 Returns whether highlights will be rendered or not.
void setColor (const SbColor &c)
 Set the color of the highlight.
const SbColorgetColor ()
 Get the color of the highlight.
void setLinePattern (unsigned short pattern)
 Set the line pattern of the highlight.
unsigned short getLinePattern ()
 Get the line pattern of the highlight.
void setLineWidth (float width)
 Set the line width.
float getLineWidth ()
 Get the line width.

Static Public Member Functions

static void initClass ()

Protected Member Functions

void updateBbox (SoPath *p)

Protected Attributes

SoSeparatorlocalRoot
 Nodes which comprise the local highlight graph.
SoLightModellightModel
SoBaseColorbaseColor
SoDrawStyledrawStyle
SoTexture2texture
SoTranslationxlate
SoMatrixTransformxform
SoCubecube
SbBool hlVisible
SoPathselPath
 Cached path to selection so we don't search every time.

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::SoBoxHighlightRenderAction ( )
SoBoxHighlightRenderAction::SoBoxHighlightRenderAction ( const SbViewportRegion viewportRegion)
virtual SoBoxHighlightRenderAction::~SoBoxHighlightRenderAction ( ) [virtual]

Member Function Documentation

virtual void SoBoxHighlightRenderAction::apply ( SoNode node) [virtual]

Reimplemented from SoAction.

virtual void SoBoxHighlightRenderAction::apply ( SoPath path) [virtual]

Reimplemented from SoAction.

virtual void SoBoxHighlightRenderAction::apply ( const SoPathList pathList,
SbBool  obeysRules = FALSE 
) [virtual]

Reimplemented from SoAction.

const SbColor& SoBoxHighlightRenderAction::getColor ( )
unsigned short SoBoxHighlightRenderAction::getLinePattern ( )
float SoBoxHighlightRenderAction::getLineWidth ( )
static void SoBoxHighlightRenderAction::initClass ( ) [static]

Reimplemented from SoGLRenderAction.

SbBool SoBoxHighlightRenderAction::isVisible ( ) const [inline]

Definition at line 141 of file SoBoxHighlightRenderAction.h.

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.

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.

void SoBoxHighlightRenderAction::setLineWidth ( float  width)
void SoBoxHighlightRenderAction::setVisible ( SbBool  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.

void SoBoxHighlightRenderAction::updateBbox ( SoPath p) [protected]

Member Data Documentation

Definition at line 176 of file SoBoxHighlightRenderAction.h.


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