Class SoLocateHighlight
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoWWWAnchor
public class SoLocateHighlight extends SoSeparator
Special separator that performs locate highlighting. This is a subclass ofSoSeparator
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 (ifmode
is AUTO), otherwise traverses as a normal separator.SoGLRenderAction
Redraws either highlighted (if cursor is over the contents of the separator whenmode
== AUTO or always ifmode
== ON), otherwise traverses as a normal separator.- See Also:
SoSeparator
,SoSelection
,SoMaterial
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoLocateHighlight.Modes
Possible values for the mode.static class
SoLocateHighlight.Styles
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
Fields Modifier and Type Field Description SoSFColor
color
Highlighting color - default [.3, .3, .3].SoSFEnum<SoLocateHighlight.Modes>
mode
Whether to highlight or not.SoSFEnum<SoLocateHighlight.Styles>
style
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 Constructor Description SoLocateHighlight()
Creates a LocateHighlight node with default settings.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
turnOffCurrentHighlight(SoGLRenderAction action)
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 Detail
-
color
public final SoSFColor color
Highlighting color - default [.3, .3, .3].
-
style
public final SoSFEnum<SoLocateHighlight.Styles> style
Highlighting draw style. . Default EMISSIVE.
-
mode
public final SoSFEnum<SoLocateHighlight.Modes> mode
Whether to highlight or not. . Default OFF.
-
-
Method Detail
-
turnOffCurrentHighlight
@Deprecated(since="10.8.1.0") public static void turnOffCurrentHighlight(SoGLRenderAction action)
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.
-
-