Open Inventor Reference
|
Special separator that performs locate highlighting. More...
#include <Inventor/nodes/SoLocateHighlight.h>
Public Types | |
enum | Styles { EMISSIVE, EMISSIVE_DIFFUSE } |
Possible values for draw style. More... | |
enum | Modes { AUTO, ON, OFF } |
Possible values for the mode. More... | |
Public Member Functions | |
SoLocateHighlight () | |
Creates a LocateHighlight node with default settings. | |
virtual void | handleEvent (SoHandleEventAction *action) |
Override handleEvent to look for mouse motion, to do a pick and highlight if mouse is over us. | |
virtual void | GLRenderBelowPath (SoGLRenderAction *action) |
These methods make render traversal faster by implementing different rendering paths corresponding to different action path codes. | |
virtual void | GLRenderInPath (SoGLRenderAction *action) |
Static Public Member Functions | |
static void | initClass () |
initialize the class | |
static void | turnOffCurrentHighlight (SoGLRenderAction *action) |
This will de-highlight the currently highlighted node if any. | |
Public Attributes | |
Fields | |
SoSFColor | color |
Highlighting color - default [.3, .3, .3]. | |
SoSFEnum | style |
Highlighting draw style - default EMISSIVE. | |
SoSFEnum | mode |
Whether to highlight or not - default AUTO. | |
Protected Member Functions | |
virtual | ~SoLocateHighlight () |
virtual void | redrawHighlighted (SoAction *act, SbBool flag) |
This is called when this nodes needs to highlight or de-highlight. |
This is a subclass of SoSeparator that redraws itself in a different color when the cursor is over the contents of the separator.
The redraw happens for that separator only and not the entire window (redraw along the handle event pick path) and in the front buffer, to efficiently track the mouse motion. The highlighted redraw overrides the emissive and/or diffuse color of the subgraph based on the field values in this node.
NOTE: when using SoLightModel::BASE_COLOR
(to turn lighting off) only the diffuse color will be used to render objects, so EMISSIVE_DIFFUSE
must be used for this node to have any effect.
LocateHighlight { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO mode AUTO style EMISSIVE color 0.300000011920929 0.300000011920929 0.300000011920929 }
AUTO
), otherwise traverses as a normal separator. AUTO
or always if mode == ON
), otherwise traverses as a normal separator.Definition at line 126 of file SoLocateHighlight.h.
Definition at line 139 of file SoLocateHighlight.h.
EMISSIVE |
changes emissive color only (default) |
EMISSIVE_DIFFUSE |
changes emissive and diffuse colors |
Definition at line 133 of file SoLocateHighlight.h.
SoLocateHighlight::SoLocateHighlight | ( | ) |
virtual SoLocateHighlight::~SoLocateHighlight | ( | ) | [protected, virtual] |
virtual void SoLocateHighlight::GLRenderBelowPath | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoSeparator.
virtual void SoLocateHighlight::GLRenderInPath | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoSeparator.
virtual void SoLocateHighlight::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
The GLRender methods are redefined to draw highlighted if needed.
Reimplemented from SoSeparator.
Reimplemented in SoWWWAnchor.
static void SoLocateHighlight::initClass | ( | ) | [static] |
Reimplemented from SoSeparator.
Reimplemented in SoWWWAnchor.
virtual void SoLocateHighlight::redrawHighlighted | ( | SoAction * | act, |
SbBool | flag | ||
) | [protected, virtual] |
It can be used by subclasses to be told when the status change.
Reimplemented in SoWWWAnchor.
static void SoLocateHighlight::turnOffCurrentHighlight | ( | SoGLRenderAction * | action | ) | [static] |
this should be called when the cursor leaves a window or a mode changes happen which would prevent a highlighted node from receiving more mouse motion events. The GL render action used to render into that window needs to be passed to correctly un-highlight.
Definition at line 149 of file SoLocateHighlight.h.
Definition at line 155 of file SoLocateHighlight.h.
Definition at line 152 of file SoLocateHighlight.h.