SOTRANSLATE1DRAGGER(3iv)
πΈ SoTranslate1Dragger β okay so hear me out
bestie we are reading a page straight outta the 3IV manual and it's literally about SoTranslate1Dragger, a little dragger object that slides along a line when you drag it with the mouse. it's giving "drag me, i dare you" energy. let's go π
β¨ NAME β¨
SoTranslate1Dragger β object you can translate along a line by dragging With the mouse π¦
(no that capital W in "With" is not a typo, that's just how the original is, and i refuse to gaslight the source material)
𧬠INHERITS FROM π§¬
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
SoDragger > SoTranslate1Dragger
look at that family tree. generational. the whole bloodline is iconic π
π SYNOPSIS π
first off, you gotta pull it in:
#include <Inventor/draggers/SoTranslate1Dragger.h>
then here's everything it picks up along the way:
Fields from class SoTranslate1Dragger:
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 SoTranslate1Dragger:
SoTranslate1Dragger()
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)
that's a LOT of inherited lore and honestly? every single one of them stays. periodt π
π«Ά DESCRIPTION π«Ά
so SoTranslate1Dragger is a simple dragger that translates in one dimension when you drag it with the mouse. it moves along the x axis of its local space, and that axis is determined by where it sits in the scene graph. heads up though β any transformation nodes placed before it will affect both the dragger and the direction of motion. so like, the vibes of its neighbors literally move it. no cap.
this node has a translation field that always reflects its position in local space. you set the field β the dragger moves accordingly. icon behavior, honestly. and you can also connect fields of other nodes or engines from this one to make them follow the dragger's motion. main character dragger, everyone else is just following it around π
this dragger contains four parts: translator, translatorActive, feedback, and feedbackActive.
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 swap the parts in any instance of this dragger using setPart().
want your program to use different default resources for the parts? okay so here's the move: copy the file
/usr/share/data/draggerDefaults/translate1Dragger.iv
into your own directory, edit the file, and then set the environment variable SO_DRAGGER_DIR to be a path to that directory. customize, slay, repeat β¨
π FIELDS π
SoSFVec3f translationβ Position of the dragger. that's it, that's the field, it holds the position π¦
π METHODS π
SoTranslate1Dragger()β Constructor. it makes one. iconic of it.static const SoNodekitCatalog * getClassNodekitCatalog() constβ Returns anSoNodekitCatalogfor this class.static SoType getClassTypeId()β Returns type identifier for this class.
π CATALOG PARTS π
All parts π
here's every part, its type, its default 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:yes
Extra information for list parts from above table πΈ
callbackListβ Container Type:Separatorβ Permissible Types:Callback,EventCallback
π DRAGGER RESOURCES π
Resource: translate1Translator
- Part:
translator - Appearance: white arrow
- Description: picking this initiates translation
Resource: translate1TranslatorActive
- Part:
translatorActive - Appearance: yellow arrow
- Description: displayed during translation instead of the translator
Resource: translate1Feedback
- Part:
feedback - Appearance: empty
Separatorby default - Description: feedback displayed when not in motion
Resource: translate1FeedbackActive
- Part:
feedbackActive - Appearance: empty
Separatorby default - Description: feedback displayed while moving
white arrow when it's chill, yellow arrow when it's doing something β the color change is the whole personality, we love a glow-up πβ¨
π FILE FORMAT/DEFAULTS π
Translate1Dragger {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
isActive FALSE
translation 0 0 0
callbackList NULL
translator <translate1Translator resource>
translatorActive <translate1TranslatorActive resource>
feedback <translate1Feedback resource>
feedbackActive <translate1FeedbackActive resource>
}
copy that exactly bestie, do not freestyle the defaults π
π₯ SEE ALSO π₯
SoInteractionKit, SoDragger, SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate2Dragger
the whole dragger friend group is here and they're all invited to the party π«Ά
aaaand that's the page!! it lives in the 3IV manual, and the footer slot is literally just SoTranslate1Dragger(3IV)() β the date spot is empty, which is honestly so real of it, no deadlines, no timestamps, just vibes. bye bestie, go drag something along a line ππ¦β¨
π¦ 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