SoBoxHighlightRenderAction Class Reference

A box highlight style. More...

#include <Inventor/actions/SoBoxHighlightRenderAction.h>

Inheritance diagram for SoBoxHighlightRenderAction:
SoHighlightRenderAction SoGLRenderAction SoAction SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoBoxHighlightRenderAction ()
 SoBoxHighlightRenderAction (const SbViewportRegion &viewportRegion)
virtual void apply (SoNode *node)
void setColor (const SbColor &c)
const SbColorgetColor ()
void setLinePattern (unsigned short pattern)
unsigned short getLinePattern ()
void setLineWidth (float width)
float getLineWidth ()

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

A box highlight style.

SoBoxHighlightRenderAction is a render action which renders the specified scene graph, then renders wireframe boxes surrounding each selected object. If an SoGetBoundingBoxAction applied to a selected object produces an empty bounding box, no highlight is rendered for that object.

Selected objects are specified by the first selection node (SoSelection or SoExtSelection) node in the scene to which this action is applied. If there is no selection node in the scene graph, then no objects will be highlighted.

The application must explicitly tell Open Inventor to use a highlight render action in place of the default SoGLRenderAction in the SoSceneManager class using the setGLRenderAction() method. The viewer classes provide a convenience setGLRenderAction() method that calls SoSceneManager (see e.g. SoWinRenderArea).

For convenience, the viewer classes also provide the redrawOnSelectionChange() method. This method attaches a sensor to the specified selection node and automatically schedules a redraw if the set of selected objects is modified.

Other highlight effects are available including "halo" highlighting.



SoLineHighlightRenderAction, SoColorHighlightRenderAction, SoHaloHighlightRenderAction, SoHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea

See related examples:

ExtSelection, HighlightingStylesDemo

Constructor & Destructor Documentation

SoBoxHighlightRenderAction::SoBoxHighlightRenderAction (  ) 


SoBoxHighlightRenderAction::SoBoxHighlightRenderAction ( const SbViewportRegion viewportRegion  ) 

Constructor which takes the normal SoGLRenderAction parameters.

Member Function Documentation

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

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.

Reimplemented from SoHighlightRenderAction.

static SoType SoBoxHighlightRenderAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoHighlightRenderAction.

const SbColor& SoBoxHighlightRenderAction::getColor (  ) 

Gets the color of the highlight.

unsigned short SoBoxHighlightRenderAction::getLinePattern (  ) 

Gets the line pattern of the highlight.

float SoBoxHighlightRenderAction::getLineWidth (  ) 

Gets the line width of the highlight.

virtual SoType SoBoxHighlightRenderAction::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoHighlightRenderAction.

void SoBoxHighlightRenderAction::setColor ( const SbColor c  ) 

Sets the color of the highlight.

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  ) 

Sets the line pattern of the highlight.

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  ) 

Sets the line width of the highlight.

Default is 3 . Application is responsible for forcing a redraw of the scene to see the effects of this change.

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

Open Inventor Toolkit reference manual, generated on 16 Mar 2021
Copyright © Thermo Fisher Scientific All rights reserved.