SoTrackballManip(3)
π« SoTrackballManip π«
okay bestie, welcome to the manual page for SoTrackballManip β it lives in section 3 of the library functions manuals, iykyk π
β¨ NAME β¨
SoTrackballManip β the way this one wraps an SoTrackballDragger purely for convenience, no cap π
like, that's the whole vibe. it's a glow-up wrapper so you don't have to build the dragger situation yourself π¦
more parts of this page are coming, bestie β don't go anywhere πΈ
β¨ SYNOPSIS β¨
okay bestie, if you wanna use this iconic manip, you gotta pull in the header first:
#include <Inventor/manips/SoTrackballManip.h>
and lowkey important: it inherits from SoTransformManip. no cap. π
π Public Member Functions π
These are the main character functions that belong to SoTrackballManip itself:
virtual SoType getTypeId (void) constβ returns theSoType, type ID check. β¨SoTrackballManip (void)β the constructor, slay. π
π¦ Public Member Functions inherited from SoTransformManip π¦
These are the ones you get from the parent, but they still work for you:
SoTransformManip (void)β constructor fromSoTransformManip.SoDragger * getDragger (void)β gets the dragger.SbBool replaceNode (SoPath *p)β replaces a node.SbBool replaceManip (SoPath *p, SoTransform *newone) constβ replaces the manip.virtual void doAction (SoAction *action)β does an action.virtual void callback (SoCallbackAction *action)β callback action.virtual void GLRender (SoGLRenderAction *action)β GL render action.virtual void getBoundingBox (SoGetBoundingBoxAction *action)β gets bounding box.virtual void getMatrix (SoGetMatrixAction *action)β gets matrix.virtual void handleEvent (SoHandleEventAction *action)β handles event.virtual void pick (SoPickAction *action)β picks.virtual void search (SoSearchAction *action)β searches.virtual SoChildList * getChildren (void) constβ gets children.
π Public Member Functions inherited from SoTransform π
SoTransform (void)β constructor.void pointAt (const SbVec3f &frompoint, const SbVec3f &topoint)β points at.void getScaleSpaceMatrix (SbMatrix &mat, SbMatrix &inv) constβ gets scale space matrix.void getRotationSpaceMatrix (SbMatrix &mat, SbMatrix &inv) constβ gets rotation space matrix.void getTranslationSpaceMatrix (SbMatrix &mat, SbMatrix &inv) constβ gets translation space matrix.void multLeft (const SbMatrix &mat)β multiplies left.void multRight (const SbMatrix &mat)β multiplies right.void combineLeft (SoTransformation *nodeonright)β combines left.void combineRight (SoTransformation *nodeonleft)β combines right.void setMatrix (const SbMatrix &mat)β sets matrix.void recenter (const SbVec3f &newcenter)β recenters.virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β gets primitive count.
π Public Member Functions inherited from SoNode π
void setOverride (const SbBool state)β sets override.SbBool isOverride (void) constβ is override?void setNodeType (const NodeType type)β sets node type.NodeType getNodeType (void) constβ gets node type.virtual SoNode * copy (SbBool copyconnections=0) constβ copies.virtual SbBool affectsState (void) constβ affects state?virtual void GLRenderBelowPath (SoGLRenderAction *action)β GL render below path.virtual void GLRenderInPath (SoGLRenderAction *action)β GL render in path.virtual void GLRenderOffPath (SoGLRenderAction *action)β GL render off path.virtual void rayPick (SoRayPickAction *action)β ray pick.virtual void write (SoWriteAction *action)β write.virtual void audioRender (SoAudioRenderAction *action)β audio render.virtual void grabEventsSetup (void)β grab events setup.virtual void grabEventsCleanup (void)β grab events cleanup.virtual void startNotify (void)β start notify.virtual void notify (SoNotList *l)β notify.uint32_t getNodeId (void) constβ gets node ID.virtual void writeInstance (SoOutput *out)β write instance.virtual SoNode * addToCopyDict (void) constβ adds to copy dict.virtual SoFieldContainer * copyThroughConnection (void) constβ copies through connection.
π«Ά Public Member Functions inherited from SoFieldContainer π«Ά
void setToDefaults (void)β sets to defaults.SbBool hasDefaultValues (void) constβ has default values?SbBool fieldsAreEqual (const SoFieldContainer *container) constβ fields are equal?void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)β copies field values.SbBool set (const char *const fielddata)β sets.void get (SbString &fielddata)β gets.virtual int getFields (SoFieldList &l) constβ gets fields.virtual int getAllFields (SoFieldList &l) constβ gets all fields.virtual SoField * getField (const SbName &name) constβ gets field.virtual SoField * getEventIn (const SbName &name) constβ gets event in.virtual SoField * getEventOut (const SbName &name) constβ gets event out.SbBool getFieldName (const SoField *const field, SbName &name) constβ gets field name.SbBool enableNotify (const SbBool flag)β enables notify.SbBool isNotifyEnabled (void) constβ is notify enabled?SbBool set (const char *fielddata, SoInput *in)β sets with input.void get (SbString &fielddata, SoOutput *out)β gets with output.virtual SbBool validateNewFieldValue (SoField *field, void *newval)β validates new field value.virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)β adds write reference.SbBool getIsBuiltIn (void) constβ gets is built in.void setUserData (void *userdata) constβ sets user data.void * getUserData (void) constβ gets user data.
π Public Member Functions inherited from SoBase π
void ref (void) constβ ref.void unref (void) constβ unref.void unrefNoDelete (void) constβ unref no delete.int32_t getRefCount (void) constβ gets ref count.void touch (void)β touch.SbBool isOfType (SoType type) constβ is of type?virtual SbName getName (void) constβ gets name.virtual void setName (const SbName &newname)β sets name.void addAuditor (void *const auditor, const SoNotRec::Type type)β adds auditor.void removeAuditor (void *const auditor, const SoNotRec::Type type)β removes auditor.const SoAuditorList & getAuditors (void) constβ gets auditors.SbBool shouldWrite (void)β should write?void assertAlive (void) constβ assert alive.
β¨ Static Public Member Functions β¨
static SoType getClassTypeId (void)β gets class type ID.static void initClass (void)β inits class.
π Static Public Member Functions inherited from SoTransformManip π
static SoType getClassTypeId (void)β gets class type ID.static void initClass (void)β inits class.
π Static Public Member Functions inherited from SoTransform π
static SoType getClassTypeId (void)β gets class type ID.static void initClass (void)β inits class.
π Static Public Member Functions inherited from SoTransformation π
static SoType getClassTypeId (void)β gets class type ID.static void initClass (void)β inits class.
π§ Static Public Member Functions inherited from SoNode π§
static uint32_t getCompatibilityTypes (const SoType &nodetype)β gets compatibility types.static SoType getClassTypeId (void)β gets class type ID.static SoNode * getByName (const SbName &name)β gets by name.static int getByName (const SbName &name, SoNodeList &l)β gets by name with list.static void initClass (void)β inits class.static void initClasses (void)β inits classes.static uint32_t getNextNodeId (void)β gets next node ID.static int getActionMethodIndex (const SoType type)β gets action method index.static void getBoundingBoxS (SoAction *action, SoNode *node)β getBoundingBoxS.static void GLRenderS (SoAction *action, SoNode *node)β GLRenderS.static void callbackS (SoAction *action, SoNode *node)β callbackS.static void getMatrixS (SoAction *action, SoNode *node)β getMatrixS.static void handleEventS (SoAction *action, SoNode *node)β handleEventS.static void pickS (SoAction *action, SoNode *node)β pickS.static void rayPickS (SoAction *action, SoNode *node)β rayPickS.static void searchS (SoAction *action, SoNode *node)β searchS.static void writeS (SoAction *action, SoNode *node)β writeS.static void audioRenderS (SoAction *action, SoNode *node)β audioRenderS.static void getPrimitiveCountS (SoAction *action, SoNode *node)β getPrimitiveCountS.
π Static Public Member Functions inherited from SoFieldContainer π
static void initClass (void)β inits class.static SoType getClassTypeId (void)β gets class type ID.static void initCopyDict (void)β inits copy dict.static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β adds copy.static SoFieldContainer * checkCopy (const SoFieldContainer *orig)β checks copy.static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β finds copy.static void copyDone (void)β copy done.
πΈ Static Public Member Functions inherited from SoBase πΈ
static void initClass (void)β inits class.static SoType getClassTypeId (void)β gets class type ID.static void addName (SoBase *const base, const char *const name)β adds name.static void removeName (SoBase *const base, const char *const name)β removes name.static void incrementCurrentWriteCounter (void)β increments current write counter.static void decrementCurrentWriteCounter (void)β decrements current write counter.static SoBase * getNamedBase (const SbName &name, SoType type)β gets named base.static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β gets named bases.static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)β reads.static void setInstancePrefix (const SbString &c)β sets instance prefix.static void setTraceRefs (SbBool trace)β sets trace refs.static SbBool getTraceRefs (void)β gets trace refs.static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)β connects route.static SbBool readRoute (SoInput *in)β reads route.
π Protected Member Functions π
virtual const SoFieldData * getFieldData (void) constβ gets field data.~SoTrackballManip ()β destructor, rip. π
π‘οΈ Protected Member Functions inherited from SoTransformManip π‘οΈ
~SoTransformManip ()β destructor.void setDragger (SoDragger *newdragger)β sets dragger.virtual void copyContents (const SoFieldContainer *fromfc, SbBool copyconnections)β copies contents.void attachSensors (const SbBool onoff)β attaches sensors.
π‘οΈ Protected Member Functions inherited from SoTransform π‘οΈ
virtual ~SoTransform ()β destructor.
π‘οΈ Protected Member Functions inherited from SoTransformation π‘οΈ
SoTransformation (void)β constructor.virtual ~SoTransformation ()β destructor.
π‘οΈ Protected Member Functions inherited from SoNode π‘οΈ
SoNode (void)β constructor.virtual ~SoNode ()β destructor.virtual SbBool readInstance (SoInput *in, unsigned short flags)β reads instance.
π‘οΈ Protected Member Functions inherited from SoFieldContainer π‘οΈ
SoFieldContainer (void)β constructor.~SoFieldContainer ()β destructor.
π‘οΈ Protected Member Functions inherited from SoBase π‘οΈ
SoBase (void)β constructor.virtual ~SoBase ()β destructor.virtual void destroy (void)β destroys.SbBool hasMultipleWriteRefs (void) constβ has multiple write refs?SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ writes header.void writeFooter (SoOutput *out) constβ writes footer.virtual const char * getFileFormatName (void) constβ gets file format name.
π§ Static Protected Member Functions π§
static const SoFieldData ** getFieldDataPtr (void)β gets field data pointer.
π Static Protected Member Functions inherited from SoTransformManip π
static const SoFieldData ** getFieldDataPtr (void)β gets field data pointer.static void transferFieldValues (const SoTransform *from, SoTransform *to)β transfers field values.static void valueChangedCB (void *f, SoDragger *d)β value changed callback.static void fieldSensorCB (void *f, SoSensor *d)β field sensor callback.
π Static Protected Member Functions inherited from SoTransform π
static const SoFieldData ** getFieldDataPtr (void)β gets field data pointer.
π Static Protected Member Functions inherited from SoTransformation π
static const SoFieldData ** getFieldDataPtr (void)β gets field data pointer.
π Static Protected Member Functions inherited from SoNode π
static const SoFieldData ** getFieldDataPtr (void)β gets field data pointer.static void setNextActionMethodIndex (int index)β sets next action method index.static int getNextActionMethodIndex (void)β gets next action method index.static void incNextActionMethodIndex (void)β increments next action method index.static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β sets compatibility types.
π Static Protected Member Functions inherited from SoBase π
static uint32_t getCurrentWriteCounter (void)β gets current write counter.static void staticDataLock (void)β locks static data.static void staticDataUnlock (void)β unlocks static data.
π Additional Inherited Members π
π
Public Types inherited from SoNode π
Here's the iconic enum:
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002, INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010, INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080, COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 = 0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000 }
π Public Attributes inherited from SoTransform π
SoSFVec3f translationSoSFRotation rotationSoSFVec3f scaleFactorSoSFRotation scaleOrientationSoSFVec3f center
π‘οΈ Protected Types inherited from SoBase π‘οΈ
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
π‘οΈ Protected Attributes inherited from SoTransformManip π‘οΈ
SoFieldSensor * rotateFieldSensorSoFieldSensor * translFieldSensorSoFieldSensor * scaleFieldSensorSoFieldSensor * centerFieldSensorSoFieldSensor * scaleOrientFieldSensorSoChildList * children
π‘οΈ Protected Attributes inherited from SoNode π‘οΈ
uint32_t uniqueId
π‘οΈ Protected Attributes inherited from SoFieldContainer π‘οΈ
SbBool isBuiltIn
π Static Protected Attributes inherited from SoNode π
static uint32_t nextUniqueId = 0static int nextActionMethodIndex = 0
β¨ Detailed Description β¨
okay so SoTrackballManip is literally the bestie wrapper for SoTrackballDragger β convenience core, no cap. The manipulator class takes care of wrapping up the SoTrackballDragger in a simple and convenient API for the application programmer, making it automatically surround the geometry it influences and taking care of the book-keeping routines for its interaction with the relevant fields of an SoTransformation node. It's giving "I got you, babe" energy. π
Here's a dead simple, stand-alone example on how to set up an SoTrackballManip in a scenegraph:
#include <Inventor/Qt/SoQt.h>
#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
#include <Inventor/nodes/SoCone.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/manips/SoTrackballManip.h>
int
main(int argc, char* argv[])
{
QWidget * mainwin = SoQt::init(argv[0]);
SoSeparator * root = new SoSeparator;
root->ref();
SoTrackballManip * manip = new SoTrackballManip;
root->addChild(manip);
root->addChild(new SoCone);
SoQtExaminerViewer * viewer = new SoQtExaminerViewer(mainwin);
viewer->setSceneGraph(root);
SoQt::show(mainwin);
SoQt::mainLoop();
root->unref();
return 0;
}
Compile and hit 'ESC' to go into scenegraph interaction mode in the examinerviewer, then change the rotation of the cone by interacting with the dragger bands. Obsessed. π
π οΈ Constructor & Destructor Documentation π οΈ
SoTrackballManip::SoTrackballManip (void )
Default constructor. Allocates an SoTrackballDragger and an SoSurroundScale node to surround the geometry within our part of the scenegraph.
- References
SoBaseKit::getPart(),SoSurroundScale::numNodesUpToContainer,SoSurroundScale::numNodesUpToReset,SoTransformManip::setDragger(), andSoTrackballManip(). - Referenced by
getFieldData(), andSoTrackballManip().
SoTrackballManip::~SoTrackballManip () [protected]
Destructor. That's it, she's done. π
π§ Member Function Documentation π§
SoType SoTrackballManip::getTypeId (void ) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting. iykyk.
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type
}
}
For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. Periodt.
For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. Slay.
- Reimplemented from
SoTransformManip.
const SoFieldData * SoTrackballManip::getFieldData (void ) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. No fields? No problem. π
- Reimplemented from
SoTransformManip. - References
SoTrackballManip().
π Author π
Generated automatically by Doxygen for Coin from the source code. Not me reading the source code like a romance novel. π
π okay bestie, that's the whole page β this is the SoTrackballManip(3) page from Coin Version 2.5.0, and the date? Not on this one, but the vibe is eternal. stay slay, keep casting downward safely, mwah π
β¨
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms