SOTABBOXDRAGGER(3iv)
π SoTabBoxDragger(3IV) π
okay bestie, pull up a chair because today we're talking about SoTabBoxDragger(3IV) β the dragger that's shaped like a little cube and lets you translate AND scale stuff by grabbing it with your mouse. it's giving β¨ hands-on β¨ and honestly? obsessed. let's get into it. π
πΈ NAME πΈ
SoTabBoxDragger β a cubic object you can translate and scale by dragging with the mouse. yes, literally a box you can grab. slay. π
π¦ INHERITS FROM π¦
this thing is deep in the family tree, no cap:
SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTabBoxDragger
β¨ SYNOPSIS β¨
first things first, you gotta include the header:
#include <Inventor/draggers/SoTabBoxDragger.h>
π Fields from class SoTabBoxDragger π
SoSFVec3f scaleFactor
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 SoTabBoxDragger π
SoTabBoxDragger()
void adjustScaleTabSize()
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 SoTabBoxDragger is a composite dragger shaped like a box. inside it? there are six SoTabPlaneDraggers that the dragger positions and orients so they form a cube. π§ each face of that cube gets everything an SoTabPlaneDragger can do: translation, 1D scaling, and 2D scaling. and because each one moves in its own local space, you can easily translate or scale the whole dragger in any direction. periodt.
as a composite dragger, this class makes sure that when one plane gets dragged, the ENTIRE box moves together. no rogue faces, bestie. π«Ά
as each sub-dragger moves, the SoTabBoxDragger updates its scaleFactor and translation fields. and like all draggers β if you change a field, the dragger moves to match the new settings. it's reactive. it's main character energy. β¨
remember: this is not an SoTransform! do not come for it. if you want to move other objects with this dragger, you've got two options, pick your fighter:
- [a] use an
SoTabBoxManip, which is subclassed fromSoTransform. it creates one of these draggers and uses it as the interface to change its fields. (see theSoTabBoxManipman page π) - [b] use field-to-field connections to connect the fields of this dragger to those of any
SoTransformationnode.
you can change the parts in any instance of this dragger using setPart(). π
the default part geometries are defined as resources for this SoTabBoxDragger class, and they're detailed below in the Dragger Resources section of the online reference page for this class. you can make your program use different default resources for the parts by copying the file /usr/share/data/draggerDefaults/tabBoxDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory. yes, really β go off. πβ¨
π FIELDS π
SoSFVec3f scaleFactorβ scale of the dragger. how big it is, basically. the whole vibe check of its size. πSoSFVec3f translationβ position of the dragger. where it's at. literally. π
π METHODS π
SoTabBoxDragger()β the constructor. baby's first dragger. πΌvoid adjustScaleTabSize()β makes the scale tab sizes get re-adjusted on all 6SoTabPlaneDraggersso they stay at a near-constant screen-space size. this happens automatically when the dragger finishes, but you can call it yourself to adjust the scale tab sizes at other times β for instance, after the camera has changed in a viewer finish callback. π so thoughtful of it.static const SoNodekitCatalog * getClassNodekitCatalog() constβ returns anSoNodekitCatalogfor this class. the full tea on the class structure. π«static SoType getClassTypeId()β returns the type identifier for this class. its little name tag. π·οΈ
π CATALOG PARTS π
here's the whole parts list, no gatekeeping, every single one:
All parts:
callbackListβ Part Type:NodeKitListPartβ Default Type:--β NULL by Default: yessurroundScaleβ Part Type:SurroundScaleβ Default Type:--β NULL by Default: yestabPlane1β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yestabPlane2β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yestabPlane3β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yestabPlane4β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yestabPlane5β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yestabPlane6β Part Type:TabPlaneDraggerβ Default Type:--β NULL by Default: yesboxGeomβ 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 β¨
okay bestie, this is the part where we meet the lil resource glow-ups that live inside the dragger π every one of them gets its own parts, its own look, and its own whole personality:
- Resource:
tabBoxTranslator- Parts:
tabPlane1.translator,tabPlane2.translator,tabPlane3.translator,tabPlane4.translator,tabPlane5.translator,tabPlane6.translator - Appearance: Outline of a Square. The region within is pickable π
- Description: Begins translation within the plane. The tabBox places and orients each tabPlane so that these squares form a box. no cap, the six squares literally assemble themselves into the box vibe β¨
- Parts:
- Resource:
tabBoxScaleTabMaterial- Parts:
tabPlane1.scaleTabMaterial,tabPlane2.scaleTabMaterial,tabPlane3.scaleTabMaterial,tabPlane4.scaleTabMaterial,tabPlane5.scaleTabMaterial,tabPlane6.scaleTabMaterial - Appearance: Green - half diffuse, half emissive. π
- Description: Used as material for scaling tabs. it's giving green, it's giving glow, it's giving scale me π«Ά
- Parts:
- Resource:
tabBoxScaleTabHints- Parts:
tabPlane1.scaleTabHints,tabPlane2.scaleTabHints,tabPlane3.scaleTabHints,tabPlane4.scaleTabHints,tabPlane5.scaleTabHints,tabPlane6.scaleTabHints - Appearance:
shapeHints node:COUNTERCLOCKWISE/SOLID/CONVEX - Description: Property for the tab nodes. lowkey just the little settings gremlin for the tabs π§
- Parts:
- Resource:
tabBoxBoxGeom- Part:
boxGeom - Appearance: Unpickable grey outline of a box. π©Ά
- Description: Just feedback.. (yes, that's the whole job. iconic. it's not pickable, it's not doing the work, it's just there to show you the box π )
- Part:
π FILE FORMAT/DEFAULTS π
here's the whole default blueprint, bestie, exactly as it ships β do not touch, do not improvise, just vibe π¦
TabBoxDragger {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
isActive FALSE
translation 0 0 0
scaleFactor 1 1 1
callbackList NULL
surroundScale NULL
tabPlane1 TabPlaneDragger {
}
tabPlane2 TabPlaneDragger {
}
tabPlane3 TabPlaneDragger {
}
tabPlane4 TabPlaneDragger {
}
tabPlane5 TabPlaneDragger {
}
tabPlane6 TabPlaneDragger {
}
boxGeom <tabBoxBoxGeom resource>
tabPlane1.translator <tabBoxTranslator resource>
tabPlane2.translator <tabBoxTranslator resource>
tabPlane3.translator <tabBoxTranslator resource>
tabPlane4.translator <tabBoxTranslator resource>
tabPlane5.translator <tabBoxTranslator resource>
tabPlane6.translator <tabBoxTranslator resource>
tabPlane1.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane2.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane3.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane4.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane5.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane6.scaleTabMaterial <tabBoxScaleTabMaterial resource>
tabPlane1.scaleTabHints <tabBoxScaleTabHints resource>
tabPlane2.scaleTabHints <tabBoxScaleTabHints resource>
tabPlane3.scaleTabHints <tabBoxScaleTabHints resource>
tabPlane4.scaleTabHints <tabBoxScaleTabHints resource>
tabPlane5.scaleTabHints <tabBoxScaleTabHints resource>
tabPlane6.scaleTabHints <tabBoxScaleTabHints resource>
}
note how every single tabPlane gets its own translator, its own scaleTabMaterial, and its own scaleTabHints β six of each, no skips, no shortcuts. the box is symmetrical and so is the config β¨
π SEE ALSO π
the whole dragger friend group, fr fr β go say hi, they all ate:
SoInteractionKitSoDraggerSoCenterballDraggerSoDirectionalLightDraggerSoDragPointDraggerSoHandleBoxDraggerSoJackDraggerSoPointLightDraggerSoRotateCylindricalDraggerSoRotateDiscDraggerSoRotateSphericalDraggerSoScale1DraggerSoScale2DraggerSoScale2UniformDraggerSoScaleUniformDraggerSoSpotLightDraggerSoTabPlaneDraggerSoTrackballDraggerSoTransformBoxDraggerSoTransformerDraggerSoTranslate1DraggerSoTranslate2Dragger
and that's a wrap on the whole page, bestie π this one is filed under SoTabBoxDragger(3IV)() β that's the source-and-version tag right there at the bottom, the lil signature of the page. no extra date, just the name and the section marker, and honestly? it's giving minimalist queen π you're welcome, now go drag some boxes πβ¨
π¦ 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