SoInteractionKit(3)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

๐Ÿ’– SoInteractionKit(3) ๐Ÿ’–

the Library Functions Manual said GAY RIGHTS and honestly? iconic

okay bestie, listen. this is a big one. it's long, it's detailed, and it's part 1 of 4, so buckle up and hydrate ๐Ÿ’ง


๐ŸŽ€ NAME ๐ŸŽ€

SoInteractionKit โ€” the base class for draggers. that's it, that's the whole name section. she's a mom. a dragger mom. main character energy ๐Ÿ’…


โœจ SYNOPSIS โœจ

so to even speak to this class you gotta summon her like this:

#include <Inventor/nodekits/SoInteractionKit.h>

Inherits SoBaseKit.

Inherited by SoDragger.

iykyk โ€” this is the family tree. she got her genes from SoBaseKit, and SoDragger got her genes. generational wealth but for C++ classes ๐Ÿซถ

๐Ÿ’… Public Types ๐Ÿ’…

the one and only enum she brought to the function:

enum CacheEnabled { OFF, ON, AUTO }

three moods: off, on, and "figure it out yourself" (AUTO, we love a flexible queen) โœจ


๐ŸŒธ Public Types inherited from SoNode ๐ŸŒธ

these aren't hers, they're inherited โ€” she's just carrying them in her purse:

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
    }

not me counting the flags like they're friendship bracelets ๐Ÿ˜ญ


๐Ÿ‘‘ Public Member Functions ๐Ÿ‘‘

her own functions. the ones she actually wrote. slay:

virtual SoType getTypeId (void) const
virtual const SoNodekitCatalog * getNodekitCatalog (void) const
SoInteractionKit (void)
virtual SbBool setPartAsPath (const SbName &partname, SoPath *path)
virtual SbBool setPartAsDefault (const SbName &partname, SoNode *node,
    SbBool onlyifdefault=1)
virtual SbBool setPartAsDefault (const SbName &partname, const SbName
    &nodename, SbBool onlyifdefault=1)
SbBool isPathSurrogateInMySubgraph (const SoPath *path, SoPath
    *&pathToOwner, SbName &surrogatename, SoPath *&surrogatepath, SbBool
    fillargs=1)
SbBool isPathSurrogateInMySubgraph (const SoPath *path)
virtual SbBool setPart (const SbName &partname, SoNode *from)

look at all those =1 defaults. she's generous. she's giving. she has range. ๐Ÿ’–


๐Ÿฆ‹ Public Member Functions inherited from SoBaseKit ๐Ÿฆ‹

borrowed from mom. still cute, still valid:

SoBaseKit (void)
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)
SbBool set (const char *namevaluepairliststring)
SbBool set (const char *partnamestring, const char *parameterstring)
virtual void doAction (SoAction *action)
virtual void callback (SoCallbackAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void search (SoSearchAction *action)
virtual void write (SoWriteAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
virtual SoChildList * getChildren (void) const
void printDiagram (void)
void printSubDiagram (const SbName &rootname, int level)
void printTable (void)
virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)
SbBool forceChildDrivenWriteRefs (SoOutput *out)

the way that printDiagram and printSubDiagram are just there waiting to make your terminal look โœจfancyโœจ ๐ŸŒˆ


โญ Public Member Functions inherited from SoNode โญ

grandma's recipe book, passed down:

void setOverride (const SbBool state)
SbBool isOverride (void) const
void setNodeType (const NodeType type)
NodeType getNodeType (void) const
virtual SoNode * copy (SbBool copyconnections=0) const
virtual SbBool affectsState (void) const
virtual void GLRenderBelowPath (SoGLRenderAction *action)
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void GLRenderOffPath (SoGLRenderAction *action)
virtual void pick (SoPickAction *action)
virtual void audioRender (SoAudioRenderAction *action)
virtual void grabEventsSetup (void)
virtual void grabEventsCleanup (void)
virtual void startNotify (void)
virtual void notify (SoNotList *l)
uint32_t getNodeId (void) const
virtual void writeInstance (SoOutput *out)
virtual SoFieldContainer * copyThroughConnection (void) const

there are literally three whole render functions for three whole paths and honestly? commitment. dedication. ๐Ÿ’€


๐Ÿ“ Public Member Functions inherited from SoFieldContainer ๐Ÿ“

the field girlies:

void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool
    copyconnections=0)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *in)
void get (SbString &fielddata, SoOutput *out)
virtual SbBool validateNewFieldValue (SoField *field, void *newval)
SbBool getIsBuiltIn (void) const
void setUserData (void *userdata) const
void * getUserData (void) const

there's like four different overloads of set and get in here and every single one of them is valid, do not come for them ๐Ÿ™ˆ


