Open Inventor 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>
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 SbColor & | getColor () |
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 | |
SoSeparator * | localRoot |
Nodes which comprise the local highlight graph. | |
SoLightModel * | lightModel |
SoBaseColor * | baseColor |
SoDrawStyle * | drawStyle |
SoTexture2 * | texture |
SoTranslation * | xlate |
SoMatrixTransform * | xform |
SoCube * | cube |
SbBool | hlVisible |
SoPath * | selPath |
Cached path to selection so we don't search every time. |
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.
Definition at line 105 of file SoBoxHighlightRenderAction.h.
SoBoxHighlightRenderAction::SoBoxHighlightRenderAction | ( | ) |
SoBoxHighlightRenderAction::SoBoxHighlightRenderAction | ( | const SbViewportRegion & | viewportRegion | ) |
virtual SoBoxHighlightRenderAction::~SoBoxHighlightRenderAction | ( | ) | [virtual] |
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] |
SoBaseColor* SoBoxHighlightRenderAction::baseColor [protected] |
Definition at line 171 of file SoBoxHighlightRenderAction.h.
SoCube* SoBoxHighlightRenderAction::cube [protected] |
Definition at line 176 of file SoBoxHighlightRenderAction.h.
SoDrawStyle* SoBoxHighlightRenderAction::drawStyle [protected] |
Definition at line 172 of file SoBoxHighlightRenderAction.h.
SbBool SoBoxHighlightRenderAction::hlVisible [protected] |
Definition at line 178 of file SoBoxHighlightRenderAction.h.
SoLightModel* SoBoxHighlightRenderAction::lightModel [protected] |
Definition at line 170 of file SoBoxHighlightRenderAction.h.
SoSeparator* SoBoxHighlightRenderAction::localRoot [protected] |
Definition at line 169 of file SoBoxHighlightRenderAction.h.
SoPath* SoBoxHighlightRenderAction::selPath [protected] |
Definition at line 181 of file SoBoxHighlightRenderAction.h.
SoTexture2* SoBoxHighlightRenderAction::texture [protected] |
Definition at line 173 of file SoBoxHighlightRenderAction.h.
SoMatrixTransform* SoBoxHighlightRenderAction::xform [protected] |
Definition at line 175 of file SoBoxHighlightRenderAction.h.
SoTranslation* SoBoxHighlightRenderAction::xlate [protected] |
Definition at line 174 of file SoBoxHighlightRenderAction.h.