Class SoLocateHighlight

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    SoWWWAnchor

    public class SoLocateHighlight
    extends SoSeparator
    Special separator that performs locate highlighting. 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.

    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:
    SoSeparator, SoSelection, SoMaterial
    • Constructor Detail

      • SoLocateHighlight

        public SoLocateHighlight()
        Creates a LocateHighlight node with default settings.
    • 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.