๐Ÿงš Public Member Functions inherited from SoBase ๐Ÿงš

great-grandma's greatest hits:

void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual void setName (const SbName &newname)
void addAuditor (void *const auditor, const SoNotRec::Type type)
void removeAuditor (void *const auditor, const SoNotRec::Type type)
const SoAuditorList & getAuditors (void) const
SbBool shouldWrite (void)
void assertAlive (void) const

ref and unref and unrefNoDelete โ€” the holy trinity of memory management, bestie. don't mess it up. ๐Ÿซถ


๐ŸŽ€ Static Public Member Functions ๐ŸŽ€

the static girlies, hers first:

static SoType getClassTypeId (void)
static const SoNodekitCatalog * getClassNodekitCatalog (void)
static void initClass (void)
static void setSwitchValue (SoNode *node, const int newVal)

๐Ÿ’œ Static Public Member Functions inherited from SoBaseKit ๐Ÿ’œ

static SoType getClassTypeId (void)
static void initClass (void)
static const SoNodekitCatalog * getClassNodekitCatalog (void)
static SbBool isSearchingChildren (void)
static void setSearchingChildren (const SbBool newval)
static SoNode * typeCheck (const SbName &partname, const SoType
    &parttype, SoNode *node)

initClass making another appearance. she's everywhere. she's booked and busy. โœจ


๐ŸŒธ Static Public Member Functions inherited from SoNode ๐ŸŒธ

static uint32_t getCompatibilityTypes (const SoType &nodetype)
static SoType getClassTypeId (void)
static SoNode * getByName (const SbName &name)
static int getByName (const SbName &name, SoNodeList &l)
static void initClass (void)
static void initClasses (void)
static uint32_t getNextNodeId (void)
static int getActionMethodIndex (const SoType type)
static void getBoundingBoxS (SoAction *action, SoNode *node)
static void GLRenderS (SoAction *action, SoNode *node)
static void callbackS (SoAction *action, SoNode *node)
static void getMatrixS (SoAction *action, SoNode *node)
static void handleEventS (SoAction *action, SoNode *node)
static void pickS (SoAction *action, SoNode *node)
static void rayPickS (SoAction *action, SoNode *node)
static void searchS (SoAction *action, SoNode *node)
static void writeS (SoAction *action, SoNode *node)
static void audioRenderS (SoAction *action, SoNode *node)
static void getPrimitiveCountS (SoAction *action, SoNode *node)

not the whole alphabet of ...S functions. that trailing S is for Static and it's giving consistency ๐Ÿ‘‘


๐Ÿฆ‹ Static Public Member Functions inherited from SoFieldContainer ๐Ÿฆ‹

static void initClass (void)
static SoType getClassTypeId (void)
static void initCopyDict (void)
static void addCopy (const SoFieldContainer *orig, const
    SoFieldContainer *copy)
static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
static SoFieldContainer * findCopy (const SoFieldContainer *orig, const
    SbBool copyconnections)
static void copyDone (void)

the copy squad: initCopyDict, addCopy, checkCopy, findCopy, copyDone. it's a whole little assembly line and i'm obsessed. ๐Ÿ’…


โญ Static Public Member Functions inherited from SoBase โญ

static void initClass (void)
static SoType getClassTypeId (void)
static void addName (SoBase *const base, const char *const name)
static void removeName (SoBase *const base, const char *const name)
static void incrementCurrentWriteCounter (void)
static void decrementCurrentWriteCounter (void)
static SoBase * getNamedBase (const SbName &name, SoType type)
static int getNamedBases (const SbName &name, SoBaseList &baselist,
    SoType type)
static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *in, const SbName &fromnodename,
    const SbName &fromfieldname, const SbName &tonodename, const SbName
    &tofieldname)
static SbBool readRoute (SoInput *in)

incrementCurrentWriteCounter and decrementCurrentWriteCounter โ€” a matched set, they come as a pair, they never separate, they're soulmates fr fr ๐Ÿซถ


๐ŸŒˆ Public Attributes ๐ŸŒˆ

her public fields, out in the open, no secrets:

SoSFEnum renderCaching
SoSFEnum boundingBoxCaching
SoSFEnum renderCulling
SoSFEnum pickCulling

all four are SoSFEnum โ€” caching twice, culling twice. symmetry. balance. โœจ


๐Ÿ”ฅ Protected Member Functions ๐Ÿ”ฅ

protected means family only, bestie. no outsiders. ๐Ÿ™ˆ

virtual const SoFieldData * getFieldData (void) const
virtual ~SoInteractionKit ()
virtual void copyContents (const SoFieldContainer *fromFC, SbBool
    copyConnections)
virtual SbBool setPart (const int partNum, SoNode *node)
virtual SbBool readInstance (SoInput *in, unsigned short flags)
virtual SbBool setAnyPartAsDefault (const SbName &partname, SoNode
    *node, SbBool anypart=1, SbBool onlyifdefault=1)
virtual SbBool setAnyPartAsDefault (const SbName &partname, const SbName
    &nodename, SbBool anypart=1, SbBool onlyifdefault=1)
SbBool setAnySurrogatePath (const SbName &name, SoPath *path, SbBool
    leafcheck=0, SbBool publiccheck=0)
virtual SbBool setUpConnections (SbBool onoff, SbBool doitalways=0)
virtual void setDefaultOnNonWritingFields ()
void connectSeparatorFields (SoSeparator *dest, SbBool onOff)
โš ๏ธ careful bestie โ€” there's a virtual ~SoInteractionKit () in here, that's the destructor, and there are two overloads of setAnyPartAsDefault that are NOT the same function, do not confuse them, i am begging ๐Ÿซถ

๐Ÿ’œ Protected Member Functions inherited from SoBaseKit ๐Ÿ’œ

virtual ~SoBaseKit ()
virtual SoNode * addToCopyDict (void) const
SoGroup * getContainerNode (const SbName &listname, SbBool
    makeifneeded=1)
virtual SoNode * getAnyPart (const SbName &partname, SbBool
    makeifneeded, SbBool leafcheck=0, SbBool publiccheck=0)
virtual SoNodeKitPath * createPathToAnyPart (const SbName &partname,
    SbBool makeifneeded, SbBool leafcheck=0, SbBool publiccheck=0, const
    SoPath *pathtoextend=NULL)
virtual SbBool setAnyPart (const SbName &partname, SoNode *from, SbBool
    anypart=1)
void createNodekitPartsList (void)
void createFieldList (void)
virtual void createDefaultParts (void)
const SoNodekitParts * getNodekitPartsList (void) const
const SbList< SoSFNode * > & getCatalogInstances (void) const
void catalogError (void)
void countMyFields (SoOutput *out)

note the const SbList< SoSFNode * > & up in there โ€” template angle brackets, nested, immaculate. she said "i contain multitudes" and meant it. ๐Ÿ’…


๐ŸŒธ Protected Member Functions inherited from SoNode ๐ŸŒธ

SoNode (void)
virtual ~SoNode ()

just a constructor and a destructor. short. sweet. the beginning and the end. ๐Ÿฆ‹


๐Ÿ“ Protected Member Functions inherited from SoFieldContainer ๐Ÿ“

SoFieldContainer (void)
~SoFieldContainer ()

๐Ÿงš Protected Member Functions inherited from SoBase ๐Ÿงš

SoBase (void)
virtual ~SoBase ()
virtual void destroy (void)
SbBool hasMultipleWriteRefs (void) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine)
    const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const

writeHeader and writeFooter โ€” a matched pair again, they open and close, they're the brackets of the write pipeline, periodt. โœจ


and that's the synopsis, bestie โ€” every single signature, every inherited one, every enum, all of it, verbatim, no skips, no shortcuts. ๐Ÿ’–

โœจ Static Protected Member Functions โœจ

okay bestie, these are the static protected ones โ€” no descriptions given in the source, just vibes ๐Ÿ’…

  • static const SoFieldData ** getFieldDataPtr (void)
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void)
  • static void readDefaultParts (const char *fileName, const char defaultBuffer[], int defBufSize)
  • static void fieldSensorCB (void *, SoSensor *)

๐ŸŒธ Static Protected Member Functions inherited from SoBaseKit ๐ŸŒธ

  • static const SoFieldData ** getFieldDataPtr (void)
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void)

๐Ÿฆ‹ Static Protected Member Functions inherited from SoNode ๐Ÿฆ‹

  • static const SoFieldData ** getFieldDataPtr (void)
  • static void setNextActionMethodIndex (int index)
  • static int getNextActionMethodIndex (void)
  • static void incNextActionMethodIndex (void)
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)

๐Ÿ’œ Static Protected Member Functions inherited from SoBase ๐Ÿ’œ

  • static uint32_t getCurrentWriteCounter (void)
  • static void staticDataLock (void)
  • static void staticDataUnlock (void)

๐ŸŽ€ Protected Attributes ๐ŸŽ€

these are the protected attributes, the little secret members only the class and its besties can touch:

  • SoSFNode geomSeparator
  • SoSFNode topSeparator
  • SoFieldSensor * fieldSensor
  • SoSeparator * oldTopSep

