SoBoxHighlightRenderAction Class Reference
[Actions]

A selection highlight style. More...

#include <Inventor/actions/SoBoxHighlightRenderAction.h>

Inheritance diagram for SoBoxHighlightRenderAction:
SoGLRenderAction SoAction SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoBoxHighlightRenderAction ()
 SoBoxHighlightRenderAction (const SbViewportRegion &viewportRegion)
virtual void clearApplyResult ()
virtual void apply (SoNode *node)
virtual void apply (SoPath *path)
virtual void apply (const SoPathList &pathList, SbBool obeysRules=FALSE)
void setVisible (SbBool b)
SbBool isVisible () const
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 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 render area and viewer classes to have an effect on scene graphs.

EXAMPLE

SEE ALSO

SoLineHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea, SoDrawStyle, SoInteraction

See related examples:

ExtSelection


Constructor & Destructor Documentation

SoBoxHighlightRenderAction::SoBoxHighlightRenderAction (  ) 

Constructor.

SoBoxHighlightRenderAction::SoBoxHighlightRenderAction ( const SbViewportRegion viewportRegion  ) 

Constructor which takes the normal SoGLRenderAction parameters.


Member Function Documentation

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

Applies action to the graph defined by a path list.

It simply invokes the parent class apply() methods. It does NOT highlight the path, whether selected or not.

Reimplemented from SoGLRenderAction.

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

Applies action to the graph defined by a path.

It simply invokes the parent class apply() methods. It does NOT highlight the path, whether selected or not.

Reimplemented from SoGLRenderAction.

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 SoGLRenderAction.

virtual void SoBoxHighlightRenderAction::clearApplyResult (  )  [virtual]

When applied, an action may reference nodes or create objects (e.g. SoPath) that reference nodes. This is especially true for SoSearchAction and SoRayPickAction. These references will prevent the nodes from being destroyed and so may appear to be a "memory leak".All references are cleared when the action is destroyed or re-applied. However it may be useful to clear them explicitly to remove references to nodes.

Reimplemented from SoAction.

static SoType SoBoxHighlightRenderAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoGLRenderAction.

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 SoGLRenderAction.

SbBool SoBoxHighlightRenderAction::isVisible (  )  const [inline]

Returns whether highlights will be rendered or not.

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.

void SoBoxHighlightRenderAction::setVisible ( SbBool  b  ) 

This provides a convenient mechanism for turning highlights off or on.

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.


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

Open Inventor Toolkit reference manual, generated on 17 Dec 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/