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
SoNode.RenderModes
Inventor.ConstructorCommand
boundingBoxCaching, fastEditing, 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.
|
void |
enableHeadlight(boolean enabled)
Enable or disable headlight.
|
SoCamera |
getCamera()
Returns the current camera.
|
SoCameraInteractor |
getCameraInteractor() |
SceneInteractor.CameraMode |
getCameraMode()
Get the current camera mode.
|
SoNode.RenderModes |
getRenderEngineMode()
Returns the supported Render engine 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.
|
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
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public SoNode.RenderModes getRenderEngineMode()
SoNode
For custom node, this method returns by default
SoNode.RenderModes.OIV_UNKNOWN_RENDERING_MODE
, override this method to
specify the Render engine mode supported by your custom node.
getRenderEngineMode
in class SoNode
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 July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com