Protected Attributes inherited from SoBaseKit

  • SoSFNode callbackList
  • SoChildList * children
  • SbBool connectionsSetUp

Protected Attributes inherited from SoNode

  • uint32_t uniqueId

Protected Attributes inherited from SoFieldContainer

  • SbBool isBuiltIn

๐Ÿ‘ฏ Friends ๐Ÿ‘ฏ

just one friend, and honestly? iconic.

  • class SoInteractionKitP

๐ŸŒˆ Additional Inherited Members ๐ŸŒˆ

Protected Types inherited from SoBase

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

Static Protected Attributes inherited from SoNode

  • static uint32_t nextUniqueId = 0
  • static int nextActionMethodIndex = 0

๐Ÿ“– Detailed Description ๐Ÿ“–

so the tea โ˜• is: The SoInteractionKit class is a base class for draggers.

This nodekit class makes it possible to set surrogate paths for parts. Instead of creating new geometry for the dragger, it is possible to specify an existing path in your scene to be used for interaction. All picks on this path will be handled by the dragger.

The SoInteractionKit is primarily an internal class used as a superclass for the dragger classes, and it is unlikely that it should be of interest to application programmers, unless you have very special needs in your application.

Node kit structure (new entries versus parent class marked with arrow prefix):

CLASS SoInteractionKit
-->"this"
      "callbackList"
-->   "topSeparator"
-->      "geomSeparator"

(See SoBaseKit::printDiagram() for information about the output formatting.)

Detailed information on catalog parts:

CLASS SoInteractionKit
PVT   "this",  SoInteractionKit  ---
      "callbackList",  SoNodeKitListPart [ SoCallback, SoEventCallback ]
PVT   "topSeparator",  SoSeparator  ---
PVT   "geomSeparator",  SoSeparator  ---

(See SoBaseKit::printTable() for information about the output formatting.)


๐Ÿ”ฎ Member Enumeration Documentation ๐Ÿ”ฎ

enum SoInteractionKit::CacheEnabled

Enumeration of valid values for the cache control fields SoInteractionKit::renderCaching, SoInteractionKit::boundingBoxCaching, SoInteractionKit::renderCulling and SoInteractionKit::pickCulling.

The same values with the same semantics are present in this enum as for SoSeparator::CacheEnabled, so see that documentation. no cap, it's literally the same energy.


๐Ÿ‘‘ Constructor & Destructor Documentation ๐Ÿ‘‘

SoInteractionKit::SoInteractionKit (void )

Constructor. the birth of a legend โœจ

References boundingBoxCaching, fieldSensorCB(), pickCulling, renderCaching, renderCulling, setUpConnections(), and SoInteractionKit().

Referenced by copyContents(), getFieldData(), isPathSurrogateInMySubgraph(), setAnySurrogatePath(), and SoInteractionKit().

SoInteractionKit::~SoInteractionKit () [protected], [virtual]

Destructor. rest in peace queen ๐Ÿซถ


๐Ÿงš Member Function Documentation ๐Ÿงš

SoType SoInteractionKit::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.

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.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Reimplemented from SoBaseKit.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, and SoTranslate2Dragger.

const SoFieldData * SoInteractionKit::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.

Reimplemented from SoBaseKit.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, and SoTranslate2Dragger.

References SoInteractionKit().

const SoNodekitCatalog * SoInteractionKit::getNodekitCatalog (void ) const [virtual]

Returns the nodekit catalog which defines the layout of this class' kit.

Reimplemented from SoBaseKit.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, and SoTranslate2Dragger.

Referenced by setDefaultOnNonWritingFields(), and setPart().

SbBool SoInteractionKit::setPartAsPath (const SbName & partname, SoPath * path) [virtual]

Sets a part in the kit as a surrogate path. The partname part is set to NULL, and the surrogate path is remembered. Following picks on the surrogate path will be regarded as a pick on partname.

References setAnySurrogatePath().

SbBool SoInteractionKit::setPartAsDefault (const SbName & partname, SoNode * node, SbBool onlyifdefault = 1) [virtual]

Sets the value of partname to node, and sets the part's field to default (i.e. node will not be written on scene graph export).

If onlyifdefault is TRUE, partname is only set if it is already in the default state.

The reason for this method is to make it possible for dragger subclasses to avoid having their default parts written out on export.

References setAnyPartAsDefault(), and SoNode::SoNode().

