SoHaloHighlightRenderAction Class Reference
[Actions]

A halo highlight style. More...

#include <Inventor/actions/SoHaloHighlightRenderAction.h>

Inheritance diagram for SoHaloHighlightRenderAction:
SoHighlightRenderAction SoGLRenderAction SoAction SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoHaloHighlightRenderAction ()
 SoHaloHighlightRenderAction (const SbViewportRegion &viewportRegion)
virtual ~SoHaloHighlightRenderAction ()
void setHaloColor (const SbColor &color)
const SbColorgetHaloColor () const
void setHaloWidth (int width)
int getHaloWidth () const
void setHaloAlwaysVisible (bool alwaysVisible)
bool isHaloAlwaysVisible () const
void setHaloSmoothFactor (float smoothFactor)
float getHaloSmoothFactor () const

Static Public Member Functions

static SoType getClassTypeId ()
static void initClass ()
static void exitClass ()

Detailed Description

A halo highlight style.

SoHaloHighlightRenderAction is a render action which renders the specified scene graph, then renders a "halo" highlight around each selected object. See the images below for examples of this highlight technique. Halo highlighting works with all kinds of shapes including VolumeViz and MeshVizXLM. However, if a selected object does not write to the depth buffer for any reason, it will not be highlighted.

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.

Here is an example of an SoAlgebraicCone highlighted with an SoHaloHighlightRenderAction:

halo_highlight_cone.png

Here are parameters that can be adjusted:

NOTES

EXAMPLE

SEE ALSO

SoLineHighlightRenderAction, SoColorHighlightRenderAction, SoBoxHighlightRenderAction, SoHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea

See related examples:

HighlightingStylesDemo, QtRenderAreaOrbiter


Constructor & Destructor Documentation

SoHaloHighlightRenderAction::SoHaloHighlightRenderAction (  ) 
SoHaloHighlightRenderAction::SoHaloHighlightRenderAction ( const SbViewportRegion viewportRegion  ) 
virtual SoHaloHighlightRenderAction::~SoHaloHighlightRenderAction (  )  [virtual]

Member Function Documentation

static void SoHaloHighlightRenderAction::exitClass (  )  [static]

Reimplemented from SoHighlightRenderAction.

static SoType SoHaloHighlightRenderAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoHighlightRenderAction.

const SbColor& SoHaloHighlightRenderAction::getHaloColor (  )  const
float SoHaloHighlightRenderAction::getHaloSmoothFactor (  )  const
int SoHaloHighlightRenderAction::getHaloWidth (  )  const
virtual SoType SoHaloHighlightRenderAction::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoHighlightRenderAction.

static void SoHaloHighlightRenderAction::initClass (  )  [static]

Reimplemented from SoHighlightRenderAction.

bool SoHaloHighlightRenderAction::isHaloAlwaysVisible (  )  const
void SoHaloHighlightRenderAction::setHaloAlwaysVisible ( bool  alwaysVisible  ) 

Defines whether or not the halo can be seen through objects that are placed in front of selected shapes.

Default is FALSE.

The following images shows an example of halo highlighting with alwaysVisible set to FALSE and TRUE:

alwaysVisible = FALSE alwaysVisible = TRUE
halo_highlight_always_visible_F.png
halo_highlight_always_visible_T.png
void SoHaloHighlightRenderAction::setHaloColor ( const SbColor color  ) 

Defines the color of the highlight.

Default is red (1,0,0).

Here are examples of halo highlighting with different colors:

Red Green Blue
halo_highlight_red.png
halo_highlight_green.png
halo_highlight_blue.png
void SoHaloHighlightRenderAction::setHaloSmoothFactor ( float  smoothFactor  ) 

Defines the amount of alpha attenuation of the halo contour.

Default is 0. The value will be clamped between 0 and 1.

The following images shows an example of halo highlighting with different values for the smooth factor:

smoothFactor = 0 smoothFactor = 0.33 smoothFactor = 0.66 smoothFactor = 1
halo_highlight_smooth_00.png
halo_highlight_smooth_03.png
halo_highlight_smooth_06.png
halo_highlight_smooth_10.png
void SoHaloHighlightRenderAction::setHaloWidth ( int  width  ) 

Defines the width of the halo in pixels.

Default is 3.

Only values greater or equal to 1 are accepted. If a value of 0 or lower is given, the effective value will be clamped to 1.

The following images shows an example of halo highlighting with different values for the halo width:

width = 1 width = 3 width = 7 width = 15
halo_highlight_width_1.png
halo_highlight_width_3.png
halo_highlight_width_7.png
halo_highlight_width_15.png

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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/