public class SoOrthoSliceDragger extends SoTranslate1Dragger
SoOrthoSlice
by dragging with the mouse.
SoOrthoSliceDragger
is derived from SoTranslate1Dragger
and has similar behavior, but is specifically designed to allow direct manipulation of an SoOrthoSlice
. The difference is that this class uses the actual geometry of the ortho slice to detect mouse clicks and automatically updates the slice's SoOrthoSlice.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 all three fields (orthoSlicePath
, volumeDimension
and volumeExtent
) have 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 the SoOrthoSlice
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.
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 ); dragger.volumeDimension.setValue( volData.data.getSize() ); dragger.volumeExtent.setValue( volData.extent.getValue() ); volSep.addChild(dragger);
File format/default:
OrthoSliceDragger {
orthoSlicePath | NULL |
volumeDimension | 0 0 0 |
volumeExtent | 0 0 0 |
See also:
SoDragger.TrackerDirectModes
SoInteractionKit.Cachings
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFPath |
orthoSlicePath
Path to the
SoOrthoSlice node to drag. |
SoSFVec3i32 |
volumeDimension
Dimension of the volume.
|
SoSFBox3f |
volumeExtent
Extent of the volume.
|
translation
DEFAULT, enableCallbacks, FREE, isActive, MOVE, NONE, ROTATE
AUTO, boundingBoxCaching, OFF, ON, pickCulling, renderCaching, renderCulling
boundingBoxIgnoring
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoOrthoSliceDragger()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static SoNodekitCatalog |
getClassNodekitCatalog()
Returns the
SoNodekitCatalog for this class. |
addFinishCallback, addMotionCallback, addStartCallback, addValueChangedCallback, enableValueChangedCallbacks, getInitialTrackerDirectMode, getMinGesture, getMinGestureFloat, getMinScale, getMotionMatrix, getTrackerDirectMode, removeFinishCallback, removeMotionCallback, removeStartCallback, removeValueChangedCallback, setInitialTrackerDirectMode, setInitialTrackerDirectMode, setMinGesture, setMinGesture, setMinScale, setMotionMatrix, setTrackerDirectMode, setTrackerDirectMode
setPartAsPath
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
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, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFPath orthoSlicePath
SoOrthoSlice
node to drag.
public final SoSFVec3i32 volumeDimension
public final SoSFBox3f volumeExtent
public static SoNodekitCatalog getClassNodekitCatalog()
SoNodekitCatalog
for this class.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com