public class SceneInteractor extends SoSeparator
The SceneInteractor is a simple extension of the SoSeparator
node
that allows handling of Open Inventor events. This class should be overridden
as it provides only empty event handlers.
This node is intended to be used as the root of a scene graph. The SceneInteractor is a custom SoSeparator whose children are:
SoCameraInteractor
in order
to manipulate the camera in response to OpenInventor events.
Class diagram of the SceneInteractor showing the relationship between the SoEventCallback, the SoCamera, the SoDirectionalLight (used as headlight) and the SoCameraInteractor.
Detail of the scene graph rooted by a SceneInteractor:
Notes:
Modifier and Type | Class and Description |
---|---|
static class |
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 |
---|
SceneInteractor() |
Modifier and Type | Method and Description |
---|---|
void |
adjustClippingPlanes(SbViewportRegion vpRegion)
Adjust near and far clipping planes to minimize clipping of objects in the
scene.
|
boolean |
dispose()
Explicitly call this method to force object to dispose its unmanaged
resources.
|
void |
enableHeadlight(boolean enabled)
Enable or disable headlight.
|
SoCamera |
getCamera()
Returns the current camera.
|
SoCameraInteractor |
getCameraInteractor() |
SceneInteractor.CameraMode |
getCameraMode()
Get the current camera mode.
|
boolean |
isHeadlightEnabled()
Return if headlight is enabled.
|
void |
setCameraMode(SceneInteractor.CameraMode mode)
Set camera mode to perspective or orthographic.
|
void |
viewAll(SbViewportRegion vpRegion)
Set the camera to view all the scene.
|
void |
viewAxis(SbVec3f direction,
SbVec3f up)
Moves the camera to be aligned with the given direction vector while
keeping the "up" direction of the camera parallel to the specified up
vector.
|
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 boolean dispose()
Inventor
dispose
in interface SafeDisposable
dispose
in class SoBase
true
if this object native resources were successfully
disposed; false
if it was already disposed or no
native resources has been registered for this object.public void setCameraMode(SceneInteractor.CameraMode mode)
public SceneInteractor.CameraMode getCameraMode()
public SoCameraInteractor getCameraInteractor()
public SoCamera getCamera()
public void adjustClippingPlanes(SbViewportRegion vpRegion)
public void viewAll(SbViewportRegion vpRegion)
public void viewAxis(SbVec3f direction, SbVec3f up)
direction
- the new view direction vectorup
- the new "up" directionpublic void enableHeadlight(boolean enabled)
public boolean isHeadlightEnabled()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com