Referenced by SoCenterballDragger::setUpConnections(), SoDirectionalLightDragger::setUpConnections(), SoDragPointDragger::setUpConnections(), SoJackDragger::setUpConnections(), SoPointLightDragger::setUpConnections(), SoSpotLightDragger::setUpConnections(), SoTabBoxDragger::setUpConnections(), SoTransformBoxDragger::setUpConnections(), SoCenterballDragger::SoCenterballDragger(), SoDirectionalLightDragger::SoDirectionalLightDragger(), SoDragPointDragger::SoDragPointDragger(), SoHandleBoxDragger::SoHandleBoxDragger(), SoPointLightDragger::SoPointLightDragger(), SoRotateCylindricalDragger::SoRotateCylindricalDragger(), SoRotateDiscDragger::SoRotateDiscDragger(), SoRotateSphericalDragger::SoRotateSphericalDragger(), SoScale1Dragger::SoScale1Dragger(), SoScale2Dragger::SoScale2Dragger(), SoScale2UniformDragger::SoScale2UniformDragger(), SoScaleUniformDragger::SoScaleUniformDragger(), SoSpotLightDragger::SoSpotLightDragger(), SoTabBoxDragger::SoTabBoxDragger(), SoTabPlaneDragger::SoTabPlaneDragger(), SoTrackballDragger::SoTrackballDragger(), SoTransformerDragger::SoTransformerDragger(), SoTranslate1Dragger::SoTranslate1Dragger(), and SoTranslate2Dragger::SoTranslate2Dragger().

SbBool SoInteractionKit::setPartAsDefault (const SbName & partname, const SbName & nodename, SbBool onlyifdefault = 1) [virtual]

Find node in the global dictionary, and set as default.

See also setPartAsDefault().

References setAnyPartAsDefault().

SbBool SoInteractionKit::isPathSurrogateInMySubgraph (const SoPath * path, SoPath *& pathToOwner, SbName & surrogatename, SoPath *& surrogatepath, SbBool fillargs = 1)

Checks if path is contained within any of the surrogate paths in any interaction kits from this node down. Returns information about the owner and the surrogate path if found, and fillargs is TRUE. The returned path (pathToOwner) is not ref'ed, It's the callers responsibility to ref and unref this path. yes bestie, you gotta manage that ref yourself, don't @ me ๐Ÿ˜ญ

References SoAction::apply(), SoBaseList::copy(), SbPList::getLength(), SoSearchAction::getPaths(), SoBase::isOfType(), SoSearchAction::setFind(), SoSearchAction::setSearchingAll(), SoSearchAction::setType(), and SoInteractionKit().

Referenced by SoDragger::handleEvent(), and isPathSurrogateInMySubgraph().

SbBool SoInteractionKit::isPathSurrogateInMySubgraph (const SoPath * path)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References isPathSurrogateInMySubgraph().

void SoInteractionKit::setSwitchValue (SoNode * node, const int newVal) [static]

Convenience method that sets the switch value for a switch node. Checks if node != 0, and only sets the switch value if value has changed.

References SoBase::isOfType(), SoNode::SoNode(), and SoSwitch::whichChild.

โ€ฆand the rest of the Referenced by roll call, bestie, because this one is popular ๐Ÿ’…:

  • SoTranslate2Dragger::drag()
  • SoDragPointDragger::dragFinish()
  • SoRotateCylindricalDragger::dragFinish()
  • SoRotateDiscDragger::dragFinish()
  • SoRotateSphericalDragger::dragFinish()
  • SoScale1Dragger::dragFinish()
  • SoScale2Dragger::dragFinish()
  • SoScale2UniformDragger::dragFinish()
  • SoScaleUniformDragger::dragFinish()
  • SoSpotLightDragger::dragFinish()
  • SoTranslate1Dragger::dragFinish()
  • SoTranslate2Dragger::dragFinish()
  • SoDragPointDragger::dragStart()
  • SoRotateCylindricalDragger::dragStart()
  • SoRotateDiscDragger::dragStart()
  • SoRotateSphericalDragger::dragStart()
  • SoScale1Dragger::dragStart()
  • SoScale2Dragger::dragStart()
  • SoScale2UniformDragger::dragStart()
  • SoScaleUniformDragger::dragStart()
  • SoSpotLightDragger::dragStart()
  • SoTrackballDragger::dragStart()
  • SoTranslate1Dragger::dragStart()
  • SoTranslate2Dragger::dragStart()
  • SoHandleBoxDragger::setAllPartsActive()
  • SoTrackballDragger::setAllPartsActive()
  • SoCenterballDragger::setSwitches()
  • SoDragPointDragger::SoDragPointDragger()
  • SoRotateCylindricalDragger::SoRotateCylindricalDragger()
  • SoRotateDiscDragger::SoRotateDiscDragger()
  • SoRotateSphericalDragger::SoRotateSphericalDragger()
  • SoScale1Dragger::SoScale1Dragger()
  • SoScale2Dragger::SoScale2Dragger()
  • SoScale2UniformDragger::SoScale2UniformDragger()
  • SoScaleUniformDragger::SoScaleUniformDragger()
  • SoSpotLightDragger::SoSpotLightDragger()
  • SoTabPlaneDragger::SoTabPlaneDragger()
  • SoTranslate1Dragger::SoTranslate1Dragger()
  • SoTranslate2Dragger::SoTranslate2Dragger()

