Class SoOrthoSliceDragger
- 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
-
- com.openinventor.inventor.draggers.SoDragger
-
- com.openinventor.inventor.draggers.SoTranslate1Dragger
-
- com.openinventor.volumeviz.draggers.SoOrthoSliceDragger
-
- All Implemented Interfaces:
SafeDisposable
public class SoOrthoSliceDragger extends SoTranslate1Dragger
Object that moves anSoOrthoSlice
by dragging with the mouse.SoOrthoSliceDragger
is derived fromSoTranslate1Dragger
and has similar behavior, but is specifically designed to allow direct manipulation of anSoOrthoSlice
. The difference is that this class uses the actual geometry of the ortho slice to detect mouse clicks and automatically updates the slice'sSoOrthoSlice.sliceNumber
field as the dragger is moved. Conversely the dragger updates itself if the slice's axis or sliceNumber fields are changed by the application.The dragger will not do anything until the field
orthoSlicePath
has been set. The path can be a partial path, i.e. it does not need to start at the root of the scene graph. However, it must include theSoOrthoSlice
node.The dragger always sets its "translator" part to be the actual ortho slice node. When the dragger is created it sets its "translatorActive" part to be an empty Separator. You can reset this to something else. You can attach callbacks to this dragger in the usual way.
If the camera faces the slice (i.e. the orientation of the slice and the camera are exactly the same), the dragger will automatically change its orientation to another axis so that it can be manipulated (otherwise it can't). When the dragger itself is displayed, this behaviour may be surprising, and it can be disabled by setting the
SoPreferences
value IVVR_ENABLE_ORTHOSLICE_DRAGGER_AXIS_SWITCH to false.EXAMPLE SoSeparator volSep = new SoSeparator(); root.addChild(volSep); // Create and initialize data node SoVolumeData volData = new SoVolumeData(); volSep.addChild( volData ); // Create and initialize orthoslice node SoOrthoSlice orthoSlice = new SoOrthoSlice(); volSep.addChild( orthoSlice ); // Create path to slice node // Note: Can be a partial path but must include the slice node. SoPath path = new SoPath(volSep); path.regular.append( orthoSlice ); // Create and initialize dragger SoOrthoSliceDragger dragger = new SoOrthoSliceDragger(); dragger.orthoSlicePath.setValue( path ); volSep.addChild(dragger); File format/default:
OrthoSliceDragger {
orthoSlicePath NULL volumeDimension 0 0 0 volumeExtent 0 0 0 enableHighlight true highlightColor 1.0 1.0 0 - See Also:
SoDragger
,SoTranslate1Dragger
,SoOrthoSlice
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.draggers.SoDragger
SoDragger.TrackerDirectModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
SoInteractionKit.Cachings
-
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 SoSFBool
enableHighlight
Enables highlighting.SoSFColor
highlightColor
Specifies the highlight color.SoSFPath
orthoSlicePath
Path to theSoOrthoSlice
node to drag.SoSFVec3i32
volumeDimension
Deprecated.As of Open Inventor 101.1.0.0.SoSFBox3f
volumeExtent
Deprecated.As of Open Inventor 101.1.0.0.-
Fields inherited from class com.openinventor.inventor.draggers.SoTranslate1Dragger
translation
-
Fields inherited from class com.openinventor.inventor.draggers.SoDragger
enableCallbacks, isActive
-
Fields inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
boundingBoxCaching, pickCulling, renderCaching, renderCulling
-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoOrthoSliceDragger()
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.-
Methods inherited from class com.openinventor.inventor.draggers.SoDragger
addFinishCallback, addMotionCallback, addStartCallback, addValueChangedCallback, enableValueChangedCallbacks, getInitialTrackerDirectMode, getMinGesture, getMinGestureFloat, getMinScale, getMotionMatrix, getTrackerDirectMode, removeFinishCallback, removeMotionCallback, removeStartCallback, removeValueChangedCallback, setInitialTrackerDirectMode, setInitialTrackerDirectMode, setMinGesture, setMinGesture, setMinScale, setMotionMatrix, setTrackerDirectMode, setTrackerDirectMode
-
Methods inherited from class com.openinventor.inventor.nodekits.SoInteractionKit
setPartAsPath
-
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
-
orthoSlicePath
public final SoSFPath orthoSlicePath
Path to theSoOrthoSlice
node to drag.
Default is empty (no path).
-
volumeDimension
@Deprecated(since="101.1.0.0") public final SoSFVec3i32 volumeDimension
Deprecated.As of Open Inventor 101.1.0.0. This field is ignored. The dimension is fetched automatically from the SoDataSet specified by the field dataSetId of the SoOrthoSlice handled by this dragger.Dimension of the volume.Warning Deprecated since Open Inventor 101100. This field is ignored. The dimension is fetched automatically from the
SoDataSet
specified by the field dataSetId of theSoOrthoSlice
handled by this dragger.
-
volumeExtent
@Deprecated(since="101.1.0.0") public final SoSFBox3f volumeExtent
Deprecated.As of Open Inventor 101.1.0.0. This field is ignored. The extent is fetched automatically from the SoDataSet specified by the field dataSetId of the SoOrthoSlice handled by this dragger.Extent of the volume.Warning Deprecated since Open Inventor 101100. This field is ignored. The extent is fetched automatically from the
SoDataSet
specified by the field dataSetId of theSoOrthoSlice
handled by this dragger.
-
highlightColor
public final SoSFColor highlightColor
Specifies the highlight color. See alsoenableHighlight
. The default color is yellow (1,1,0).
-
enableHighlight
public final SoSFBool enableHighlight
Enables highlighting. If this field is true, during a mousemouve, a border is drawn and highlighted according to thehighlightColor
when the cursor moves over the slice. This border disappears once the cursor is no longer over the slice. Default is true.
-
-
Method Detail
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
-