A wireframe highlight style. More...
#include <Inventor/actions/SoLineHighlightRenderAction.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoLineHighlightRenderAction () | |
SoLineHighlightRenderAction (const SbViewportRegion &viewportRegion) | |
void | setColor (const SbColor &c) |
const SbColor & | getColor () |
void | setLinePattern (unsigned short pattern) |
unsigned short | getLinePattern () |
void | setLineWidth (float width) |
float | getLineWidth () |
void | setPointSize (float size) |
float | getPointSize () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
A wireframe highlight style.
SoLineHighlightRenderAction is a render action which renders the specified scene graph, then renders each selected object again in wireframe. If there is no renderable geometry in a selected object, 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.
// Scene graph SoSelection* selectionNode = new SoSelection(); . . . // Viewer SoWinExaminerViewer* viewer = new SoWinExaminerViewer(); viewer->setSceneGraph( selectionNode ); // Set the highlight render action viewer->setGLRenderAction( new SoLineHighlightRenderAction() ); // Request automatic redraw when selection changes viewer->redrawOnSelectionChange( selectionNode );
SoBoxHighlightRenderAction, SoColorHighlightRenderAction, SoHaloHighlightRenderAction, SoHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea
SoLineHighlightRenderAction::SoLineHighlightRenderAction | ( | ) |
Constructor.
SoLineHighlightRenderAction::SoLineHighlightRenderAction | ( | const SbViewportRegion & | viewportRegion | ) |
Constructor which takes the normal SoGLRenderAction parameters.
static SoType SoLineHighlightRenderAction::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoHighlightRenderAction.
const SbColor& SoLineHighlightRenderAction::getColor | ( | ) |
Gets the color of the highlight.
unsigned short SoLineHighlightRenderAction::getLinePattern | ( | ) |
Gets the line pattern of the highlight.
float SoLineHighlightRenderAction::getLineWidth | ( | ) |
Gets the line width of the highlight.
float SoLineHighlightRenderAction::getPointSize | ( | ) |
Gets the point size of the highlight.
virtual SoType SoLineHighlightRenderAction::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoHighlightRenderAction.
void SoLineHighlightRenderAction::setColor | ( | const SbColor & | c | ) |
Sets the color of the highlight.
Default is red (1,0,0). The application is responsible for forcing a redraw of the scene to see the effects of this change.
void SoLineHighlightRenderAction::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 more information. The application is responsible for forcing a redraw of the scene to see the effects of this change.
void SoLineHighlightRenderAction::setLineWidth | ( | float | width | ) |
Sets the line width of the highlight.
Default is 3. The application is responsible for forcing a redraw of the scene to see the effects of this change.
void SoLineHighlightRenderAction::setPointSize | ( | float | size | ) |
Sets the size of points (diameter in pixels) rendered by the highlight.
Default is 1. Value must be greater than zero. Only applies to point primitives, e.g. SoPointSet.