Class SoLocateHighlight
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoWWWAnchor
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.
Limitations:
- When using a SceneExaminer, subgraph can remain highlighted after switching from selection mode to viewing mode.
- When using an examiner viewer or a SceneExaminer, subgraph can remain unhighlighted when switching from viewing mode to selection mode until the mouse is moved.
- The
SceneOrbiter
does not have such limitation.To override the default mode (off), set environment variable IV_ALLOW_LOCATE_HIGHLIGHT to 1. This will allow locate highlighting to happen by default.
File format/default:
LocateHighlight {
boundingBoxCaching | AUTO |
renderCulling | AUTO |
pickCulling | AUTO |
mode | OFF |
style | EMISSIVE |
color | 0.3 0.3 0.3 |
fastEditing | DISABLE |
Action behavior:
SoHandleEventAction
Checks to see if the cursor moves onto or off of the contents of the separator, and redraws appropriately (if mode
is AUTO), otherwise traverses as a normal separator.
SoGLRenderAction
Redraws either highlighted (if cursor is over the contents of the separator when mode
== AUTO or always if mode
== ON), otherwise traverses as a normal separator.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Possible values for the mode.static enum
Possible values for draw style.Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoSeparator
SoSeparator.Cachings, SoSeparator.FastEditings, SoSeparator.RenderUnitIds
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFColor
Highlighting color - default [.3, .3, .3].final SoSFEnum
<SoLocateHighlight.Modes> Whether to highlight or not.final SoSFEnum
<SoLocateHighlight.Styles> Highlighting draw style.Fields inherited from class com.openinventor.inventor.nodes.SoSeparator
boundingBoxCaching, fastEditing, pickCulling, renderCaching, renderCulling, renderUnitId
Fields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoring
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Deprecated.As of Open Inventor 10.8.1.0.Methods inherited from class com.openinventor.inventor.nodes.SoGroup
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
color
Highlighting color - default [.3, .3, .3]. -
style
Highlighting draw style. . Default EMISSIVE. -
mode
Whether to highlight or not. . Default OFF.
-
-
Constructor Details
-
SoLocateHighlight
public SoLocateHighlight()Creates a LocateHighlight node with default settings.
-
-
Method Details
-
turnOffCurrentHighlight
Deprecated.As of Open Inventor 10.8.1.0. This method is useless because the current highlighting of the subgraph is automatically turned off when switching from picking to viewing mode in viewers such as examiner viewers. However if your are using a custom viewer, you must send an SoLocation2Event.EventSource.OTHER event when switching modes instead of calling turnOffCurrentHighlight.This will de-highlight the currently highlighted node if any. 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.Warning Deprecated since Open Inventor 10810. This method is useless because the current highlighting of the subgraph is automatically turned off when switching from picking to viewing mode in viewers such as examiner viewers. However if your are using a custom viewer, you must send an SoLocation2Event.EventSource.OTHER event when switching modes instead of calling turnOffCurrentHighlight.
-