public class SoTranslate2Dragger extends SoDragger
SoTranslate2Dragger
is a simple dragger that translates in two dimensions when dragged with the mouse. It moves within the x-y plane of its local space, determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.
Pressing the <Shift> key allows you to constrain motion to either the x axis or the y axis. The direction is determined by your initial mouse gesture after pressing the key. Releasing the key removes the constraint.
This node has a translation
field which always reflects its position in local space. If you set the field, the dragger will move accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.
This dragger contains six parts, translator , translatorActive , feedback , feedbackActive , xAxisFeedback , and yAxisFeedback . The last two parts are only displayed during motion, and only when their direction of motion is enabled. (Pressing the <Shift> key and then dragging disables one of the two directions.)
Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart()
.
You can make your program use different default resources for the parts by copying the file $OIVHOME/data/draggerDefaults/translate2Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
See SoDragger
for more information about using and customizing draggers, including code examples, using draggers in an immersive VR environment and using WYSIWYG draggers.
File format/default:
Translate2Dragger {
renderCaching | AUTO |
boundingBoxCaching | AUTO |
renderCulling | AUTO |
pickCulling | AUTO |
isActive | false |
translation | 0 0 0 |
callbackList | NULL |
translator | <translate2Translator resource> |
translatorActive | <translate2TranslatorActive resource> |
feedback | <translate2Feedback resource> |
feedbackActive | <translate2FeedbackActive resource> |
xAxisFeedback | <translate2XAxisFeedback resource> |
yAxisFeedback | <translate2YAxisFeedback resource> |
Resource: | translate2Translator |
Part: | translator |
Appearance: | pair of white crossing arrows |
Description: | picking this initiates translation |
Resource: | translate2TranslatorActive |
Part: | translatorActive |
Appearance: | pair of yellow crossing arrows |
Description: | displayed during translation instead of the translator |
Resource: | translate2Feedback |
Part: | feedback |
Appearance: | empty Separator by default |
Description: | feedback displayed when not moving |
Resource: | translate2FeedbackActive |
Part: | feedbackActive |
Appearance: | empty Separator by default |
Description: | feedback displayed when moving |
Resource: | translate2XAxisFeedback |
Part: | xAxisFeedback |
Appearance: | thin purple line |
Description: | Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the x direction. |
Resource: | translate2YAxisFeedback |
Part: | yAxisFeedback |
Appearance: | thin purple line |
Description: | Only shown if dragger is moving and the axis is a permissable direction of motion. When pressing <shift>, motion is constrained, and this is displayed only if the primary motion is in the y direction. |
All Parts
Part Name | Part Type | Default Type | NULL Default |
callbackList | NodeKitListPart | yes | |
translator | Separator | yes | |
translatorActive | Separator | yes | |
feedback | Separator | yes | |
feedbackActive | Separator | yes | |
xAxisFeedback | Separator | yes | |
yAxisFeedback | Separator | yes |
Extra Information for List Parts from Above Table
Part Name | Container Type | Possible Types |
callbackList | Separator | Callback, EventCallback |
See also:
SoInteractionKit
, SoDragger
, SoCenterballDragger
, SoDirectionalLightDragger
, SoDragPointDragger
, SoHandleBoxDragger
, SoJackDragger
, SoPointLightDragger
, SoRotateCylindricalDragger
, SoRotateDiscDragger
, SoRotateSphericalDragger
, SoScale1Dragger
, SoScale2Dragger
, SoScale2UniformDragger
, SoScaleUniformDragger
, SoSpotLightDragger
, SoTabBoxDragger
, SoTabPlaneDragger
, SoTrackballDragger
, SoTransformBoxDragger
, SoTransformerDragger
, SoTranslate1Dragger
SoDragger.TrackerDirectModes
SoInteractionKit.Cachings
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFVec3f |
translation
Position of the dragger.
|
DEFAULT, enableCallbacks, FREE, isActive, MOVE, NONE, ROTATE
AUTO, boundingBoxCaching, OFF, ON, pickCulling, renderCaching, renderCulling
boundingBoxIgnoring
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoTranslate2Dragger()
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 SoSFVec3f translation
public static SoNodekitCatalog getClassNodekitCatalog()
SoNodekitCatalog
for this class.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com