๐Ÿซถ SbBool SoInteractionKit::setPart(const SbName & partname, SoNode * from) [virtual]

Okay so this one is the vibe-setter: it takes the catalog part called partname and points it at the from node pointer. That's it, that's the whole job. Slay. โœจ

Reimplemented from SoBaseKit.

References: SoBaseKit::setPart(), and SoNode::SoNode().

Referenced by: SoDirectionalLightManip::fieldSensorCB(), SoPointLightManip::fieldSensorCB(), and SoSpotLightManip::fieldSensorCB().


๐ŸŒธ void SoInteractionKit::copyContents(const SoFieldContainer * from, SbBool copyconnections) [protected], [virtual]

This is the deep-copy girly. It takes all the data from from and clones it into this instance โ€” except external scenegraph references if copyconnections is FALSE. Boundaries, periodt. ๐Ÿ™ˆ

It's the protected method you're supposed to override when you're building extension node / engine / dragger / whatever subclasses and you've got internal data that the automatic machinery doesn't know how to handle. Custom secrets = your problem to copy, bestie. ๐Ÿ’…

โš ๏ธ Real talk: if you're copying nodes from application code, do not call this function directly. Call SoNode::copy() instead:
SoNode * mynewnode = templatenode->copy();

Same energy applies to engines, fr fr.

And when you do override copyContents() in your extension class, make sure you call upward to your parent superclass in the inheritance hierarchy, because copyContents() in stuff like SoNode and SoFieldContainer does important work and skipping it is not the move. It should look something like this:

void
MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
                                  SbBool copyconnections)
{
  // let parent superclasses do their thing (copy fields, copy
  // instance name, etc etc)
  SoNode::copyContents(from, copyconnections);

  // [..then copy internal data..]
}

Reimplemented from SoBaseKit.

Reimplemented in SoRotateCylindricalDragger, and SoRotateSphericalDragger.

References: SoBaseKit::copyContents(), SoBase::isOfType(), SoFieldContainer::SoFieldContainer(), and SoInteractionKit().


๐Ÿฆ‹ SbBool SoInteractionKit::setPart(const int partnum, SoNode * node) [protected], [virtual]

Sets parts by number, updates the nodekit scene graph, and makes sure the graph is actually valid with respect to right siblings and parent. Whole glow-up, honestly. โœจ

The reason it's virtual is so subclasses can detect the moment a part changes value โ€” like a little notification bell for your subclass. ๐Ÿ””

๐Ÿ“ Note: this method is not part of the original SGI Open Inventor API. It's an extension specific to Coin. Coin said "let's add a lil something" and we're obsessed.

Reimplemented from SoBaseKit.

References: SoBase::getName(), getNodekitCatalog(), SoBaseKit::setPart(), and SoNode::SoNode().


๐ŸŽ€ SbBool SoInteractionKit::readInstance(SoInput * in, unsigned short flags) [protected], [virtual]

