public class SceneExaminer extends SceneInteractor
The SceneExaminer is an extension of the SceneInteractor
node that
allows providing the camera and headlight manipulations like panning, zooming
and orbiting similar to the behavior of the classic Open Inventor viewer
class SwSimpleViewer
with an examiner
area (SceneExaminer.NavigationMode.ORBIT
) or a plane area
(SceneExaminer.NavigationMode.PLANE
). Similar behavior includes a 'headlight', i.e.
an SoDirectionalLight node automatically aligned with the camera's view
direction.
The SceneExaminer is not directly comparable with a classic OpenInventor
viewer as it does not provide any GUI (no button, no popup menu) and fewer
interactive features (no animation). However it does provide a touch event
handler that allows manipulating a scene on a touch device.
See parent class SceneInteractor
for more details about the structure
of the internal scene graph.
The SceneExaminer uses an instance of SoCameraInteractor
to
manipulate the camera in response to OpenInventor events.
Notes:
SoRenderAreaCore
class.
Example components are provided for AWT and SWT toolkits.
SoEventBuilder
class.
Example components are provided for AWT and SWT toolkits: AWTEventToSoEvent
and SWTEventToSoEvent.
enableZoom(boolean)
). In selection mode, all events are
sent to the application scene graph.
SceneInteractor.adjustClippingPlanes(SbViewportRegion)
. See render area's
implementations available in $OIVJHOME/examples/inventor/viewercomponents/awt
and $OIVJHOME/examples/inventor/viewercomponents/swt folders for examples of
adjustClippingPlanes
use.
Compatibility
Please note that some interaction behaviors are different than the classic
Open Inventor viewer classes :
Usage:
Modifier and Type | Class and Description |
---|---|
static class |
SceneExaminer.InteractionMode
Interaction Mode (navigation or selection)
|
static interface |
SceneExaminer.InteractionModeListener
Listener interface to receive notifications of interaction mode changes.
|
static class |
SceneExaminer.NavigationMode
Navigation Mode
|
SceneInteractor.CameraMode
SoSeparator.Cachings, SoSeparator.FastEditings, SoSeparator.RenderUnitIds
Inventor.ConstructorCommand
AUTO, boundingBoxCaching, CLEAR_ZBUFFER, directVizCaching, DISABLE, fastEditing, KEEP_ZBUFFER, OFF, ON, pickCulling, renderCaching, renderCulling, renderUnitId
boundingBoxIgnoring
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SceneExaminer() |
Modifier and Type | Method and Description |
---|---|
void |
addInteractionModeListener(SceneExaminer.InteractionModeListener listener)
Adds a listener to receive notifications of interaction mode changes.
|
void |
enableOrbit(boolean enabled)
Enable or disable camera orbiting.
|
void |
enablePan(boolean enabled)
Enable or disable camera panning.
|
void |
enableRotate(boolean enabled)
Enable or disable camera rotate.
|
void |
enableSeek(boolean enabled)
Enable or disable seek.
|
void |
enableSelection(boolean enabled)
Enable or disable selection mode.
|
void |
enableZoom(boolean enabled)
Enable or disable zoom.
|
SceneExaminer.InteractionMode |
getInteractionMode()
Get the current interaction mode.
|
SceneExaminer.NavigationMode |
getNavigationMode()
Get the current navigation mode.
|
boolean |
isOrbitEnabled()
Return if camera orbiting is enabled.
|
boolean |
isPanEnabled()
Return if camera panning is enabled.
|
boolean |
isRotateEnabled()
Return if rotate is enabled.
|
boolean |
isSeekEnabled()
Return if seek is enabled.
|
boolean |
isSelectionEnabled()
Return if selection is enabled.
|
boolean |
isZoomEnabled()
Return if zoom is enabled.
|
void |
removeInteractionModeListener(SceneExaminer.InteractionModeListener listener)
Removes the specified listener so that it no longer receives notifications
of interaction mode changes.
|
void |
setCameraMode(SceneInteractor.CameraMode mode)
Set camera mode to perspective or orthographic.
|
void |
setInteractionMode(SceneExaminer.InteractionMode mode)
Set interaction mode to navigation or selection.
|
void |
setNavigationMode(SceneExaminer.NavigationMode mode)
Set navigation mode.
|
void |
setSeekMode(boolean onOrOff)
Set the interaction into or out off seek mode (default is off).
|
adjustClippingPlanes, dispose, enableHeadlight, getCamera, getCameraInteractor, getCameraMode, isHeadlightEnabled, viewAll, viewAxis
getNumRenderCaches, setNumRenderCaches
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public void setCameraMode(SceneInteractor.CameraMode mode)
SceneInteractor
setCameraMode
in class SceneInteractor
public SceneExaminer.NavigationMode getNavigationMode()
public void setNavigationMode(SceneExaminer.NavigationMode mode)
public SceneExaminer.InteractionMode getInteractionMode()
public void setInteractionMode(SceneExaminer.InteractionMode mode)
public void addInteractionModeListener(SceneExaminer.InteractionModeListener listener)
public void removeInteractionModeListener(SceneExaminer.InteractionModeListener listener)
public void enableSelection(boolean enabled)
public boolean isSelectionEnabled()
public void enableZoom(boolean enabled)
public boolean isZoomEnabled()
public void enableRotate(boolean enabled)
public boolean isRotateEnabled()
public void enableSeek(boolean enabled)
public boolean isSeekEnabled()
public void enablePan(boolean enabled)
public boolean isPanEnabled()
public void enableOrbit(boolean enabled)
public boolean isOrbitEnabled()
public void setSeekMode(boolean onOrOff)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com