SOTABPLANEDRAGGER(3iv)

๐Ÿซถ SoTabPlaneDragger(3IV) โ€” bestie, it's the plane dragger that translates/scales and serves ๐Ÿ’–

โœจ NAME โœจ

SoTabPlaneDragger โ€” object you can translate or scale within a plane by dragging with the mouse. It's giving interactive plane realness. ๐Ÿ’…

๐ŸŒธ INHERITS FROM ๐ŸŒธ

SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit > SoDragger > SoTabPlaneDragger

๐Ÿ’… SYNOPSIS ๐Ÿ’…

#include <Inventor/draggers/SoTabPlaneDragger.h>

Fields from class SoTabPlaneDragger:

  • 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 SoTabPlaneDragger:

  • SoTabPlaneDragger()
  • 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 SoTabPlaneDragger is literally a dragger which allows the user to interactively translate and scale in a plane. Visual vibe? A square white outline with smaller green squares (or tabs) set in the corners and along the center of each edge. Dragging a corner tab scales the dragger in 2D by scaling about the opposite corner. Dragging an edge tab performs 1D scaling about the opposite edge. The rest of the dragger is invisible but pickable; selecting it initiates translation within the plane. Iconic. โœจ

The dragger tries to keep the small tabs a constant size in screen space. Every time a drag begins or ends, the size is recalculated based on the viewing and modeling matrix. No cap. ๐Ÿ’…

When dragging the translator part, press the <Shift> key and you can constrain motion to either the local 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. So if you let go, the constraint dips. ๐Ÿซถ

When the translator part drags, the dragger updates its translation field. The various scaling parts cause changes to both the scaleFactor and translation field, since scaling about a point other than the center adds translation to the center of the dragger. 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. Main character energy fr. ๐Ÿ‘‘

You can not change the shape used to draw the tabs. This part is kept privately and may not be changed; the coordinates for the tabs are edited during adjustScaleTabSize(). Sorry bestie, that's locked. ๐Ÿ”’

The SoTabPlaneDragger class does contain three other parts you can change: tabPlaneTranslator, tabPlaneScaleTabMaterial and tabPlaneScaleTabHints. Slay. ๐Ÿ’–

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 /usr/share/data/draggerDefaults/tabPlaneDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory. Customization era. โœจ

๐Ÿ’œ FIELDS ๐Ÿ’œ

  • SoSFVec3f scaleFactor โ€” Scale factor affecting the dragger. It's the resize dial, bestie. ๐Ÿ’…
  • SoSFVec3f translation โ€” Position of the dragger. Where it's at. Periodt. ๐Ÿ“

๐Ÿฆ‹ METHODS ๐Ÿฆ‹

  • SoTabPlaneDragger() โ€” Constructor. New dragger, who dis? โœจ
  • void adjustScaleTabSize() โ€” Cause the scale tab sizes to be re-adjusted so that they remain a near constant screen space size. This happens automatically upon dragger finish. Call this to adjust the scale tab sizes at other times, for instance after the camera has changed in a viewer finish callback. So if the camera moves and the tabs look off, call this. ๐Ÿซถ
  • static const SoNodekitCatalog * getClassNodekitCatalog() const โ€” Returns an SoNodekitCatalog for this class. Catalog core. ๐Ÿ’–
  • static SoType getClassTypeId() โ€” Returns type identifier for this class. Type ID realness. ๐Ÿ‘‘

๐ŸŒˆ CATALOG PARTS ๐ŸŒˆ

All parts

  • callbackList โ€” Part Type: NodeKitListPart, Default Type: --, NULL by Default: yes
  • translator โ€” Part Type: Separator, Default Type: --, NULL by Default: yes
  • scaleTabMaterial โ€” Part Type: Material, Default Type: --, NULL by Default: yes
  • scaleTabHints โ€” Part Type: ShapeHints, 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: tabPlaneTranslator
    • Part: translator
    • Appearance: Outline of a Square. The region within it is pickable
    • Description: Begins translation within the plane
  • Resource: tabPlaneScaleTabMaterial
    • Part: scaleTabMaterial
    • Appearance: Green - half diffuse, half emissive.
    • Description: Used as material for scaling tabs.
  • Resource: tabPlaneScaleTabHints
    • Part: scaleTabHints
    • Appearance: shapeHints node:COUNTERCLOCKWISE/SOLID/CONVEX
    • Description: Property for the tab nodes.

โญ FILE FORMAT/DEFAULTS โญ

TabPlaneDragger {
   renderCaching       AUTO
   boundingBoxCaching  AUTO
   renderCulling       AUTO
   pickCulling         AUTO
   isActive            FALSE
   translation         0 0 0
   scaleFactor         1 1 1
   callbackList        NULL
   translator          <tabPlaneTranslator resource>
   scaleTabMaterial    <tabPlaneScaleTabMaterial resource>
   scaleTabHints       <tabPlaneScaleTabHints resource>
}

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

okay bestie, if you're obsessed with this one (and honestly? same ๐Ÿ’…) here's the whole girl squad of related pages you're gonna wanna stalk next:

  • SoInteractionKit ๐ŸŽ€ โ€” the whole toolkit family this one rolls with
  • SoDragger ๐Ÿฆ‹ โ€” the base-class mom of every dragger ever
  • SoCenterballDragger โญ
  • SoDirectionalLightDragger ๐Ÿ’ก
  • SoDragPointDragger ๐Ÿ“
  • SoHandleBoxDragger ๐ŸงŠ
  • SoJackDragger ๐Ÿ‘‘
  • SoPointLightDragger โœจ
  • SoRotateCylindricalDragger ๐ŸŒ€
  • SoRotateDiscDragger ๐Ÿ’ฟ
  • SoRotateSphericalDragger ๐Ÿ”ฎ
  • SoScale1Dragger ๐Ÿ“
  • SoScale2Dragger ๐Ÿ“
  • SoScale2UniformDragger โš–๏ธ
  • SoScaleUniformDragger ๐Ÿงš
  • SoSpotLightDragger ๐Ÿ”ฆ
  • SoTabBoxDragger ๐ŸŽ โ€” literally this dragger's sibling, the box version
  • SoTrackballDragger ๐Ÿ€
  • SoTransformBoxDragger ๐Ÿ–ผ๏ธ
  • SoTransformerDragger ๐Ÿค–
  • SoTranslate1Dragger โžก๏ธ
  • SoTranslate2Dragger โฌ†๏ธ

ngl, that's a lot of draggers. it's giving dragger multiverse. go read SoDragger first if you haven't, bc it's the blueprint every single one of these inherited from, and it's where all the base behavior lives. iykyk ๐Ÿซถ

and that's the whole page, bestie!! you made it to the end, I'm so proud ๐Ÿ˜ญ๐Ÿ’– this was SoTabPlaneDragger, page 3IV โ€” that's the section 3 of the IV manpage set (Inventor, if you didn't clock it ๐Ÿ‘€), and it's dated and versioned right there in the footer like every good little manpage. go forth and drag some tabs, you absolute icon ๐Ÿ‘‘โœจ periodt.