This one is mostly for internal use during file import operations โ€” it's giving backstage crew, not main character. ๐ŸŽญ

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type. (Yes, "persistant" โ€” that's the original's spelling, we're keeping it, no notes.)

TRUE or FALSE comes back depending on whether the instantiation and configuration of the new object of this class type went okay or not. The import process should be robust and handle corrupted input streams by returning FALSE โ€” no crashing out in the group chat, be graceful. ๐Ÿ˜ญ

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Reimplemented from SoBaseKit.

References: SoBaseKit::getAnyPart(), SoNode::getChildren(), SbPList::getLength(), SoBase::getTypeId(), SoBaseKit::readInstance(), and SoNode::SoNode().


๐Ÿ“ void SoInteractionKit::readDefaultParts(const char * fileName, const char defaultBuffer[], int defBufSize) [static], [protected]

Reads default parts for a dragger. ๐Ÿงš Basically it's called from dragger constructors to set up a dragger's nodekit catalog of interaction and feedback geometry. Setting the whole stage, iconic behaviour. ๐Ÿ‘‘

fileName is the user-changeable resource file in the Inventor file format, while defaultBuffer and defBufSize can point to the statically compiled default parts.

๐Ÿšจ Important: the environment variable SO_DRAGGER_DIR must be set to a valid directory prefix for fileName, or no resource file will be loaded at all (and defaultBuffer will be used instead). No env var, no file. That's the rule, bestie.

If both a fileName and a defaultBuffer is provided, the file will be attempted found and loaded first, and if that fails, the geometry will be attempted read from the buffer. Backup plan energy. ๐Ÿ’ช

References: SbString::getLength(), SbString::getString(), SoInput::openFile(), SoDebugError::post(), SoDB::readAll(), SoBase::ref(), SoInput::setBuffer(), and SoNode::SoNode().

Referenced by: SoCenterballDragger::SoCenterballDragger(), SoDirectionalLightDragger::SoDirectionalLightDragger(), SoDragPointDragger::SoDragPointDragger(), SoHandleBoxDragger::SoHandleBoxDragger(), SoJackDragger::SoJackDragger(), SoPointLightDragger::SoPointLightDragger(), SoRotateCylindricalDragger::SoRotateCylindricalDragger(), SoRotateDiscDragger::SoRotateDiscDragger(), SoRotateSphericalDragger::SoRotateSphericalDragger(), SoScale1Dragger::SoScale1Dragger(), SoScale2Dragger::SoScale2Dragger(), SoScale2UniformDragger::SoScale2UniformDragger(), SoScaleUniformDragger::SoScaleUniformDragger(), SoSpotLightDragger::SoSpotLightDragger(), SoTabBoxDragger::SoTabBoxDragger(), SoTabPlaneDragger::SoTabPlaneDragger(), SoTrackballDragger::SoTrackballDragger(), SoTransformBoxDragger::SoTransformBoxDragger(), SoTransformerDragger::SoTransformerDragger(), SoTranslate1Dragger::SoTranslate1Dragger(), and SoTranslate2Dragger::SoTranslate2Dragger().


๐ŸŒˆ SbBool SoInteractionKit::setAnyPartAsDefault(const SbName & partname, SoNode * node, SbBool anypart = 1, SbBool onlyifdefault = 1) [protected], [virtual]

Protected version of setPartAsDefault(), so you can reach the non-leaf and private parts (if anypart is TRUE). It's giving VIP access. ๐Ÿ’…

See also: setPartAsDefault()

References: SoBaseKit::getCatalogInstances(), SbName::getString(), SoField::isDefault(), SoDebugError::postInfo(), SoField::setDefault(), SoBaseKit::setPart(), SoBaseKit::SoBaseKit(), and SoNode::SoNode().

Referenced by: setAnyPartAsDefault(), setPartAsDefault(), setPartAsDefault(), and SoDragPointDragger::SoDragPointDragger().


โญ SbBool SoInteractionKit::setAnyPartAsDefault(const SbName & partname, const SbName & nodename, SbBool anypart = 1, SbBool onlyifdefault = 1) [protected], [virtual]

Same exact protected-version-of-setPartAsDefault() deal, same non-leaf and private parts access when anypart is TRUE โ€” except this overload takes a nodename instead of a node pointer. Name-drop instead of handing over the whole node. ๐ŸŽค

See also: setPartAsDefault()

References: SoBase::getNamedBase(), SbName::getString(), SoDebugError::postInfo(), setAnyPartAsDefault(), and SoNode::SoNode().


๐Ÿ’œ SbBool SoInteractionKit::setAnySurrogatePath(const SbName & partname, SoPath * path, SbBool leafcheck = 0, SbBool publiccheck = 0) [protected]

Protected version of setPartAsPath(), so you can set non-leaf and private parts. Again โ€” the private parts of the nodekit. ๐Ÿ™ˆ

("The nice thing about C++ is that only your friends can handle yourprivate parts.")

(The original really wrote it like that, glued together and everything. We are not editing the source's comedy. ๐Ÿ˜ญ)

See also: setPartAsPath()

References: SoType::createInstance(), SoGroup::findChild(), SoBaseKit::getCatalogInstances(), SoNodekitCatalog::getName(), SoBaseKit::getNodekitCatalog(), SoNodekitCatalog::getParentPartNumber(), SbName::getString(), SoBase::getTypeId(), SoNodekitCatalog::isLeaf(), SoBase::isOfType(), SoNodekitCatalog::isPublic(), SoDebugError::postInfo(), SoBaseKit::setPart(), SoBaseKit::SoBaseKit(), SoInteractionKit(), SoNode::SoNode(), and SoSwitch::whichChild.

Referenced by: setPartAsPath().


๐Ÿ”ฅ SbBool SoInteractionKit::setUpConnections(SbBool onoff, SbBool doitalways = 0) [protected], [virtual]

Sets up all internal connections for instances of this class. Everything wired, everything connected, the whole network is online. ๐ŸŒโœจ

๐Ÿซถ Heads up: this method will usually not be of interest to the application programmer โ€” unless you're out here extending the library with new custom nodekits or dragger classes. If that's you, go read the SoBaseKit class documentation. That's your homework. ๐Ÿ“š

Reimplemented from SoBaseKit.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, and SoTranslate2Dragger.

References: SoBaseKit::connectionsSetUp, and SoBaseKit::setUpConnections().

Referenced by: SoInteractionKit().


๐Ÿงš void SoInteractionKit::setDefaultOnNonWritingFields(void) [protected], [virtual]

๐Ÿ’€ (Be aware that this method is unlikely to be of interest to the application programmer who does not want to extend the library with new custom nodekits or draggers. If you indeed are writing extensions, see the information in the SoBaseKit class documentation. Go off, extension author. ๐Ÿ‘‘)

This is a virtual method, and the code in it should call SoField::setDefault() with argument TRUE on part fields that should not be written upon scenegraph export operations. Like, "don't export me, I'm not that girl today." ๐Ÿ’…

This is typically done when:

  1. field value is NULL and part is NULL by default
  2. it is a leaf SoGroup or SoSeparator node with no children
  3. it is a leaf listpart with no children and an SoGroup or SoSeparator container
  4. it is a non-leaf part and it's of SoGroup type and all fields are at their default values

Subclasses should usually override this to do additional settings for new member fields. From the subclass, do remember to call "upwards" to your superclass' setDefaultOnNonWritingFields() method. ๐Ÿ’…

Reimplemented from SoBaseKit.

Reimplemented in SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, and SoTransformerDragger.

References boundingBoxCaching, SoBaseKit::getCatalogInstances(), SbList< Type >::getLength(), getNodekitCatalog(), SoBase::getTypeId(), SoNodekitCatalog::isLeaf(), pickCulling, renderCaching, renderCulling, SoBaseKit::setDefaultOnNonWritingFields(), and SoNode::SoNode().

Referenced by SoDragger::setDefaultOnNonWritingFields().


  • void SoInteractionKit::fieldSensorCB(void * d, SoSensor * s) [static], [protected] โ€” okay bestie, this one's internal-internal, like the library's group chat you're not in. This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. ๐Ÿ™ˆ

Referenced by SoInteractionKit().

  • void SoInteractionKit::connectSeparatorFields(SoSeparator * dest, SbBool onOff) [protected] โ€” Obsoleted in Coin. ๐Ÿ’€ She's giving legacy, she's giving "we don't do this anymore."

References SoDebugError::postWarning().

โœจ Member Data Documentation โœจ

  • SoSFEnum SoInteractionKit::renderCaching โ€” controls the value of the SoSeparator::renderCaching field in the SoInteractionKit catalog's topSeparator instance. ๐ŸŽ€

See documentation of SoSeparator::renderCaching.

Referenced by setDefaultOnNonWritingFields(), and SoInteractionKit().

  • SoSFEnum SoInteractionKit::boundingBoxCaching โ€” controls the value of the SoSeparator::boundingBoxCaching field in the SoInteractionKit catalog's topSeparator instance. ๐Ÿ“ฆโœจ

See documentation of SoSeparator::boundingBoxCaching.

Referenced by setDefaultOnNonWritingFields(), and SoInteractionKit().

  • SoSFEnum SoInteractionKit::renderCulling โ€” controls the value of the SoSeparator::renderCulling field in the SoInteractionKit catalog's topSeparator instance. ๐Ÿ‘‘

See documentation of SoSeparator::renderCulling.

Referenced by setDefaultOnNonWritingFields(), and SoInteractionKit().

  • SoSFEnum SoInteractionKit::pickCulling โ€” controls the value of the SoSeparator::pickCulling field in the SoInteractionKit catalog's topSeparator instance. ๐ŸŽฏ

See documentation of SoSeparator::pickCulling.

Referenced by setDefaultOnNonWritingFields(), and SoInteractionKit().

  • SoFieldSensor* SoInteractionKit::fieldSensor [protected] โ€” Obsoleted in Coin. ๐Ÿซ 
  • SoSeparator* SoInteractionKit::oldTopSep [protected] โ€” Obsoleted in Coin. ๐Ÿซ 

๐ŸŒˆ Author ๐ŸŒˆ

Generated automatically by Doxygen for Coin from the source code. Not me writing it by hand, the robots did that part. ๐Ÿค–๐Ÿ’–


okay that's the whole page bestie, we literally made it to the end ๐ŸŽ‰ Coin, Version 2.5.0, and this SoInteractionKit(3) page was dated right there with it โ€” go forth and build nodekits, you absolute icon ๐Ÿ’…๐Ÿฆ‹โญ

๐Ÿ“ฆ where this page comes from