SOTRANSLATE2DRAGGER(3iv)
π
SOTRANSLATE2DRAGGER β the 3IV manual page, part 1 of 2 π¦
okay bestie, buckle up, because this is the dragger that lets you yeet stuff around a plane with your mouse and honestly? it's giving main character energy β¨
πΈ NAME πΈ
SoTranslate2Dragger β it's an object you can translate within a plane by dragging with the mouse. that's it. that's the whole job. and it does it beautifully. π
𧬠INHERITS FROM π§¬
the whole family tree, no cap:
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTranslate2Dragger
β¨ SYNOPSIS β¨
first things first, you gotta include the header, obviously:
#include <Inventor/draggers/SoTranslate2Dragger.h>
π Fields from class SoTranslate2Dragger
SoSFVec3f translation
π Fields from class SoDragger
SoSFBool isActive
π Fields from class SoInteractionKit
SoSFEnum renderCaching
SoSFEnum boundingBoxCaching
SoSFEnum renderCulling
SoSFEnum pickCulling
π Parts from class SoBaseKit
(SoNodeKitListPart) callbackList
π Methods from class SoTranslate2Dragger
SoTranslate2Dragger()
static const SoNodekitCatalog *
getClassNodekitCatalog() const
static SoType getClassTypeId()
π Methods from class SoDragger
void addStartCallback(SoDraggerCB *f, void *userData =
NULL)
void removeStartCallback(SoDraggerCB *f, void *userData =
NULL)
void addMotionCallback(SoDraggerCB *f, void *userData =
NULL)
void removeMotionCallback(SoDraggerCB *f, void *userData =
NULL)
void addFinishCallback(SoDraggerCB *f, void *userData =
NULL)
void removeFinishCallback(SoDraggerCB *f, void *userData =
NULL)
void addValueChangedCallback(SoDraggerCB *f, void *userData
= NULL)
void removeValueChangedCallback(SoDraggerCB *f, void
*userData = NULL)
SbBool enableValueChangedCallbacks()
void setMinGesture(int pixels)
int getMinGesture() const
static void setMinScale(float newMinScale)
static float getMinScale()
π Methods from class SoInteractionKit
virtual SbBool setPartAsPath(const SbName &partName, SoPath
*surrogatePath )
π Methods from class SoBaseKit
virtual const SoNodekitCatalog *
getNodekitCatalog() const
virtual SoNode * getPart(const SbName &partName, SbBool
makeIfNeeded)
SbString getPartString(const SoBase *part)
virtual SoNodeKitPath * createPathToPart(const SbName &partName, SbBool
makeIfNeeded, const SoPath *pathToExtend =
NULL)
virtual SbBool setPart(const SbName &partName, SoNode *newPart)
SbBool set(char *partName, char *parameters)
SbBool set(char *nameValuePairs)
static SbBool isSearchingChildren()
static void setSearchingChildren(SbBool newVal)
π Methods from class SoNode
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
π Methods from class SoFieldContainer
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
π Methods from class SoBase
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π Macros from class SoBaseKit
SO_GET_PART(kit, partName, partClass)
SO_CHECK_PART(kit, partName, partClass)
π DESCRIPTION π
okay so SoTranslate2Dragger is a simple dragger β and when I say simple I mean it's not doing too much, it's just slaying β that translates in two dimensions when you drag it with the mouse. π±οΈβ¨ It moves within the x-y plane of its local space, and that local space is determined by its location in the scene graph. so if you put transformation nodes before it in the graph, those transformations will affect both the dragger itself and the direction it moves. fr fr, no cap. π₯
now here's the cute part: press the <Shift> key and you can constrain motion to either the x axis or the y axis. π which one? that's determined by your initial mouse gesture after you press the key. let go of the key and boom, constraint removed. it's giving precision. it's giving control. π
this node has a translation field which always reflects its position in local space. set the field, and the dragger will move accordingly β like, it just listens. you can also connect fields of other nodes or engines from this one to make them follow the dragger's motion. obsessed. π«Ά
this dragger contains six parts:
translatortranslatorActivefeedbackfeedbackActivexAxisFeedbackyAxisFeedback
the last two parts are only displayed during motion, and only when their direction of motion is enabled. (and yes β pressing the <Shift> key and then dragging disables one of the two directions. that's the whole point, bestie. π)
each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. and you can change the parts in any instance of this dragger using setPart(). π οΈ
you can also make your program use different default resources for the parts by copying this file:
/usr/share/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. β¨ (iykyk)
π₯ FIELDS π₯
SoSFVec3ftranslationβ Position of the dragger. literally its whole location vibe check. π
β METHODS β
SoTranslate2Dragger()β Constructor. it makes one. iconic behavior. πstatic const SoNodekitCatalog * getClassNodekitCatalog() constβ Returns anSoNodekitCatalogfor this class. πstatic SoType getClassTypeId()β Returns type identifier for this class. your little ID card. πͺͺ
π CATALOG PARTS π
π All parts
every single part, its type, and whether it's NULL by default:
callbackListβ Part Type:NodeKitListPartβ Default Type:--β NULL by Default: yestranslatorβ Part Type:Separatorβ Default Type:--β NULL by Default: yestranslatorActiveβ Part Type:Separatorβ Default Type:--β NULL by Default: yesfeedbackβ Part Type:Separatorβ Default Type:--β NULL by Default: yesfeedbackActiveβ Part Type:Separatorβ Default Type:--β NULL by Default: yesxAxisFeedbackβ Part Type:Separatorβ Default Type:--β NULL by Default: yesyAxisFeedbackβ Part Type:Separatorβ Default Type:--β NULL by Default: yes
π Extra information for list parts from above table
callbackListβ Container Type:Separatorβ Permissible Types:Callback,EventCallback
π DRAGGER RESOURCES π
π¦ 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
Separatorby default - Description: feedback displayed when not moving
π¦ Resource: translate2FeedbackActive
- Part:
feedbackActive - Appearance: empty
Separatorby 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.
πΈ FILE FORMAT/DEFAULTS πΈ
here's the whole default situation, verbatim, don't touch anything:
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>
}
bestie this is only part 1 π«Ά there's more coming, so don't go anywhere β we're not even done yet πβ¨
π― SEE ALSO
ok bestie you made it to the end, and now it's time for the friend group. SoTranslate2Dragger doesn't run solo β it rolls deep with the whole dragger clique. Go read these when you want more of the same energy π
SoInteractionKitSoDraggerSoCenterballDraggerSoDirectionalLightDraggerSoDragPointDraggerSoHandleBoxDraggerSoJackDraggerSoPointLightDraggerSoRotateCylindricalDraggerSoRotateDiscDraggerSoRotateSphericalDraggerSoScale1DraggerSoScale2DraggerSoScale2UniformDraggerSoScaleUniformDraggerSoSpotLightDraggerSoTabBoxDraggerSoTabPlaneDraggerSoTrackballDraggerSoTransformBoxDraggerSoTransformerDraggerSoTranslate1Dragger
and that's the whole page, bestie π you literally just read the entire SoTranslate2Dragger(3IV) manual, cover to cover, no skimming (i would know π). the little footer at the bottom is where the source, version and date live β it's stamped with the page name and section SoTranslate2Dragger(3IV), and the version-and-date slots there are just sitting empty like an unread notification π. go forth and drag those translations, you absolute icon πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms