SoTransformerManip(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’… SoTransformerManip πŸ’…

Library Functions Manual · the SoTransformerManip(3) page, bestie ✨


πŸŽ€ NAME πŸŽ€

SoTransformerManip β€” the little class that wraps an SoTransformerDragger for convenience 🫢


okay so real talk, that's the whole NAME section and it's literally doing the most with the least πŸ’€

SoTransformerManip</purl> is a wrapper. It wraps an SoTransformerDragger. That's it, that's the whole job β€” it exists so you get all that dragger goodness conveniently, no cap. πŸ‘‘

bestie this is part 1 of the page and more is coming, so don't go anywhere πŸ’–

wrap it up, literally ✨

✨ SYNOPSIS ✨

okay bestie, deep breath, because this one is a menu. πŸ’…

#include <Inventor/manips/SoTransformerManip.h>

Inherits SoTransformManip.

Basically it's a manipulator that carries its whole entire family tree around with it, and every single one of those inherited members is listed below because Coin3D does not gatekeep. Not one flag skipped, fr fr. 🫢


πŸ’– Public Member Functions πŸ’–

  • virtual SoType getTypeId (void) const β€” hands you back the exact type id of this thing, so you can check who it really is.
  • SoTransformerManip (void) β€” the constructor, the birth of the icon.
  • SbBool isLocateHighlighting (void) β€” tells you whether locate highlighting is currently on or off.
  • void setLocateHighlighting (SbBool onoff) β€” flips locate highlighting to whatever you pass in.
  • void unsquishKnobs (void) β€” un-squishes the knobs. yes really. iconic behaviour. ✨

🌸 Public Member Functions inherited from SoTransformManip 🌸

  • SoTransformManip (void) β€” its constructor.
  • SoDragger * getDragger (void) β€” gives you the dragger it's using.
  • SbBool replaceNode (SoPath *p) β€” swaps the node at the end of p for this manip.
  • SbBool replaceManip (SoPath *p, SoTransform *newone) const β€” swaps this manip out for newone along the path p.
  • virtual void doAction (SoAction *action) β€” runs the given action.
  • virtual void callback (SoCallbackAction *action) β€” the callback-action handler.
  • virtual void GLRender (SoGLRenderAction *action) β€” the render-action handler.
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” the bounding-box-action handler.
  • virtual void getMatrix (SoGetMatrixAction *action) β€” the get-matrix-action handler.
  • virtual void handleEvent (SoHandleEventAction *action) β€” the handle-event-action handler.
  • virtual void pick (SoPickAction *action) β€” the pick-action handler.
  • virtual void search (SoSearchAction *action) β€” the search-action handler.
  • virtual SoChildList * getChildren (void) const β€” the child list, exposed.

πŸ¦‹ Public Member Functions inherited from SoTransform πŸ¦‹

  • SoTransform (void) β€” constructor.
  • void pointAt (const SbVec3f &frompoint, const SbVec3f &topoint) β€” aims this transform from one point at another.
  • void getScaleSpaceMatrix (SbMatrix &mat, SbMatrix &inv) const β€” gives you the scale-space matrix and its inverse.
  • void getRotationSpaceMatrix (SbMatrix &mat, SbMatrix &inv) const β€” same deal but for rotation space.
  • void getTranslationSpaceMatrix (SbMatrix &mat, SbMatrix &inv) const β€” and again for translation space.
  • void multLeft (const SbMatrix &mat) β€” multiplies mat in on the left.
  • void multRight (const SbMatrix &mat) β€” multiplies mat in on the right.
  • void combineLeft (SoTransformation *nodeonright) β€” combines, with the other node on the right.
  • void combineRight (SoTransformation *nodeonleft) β€” combines, with the other node on the left.
  • void setMatrix (const SbMatrix &mat) β€” sets the transform from a raw matrix.
  • void recenter (const SbVec3f &newcenter) β€” moves the center to newcenter.
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” the primitive-count-action handler.

🌈 Public Member Functions inherited from SoNode 🌈

  • void setOverride (const SbBool state) β€” sets override state on or off.
  • SbBool isOverride (void) const β€” are we overriding?
  • void setNodeType (const NodeType type) β€” sets the node type.
  • NodeType getNodeType (void) const β€” reads the node type back out.
  • virtual SoNode * copy (SbBool copyconnections=0) const β€” makes a copy, optionally carrying connections along.
  • virtual SbBool affectsState (void) const β€” does this node mess with the traversal state?
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” renders below the path.
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” renders in the path.
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” renders off the path.
  • virtual void rayPick (SoRayPickAction *action) β€” the ray-pick-action handler.
  • virtual void write (SoWriteAction *action) β€” the write-action handler.
  • virtual void audioRender (SoAudioRenderAction *action) β€” the audio-render-action handler.
  • virtual void grabEventsSetup (void) β€” sets up event grabbing.
  • virtual void grabEventsCleanup (void) β€” cleans event grabbing back up.
  • virtual void startNotify (void) β€” kicks off notification.
  • virtual void notify (SoNotList *l) β€” notifies along the list l.
  • uint32_t getNodeId (void) const β€” its unique node id.
  • virtual void writeInstance (SoOutput *out) β€” writes this instance out.
  • virtual SoNode * addToCopyDict (void) const β€” adds itself to the copy dictionary.
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copies through a connection.

πŸ’œ Public Member Functions inherited from SoFieldContainer πŸ’œ

  • void setToDefaults (void) β€” resets every field to its default.
  • SbBool hasDefaultValues (void) const β€” are all the fields sitting at defaults?
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” do my fields match container's?
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0) β€” copies field values from container, optionally with connections.
  • SbBool set (const char *const fielddata) β€” sets fields from a string of field data.
  • void get (SbString &fielddata) β€” reads the fields out as a string.
  • virtual int getFields (SoFieldList &l) const β€” fills l with the fields.
  • virtual int getAllFields (SoFieldList &l) const β€” fills l with all the fields.
  • virtual SoField * getField (const SbName &name) const β€” grabs the field called name.
  • virtual SoField * getEventIn (const SbName &name) const β€” grabs the event-in called name.
  • virtual SoField * getEventOut (const SbName &name) const β€” grabs the event-out called name.
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” looks up the name of field.
  • SbBool enableNotify (const SbBool flag) β€” turns notification on or off.
  • SbBool isNotifyEnabled (void) const β€” is notification on?
  • SbBool set (const char *fielddata, SoInput *in) β€” sets fields from field data, reading through in.
  • void get (SbString &fielddata, SoOutput *out) β€” reads fields out as a string, writing through out.
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” checks whether newval is legal for field.
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0) β€” adds a write reference.
  • SbBool getIsBuiltIn (void) const β€” is this thing built in?
  • void setUserData (void *userdata) const β€” stashes a userdata pointer.
  • void * getUserData (void) const β€” gets that userdata pointer back.

⭐ Public Member Functions inherited from SoBase ⭐

  • void ref (void) const β€” bumps the reference count.
  • void unref (void) const β€” drops the reference count.
  • void unrefNoDelete (void) const β€” drops the refcount but never deletes.
  • int32_t getRefCount (void) const β€” what's the refcount at right now?
  • void touch (void) β€” touches it, so everything downstream knows something changed.
  • SbBool isOfType (SoType type) const β€” is it of type type?
  • virtual SbName getName (void) const β€” its name.
  • virtual void setName (const SbName &newname) β€” sets its name to newname.
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” attaches an auditor of type.
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” detaches that auditor.
  • const SoAuditorList & getAuditors (void) const β€” the whole auditor list.
  • SbBool shouldWrite (void) β€” should this be written out?
  • void assertAlive (void) const β€” asserts that it's still alive, bestie.

πŸŽ€ Static Public Member Functions πŸŽ€

  • static SoType getClassTypeId (void) β€” the class type id.
  • static void initClass (void) β€” initialises the class.

πŸ“ Static Public Member Functions inherited from SoTransformManip πŸ“

  • static SoType getClassTypeId (void) β€” the class type id.
  • static void initClass (void) β€” initialises the class.

🧚 Static Public Member Functions inherited from SoTransform 🧚

  • static SoType getClassTypeId (void) β€” the class type id.
  • static void initClass (void) β€” initialises the class.

πŸ’… Static Public Member Functions inherited from SoTransformation πŸ’…

  • static SoType getClassTypeId (void) β€” the class type id.
  • static void initClass (void) β€” initialises the class.

πŸ”₯ Static Public Member Functions inherited from SoNode πŸ”₯

  • static uint32_t getCompatibilityTypes (const SoType &nodetype) β€” the compatibility bitmask for nodetype.
  • static SoType getClassTypeId (void) β€” the class type id.
  • static SoNode * getByName (const SbName &name) β€” finds a node by name.
  • static int getByName (const SbName &name, SoNodeList &l) β€” finds nodes by name and dumps them into l.
  • static void initClass (void) β€” initialises the class.
  • static void initClasses (void) β€” initialises all the classes.
  • static uint32_t getNextNodeId (void) β€” the next unique node id.
  • static int getActionMethodIndex (const SoType type) β€” the action method index for type.
  • static void getBoundingBoxS (SoAction *action, SoNode *node) β€” the static bounding-box dispatch.
  • static void GLRenderS (SoAction *action, SoNode *node) β€” the static render dispatch.
  • static void callbackS (SoAction *action, SoNode *node) β€” the static callback dispatch.
  • static void getMatrixS (SoAction *action, SoNode *node) β€” the static get-matrix dispatch.
  • static void handleEventS (SoAction *action, SoNode *node) β€” the static handle-event dispatch.
  • static void pickS (SoAction *action, SoNode *node) β€” the static pick dispatch.
  • static void rayPickS (SoAction *action, SoNode *node) β€” the static ray-pick dispatch.
  • static void searchS (SoAction *action, SoNode *node) β€” the static search dispatch.
  • static void writeS (SoAction *action, SoNode *node) β€” the static write dispatch.
  • static void audioRenderS (SoAction *action, SoNode *node) β€” the static audio-render dispatch.
  • static void getPrimitiveCountS (SoAction *action, SoNode *node) β€” the static primitive-count dispatch.

🫢 Static Public Member Functions inherited from SoFieldContainer 🫢

  • static void initClass (void) β€” initialises the class.
  • static SoType getClassTypeId (void) β€” the class type id.
  • static void initCopyDict (void) β€” sets up the copy dictionary.
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” registers copy as the copy of orig.
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” looks up the copy of orig.
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” finds the copy of orig, respecting copyconnections.
  • static void copyDone (void) β€” wraps up copying.

πŸ’€ Static Public Member Functions inherited from SoBase πŸ’€

  • static void initClass (void) β€” initialises the class.
  • static SoType getClassTypeId (void) β€” the class type id.
  • static void addName (SoBase *const base, const char *const name) β€” names base as name.
  • static void removeName (SoBase *const base, const char *const name) β€” removes that name.
  • static void incrementCurrentWriteCounter (void) β€” bumps the current write counter.
  • static void decrementCurrentWriteCounter (void) β€” drops the current write counter.
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” finds a base by name and type.
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” finds bases by name and type, into baselist.
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype) β€” reads a base out of in.
  • static void setInstancePrefix (const SbString &c) β€” sets the instance prefix to c.
  • static void setTraceRefs (SbBool trace) β€” turns reference tracing on or off.
  • static SbBool getTraceRefs (void) β€” is reference tracing on?
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” connects a route from one node+field to another, through in.
  • static SbBool readRoute (SoInput *in) β€” reads a route out of in.

πŸ™ˆ Protected Member Functions πŸ™ˆ

  • virtual const SoFieldData * getFieldData (void) const β€” the field data.
  • ~SoTransformerManip () β€” the destructor.

🌸 Protected Member Functions inherited from SoTransformManip 🌸

  • ~SoTransformManip () β€” destructor.
  • void setDragger (SoDragger *newdragger) β€” sets the dragger to newdragger.
  • virtual void copyContents (const SoFieldContainer *fromfc, SbBool copyconnections) β€” copies contents in from fromfc.
  • void attachSensors (const SbBool onoff) β€” attaches or detaches the 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 an instance out of in.

πŸ’œ 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 it.
  • SbBool hasMultipleWriteRefs (void) const β€” does it have multiple write refs?
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” writes the header out.
  • void writeFooter (SoOutput *out) const β€” writes the footer out.
  • virtual const char * getFileFormatName (void) const β€” the file format name.

🌈 Static Protected Member Functions 🌈

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data.

πŸ“ Static Protected Member Functions inherited from SoTransformManip πŸ“

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data.
  • static void transferFieldValues (const SoTransform *from, SoTransform *to) β€” moves field values from from to to.
  • static void valueChangedCB (void *f, SoDragger *d) β€” the value-changed callback.
  • static void fieldSensorCB (void *f, SoSensor *d) β€” the field-sensor callback.

🧚 Static Protected Member Functions inherited from SoTransform 🧚

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data.

πŸ’… Static Protected Member Functions inherited from SoTransformation πŸ’…

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data.

πŸ”₯ Static Protected Member Functions inherited from SoNode πŸ”₯

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data.
  • static void setNextActionMethodIndex (int index) β€” sets the next action method index to index.
  • static int getNextActionMethodIndex (void) β€” reads the next action method index.
  • static void incNextActionMethodIndex (void) β€” bumps the next action method index.
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” sets the compatibility types for nodetype to bitmask.

🫢 Static Protected Member Functions inherited from SoBase 🫢

  • static uint32_t getCurrentWriteCounter (void) β€” the current write counter.
  • static void staticDataLock (void) β€” locks the static data.
  • static void staticDataUnlock (void) β€” unlocks the static data.

πŸ‘‘ Additional Inherited Members πŸ‘‘

πŸ’– Public Types inherited from SoNode πŸ’–

the enum of node types, all in one gorgeous block:

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 translation β€” the translation field.
  • SoSFRotation rotation β€” the rotation field.
  • SoSFVec3f scaleFactor β€” the scale factor field.
  • SoSFRotation scaleOrientation β€” the scale orientation field.
  • SoSFVec3f center β€” the center field.

πŸ¦‹ Protected Types inherited from SoBase πŸ¦‹

enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }

πŸŽ€ Protected Attributes inherited from SoTransformManip πŸŽ€

  • SoFieldSensor * rotateFieldSensor β€” the rotation field sensor.
  • SoFieldSensor * translFieldSensor β€” the translation field sensor.
  • SoFieldSensor * scaleFieldSensor β€” the scale field sensor.
  • SoFieldSensor * centerFieldSensor β€” the center field sensor.
  • SoFieldSensor * scaleOrientFieldSensor β€” the scale-orientation field sensor.
  • SoChildList * children β€” the children.

✨ Protected Attributes inherited from SoNode ✨

  • uint32_t uniqueId β€” the unique id.

πŸ’œ Protected Attributes inherited from SoFieldContainer πŸ’œ

  • SbBool isBuiltIn β€” is it built in?

⭐ Static Protected Attributes inherited from SoNode ⭐

  • static uint32_t nextUniqueId = 0 β€” the next unique id, starting at 0.
  • static int nextActionMethodIndex = 0 β€” the next action method index, starting at 0.

πŸ’« DETAILED DESCRIPTION πŸ’«

okay so real talk: SoTransformerManip is basically a little gift-wrap situation 🎁 for an SoTransformerDragger. That's the whole personality. It wraps it up.

The manipulator class does all the boring admin so you don't have to β€” it wraps the SoTransformerDragger in a simple and convenient API for the application programmer (that's you, bestie 🫢), it automatically surrounds the geometry it influences, and it handles all the book-keeping routines for how it vibes with the relevant fields of an SoTransformation node. lowkey iconic of it.


🧚 CONSTRUCTOR & DESTRUCTOR DOCUMENTATION 🧚

SoTransformerManip::SoTransformerManip (void )

Default constructor, bestie. It allocates an SoTransformerDragger and an SoSurroundScale node, so the whole thing can surround the geometry inside our part of the scenegraph. very "I brought my own setup" energy ✨

References: SoBaseKit::getPart(), SoSurroundScale::numNodesUpToContainer, SoSurroundScale::numNodesUpToReset, SoTransformManip::setDragger(), and SoTransformerManip().

Referenced by: getFieldData(), and SoTransformerManip().

SoTransformerManip::~SoTransformerManip () [protected]

Destructor. That's it, that's the whole thing. bye πŸ‘‹πŸ’€


πŸ”₯ MEMBER FUNCTION DOCUMENTATION πŸ”₯

SoType SoTransformerManip::getTypeId (void ) const [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is what powers run-time type checking and "downward" casting β€” iykyk.

Usage example, copy it exactly bestie:

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
  }
}

Now for the application programmers out there wanting to extend the library with new nodes, engines, nodekits, draggers or whatever else: this method needs to be overridden in all subclasses. periodt. 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 (that's SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. πŸ› οΈ

Want more on writing Coin extensions? Go read the class documentation of the toplevel superclasses for the various class groups. πŸ“š

Reimplemented from SoTransformManip.

const SoFieldData * SoTransformerManip::getFieldData (void ) const [protected], [virtual]

Returns a pointer to the class-wide field data storage object for this instance. And if there are no fields present, it returns NULL. empty-handed, no cap πŸ™ˆ

Reimplemented from SoTransformManip.

References: SoTransformerManip().

SbBool SoTransformerManip::isLocateHighlighting (void )

Convenience function, bestie β€” it just uses the SoTransformerDragger::isLocateHighlighting() method of the embedded dragger. See the documentation of that method for the real tea. 🍡

References: SoTransformManip::getDragger(), SoBase::isOfType(), and SoDebugError::postWarning().

void SoTransformerManip::setLocateHighlighting (SbBool onoff)

Another convenience function, and yes it does what it says β€” it uses the SoTransformerDragger::setLocateHighlighting() method of the embedded dragger. Again, see that method's documentation. ✨

References: SoTransformManip::getDragger(), SoBase::isOfType(), and SoDebugError::postWarning().

void SoTransformerManip::unsquishKnobs (void )

Convenience function numero tres πŸ’… β€” it uses the SoTransformerDragger::unsquishKnobs() method of the embedded dragger. You already know: see the documentation of that method.

References: SoTransformManip::getDragger(), SoBase::isOfType(), and SoDebugError::postWarning().


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. not a human writing this, just a robot doing its lil thing πŸ€–βœ¨


and that's a wrap on part 3, bestie πŸŽ€ this whole page is from Coin, Version 2.5.0, filed under SoTransformerManip(3) β€” go forth and transform some stuff, you got this πŸ’–πŸ¦‹

πŸ“¦ where this page comes from