Class SoInteractionKit
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodekits.SoBaseKit
-
- com.openinventor.inventor.nodekits.SoInteractionKit
-
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoDragger
public class SoInteractionKit extends SoBaseKit
Base class for all interaction nodekit classes. This is the base class for all classes of interaction nodekits. Currently, the only subclass isSoDragger
, which reacts to click-drag-release events from the mouse.This node has three fields corresponding to those of an
SoSeparator
: They areboundingBoxCaching
,renderCulling
, andpickCulling
. They behave the same here as they do for anSoSeparator
The
setPartAsPath()
method provides support for creating "stand-in" objects for parts in the interaction kit. The "stand-in", or "surrogate" part, is a path to an object that lies somewhere else in the scene graph. This could be used, for example, with anSoTranslate1Dragger
to allow the user to click on some geometry and directly drag it (without displaying any separate dragger geometry). This technique is used, for example, inSoOrthoSliceDragger
.File format/default:
InteractionKit {
boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO callbackList NULL CATALOG PARTS All Parts
Part Name Part Type Default Type NULL Default callbackList NodeKitListPart yes Extra Information for List Parts from Above Table
Part Name Container Type Possible Types callbackList Separator Callback, EventCallback - See Also:
SoBaseKit SoInteraction
,SoNodeKitDetail SoNodeKitPath
,SoNodekitCatalog
,SoDragger
,SoCenterballDragger
,SoDirectionalLightDragger
,SoDragPointDragger
,SoHandleBoxDragger
,SoJackDragger
,SoPointLightDragger
,SoRotateCylindricalDragger
,SoRotateDiscDragger
,SoRotateSphericalDragger
,SoScale1Dragger
,SoScale2Dragger
,SoScale2UniformDragger
,SoScaleUniformDragger
,SoSpotLightDragger
,SoTabBoxDragger
,SoTabPlaneDragger
,SoTrackballDragger
,SoTransformBoxDragger
,SoTranslate1Dragger
,SoTranslate2Dragger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoInteractionKit.Cachings
Possible values for caching.-
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 SoSFEnum<SoInteractionKit.Cachings>
boundingBoxCaching
Set bounding box caching mode.SoSFEnum<SoInteractionKit.Cachings>
pickCulling
Set pick caching mode.SoSFEnum<SoInteractionKit.Cachings>
renderCaching
Deprecated.As of Open Inventor 10.3.0.0.SoSFEnum<SoInteractionKit.Cachings>
renderCulling
Set render culling mode.-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.boolean
setPartAsPath(java.lang.String partName, SoPath surrogatePath)
Sets any public part in the interaction kit as a "surrogate" path instead.-
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
-
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, 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
-
renderCaching
@Deprecated(since="10.3.0.0") public final SoSFEnum<SoInteractionKit.Cachings> renderCaching
Deprecated.As of Open Inventor 10.3.0.0. This field is ignored. Render caching is set internally to ensure best performance.Set render caching mode. . Default is AUTO.Warning Deprecated since Open Inventor 10300. This field is ignored. Render caching is set internally to ensure best performance.
-
boundingBoxCaching
public final SoSFEnum<SoInteractionKit.Cachings> boundingBoxCaching
Set bounding box caching mode. . Default is ON. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.
-
renderCulling
public final SoSFEnum<SoInteractionKit.Cachings> renderCulling
Set render culling mode. . Default is OFF. Setting this value to AUTO is equivalent to ON - automatic culling is not implemented.
-
pickCulling
public final SoSFEnum<SoInteractionKit.Cachings> pickCulling
Set pick caching mode. . Default is AUTO.
-
-
Method Detail
-
setPartAsPath
public boolean setPartAsPath(java.lang.String partName, SoPath surrogatePath)
Sets any public part in the interaction kit as a "surrogate" path instead. The object at the end of the path serves as a stand-in when a pick occurs, and can thus initiate interaction.Instead of the usual
setPart()
, which replaces partName with a new node, this will remove the node being used for partName from the scene and remember the surrogatePath you give it. Later, any pick on surrogatePath will be regarded as a pick on partName.For example, set the XRotator part of an
SoTrackballDragger
to be the path to an object in the scene. The rest of the trackball will look the same, but the XRotator stripe will disappear. However, click the mouse on the object at the end of surrogatePath and the ball will start to drag in rotation around its X axis.Note that this is different from setting the part to be the node at the end of the path. When you set the part as a node, a second instance will be drawn in the local space of the interaction kit. When you set it as a path, the object itself is used, not a copy.
The partName may be any part name that follows the nodekit syntax for parts, such as childList[0].shape or rotator.rotatorActive. (See the
getPart()
method in theSoBaseKit
reference page for a complete description.)NOTE: No information about the surrogatePath is written to a file.
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
-