SoLightKit(3)

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

πŸ¦‹ SoLightKit(3) β€” Library Functions Manual πŸ¦‹

Part 1 of 2, bestie β€” more is coming, don't touch that dial. πŸ’–

✨ NAME ✨

SoLightKit β€” okay so picture this: a whole kit that hands you a transform, a light, and a shape or subgraph. It's giving one-stop glow-up station. βœ¨πŸ’‘


🌸 SYNOPSIS 🌸

#include <Inventor/nodekits/SoLightKit.h>

Inherits SoBaseKit. Yes bestie, that's the parent β€” and it came with a lot of inherited slay. πŸ’…

πŸ’– Public Member Functions πŸ’–

  • virtual SoType getTypeId (void) const β€” the type ID moment, iconic as always.
  • virtual const SoNodekitCatalog * getNodekitCatalog (void) const β€” grab the nodekit catalog, no cap.
  • SoLightKit (void) β€” constructor, the main character entrance. πŸŽ€

🫢 Public Member Functions inherited from SoBaseKit 🫢

  • SoBaseKit (void) β€” inherited, still valid, still part of the family.
  • virtual SoNode * getPart (const SbName &partname, SbBool makeifneeded) β€” inherited from SoBaseKit.
  • SbString getPartString (const SoBase *part) β€” inherited from SoBaseKit.
  • virtual SoNodeKitPath * createPathToPart (const SbName &partname, SbBool makeifneeded, const SoPath *pathtoextend=NULL) β€” inherited from SoBaseKit.
  • virtual SbBool setPart (const SbName &partname, SoNode *from) β€” inherited from SoBaseKit.
  • SbBool set (const char *namevaluepairliststring) β€” inherited from SoBaseKit.
  • SbBool set (const char *partnamestring, const char *parameterstring) β€” inherited from SoBaseKit.
  • virtual void doAction (SoAction *action) β€” inherited from SoBaseKit.
  • virtual void callback (SoCallbackAction *action) β€” inherited from SoBaseKit.
  • virtual void GLRender (SoGLRenderAction *action) β€” inherited from SoBaseKit.
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” inherited from SoBaseKit.
  • virtual void getMatrix (SoGetMatrixAction *action) β€” inherited from SoBaseKit.
  • virtual void handleEvent (SoHandleEventAction *action) β€” inherited from SoBaseKit.
  • virtual void rayPick (SoRayPickAction *action) β€” inherited from SoBaseKit.
  • virtual void search (SoSearchAction *action) β€” inherited from SoBaseKit.
  • virtual void write (SoWriteAction *action) β€” inherited from SoBaseKit.
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” inherited from SoBaseKit.
  • virtual SoChildList * getChildren (void) const β€” inherited from SoBaseKit.
  • void printDiagram (void) β€” inherited from SoBaseKit.
  • void printSubDiagram (const SbName &rootname, int level) β€” inherited from SoBaseKit.
  • void printTable (void) β€” inherited from SoBaseKit.
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE) β€” inherited from SoBaseKit.
  • SbBool forceChildDrivenWriteRefs (SoOutput *out) β€” inherited from SoBaseKit.

🌈 Public Member Functions inherited from SoNode 🌈

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

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

  • void setToDefaults (void) β€” inherited from SoFieldContainer.
  • SbBool hasDefaultValues (void) const β€” inherited from SoFieldContainer.
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” inherited from SoFieldContainer.
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE) β€” inherited from SoFieldContainer.
  • SbBool set (const char *const fielddata) β€” inherited from SoFieldContainer.
  • void get (SbString &fielddata) β€” inherited from SoFieldContainer.
  • virtual int getFields (SoFieldList &l) const β€” inherited from SoFieldContainer.
  • virtual int getAllFields (SoFieldList &l) const β€” inherited from SoFieldContainer.
  • virtual SoField * getField (const SbName &name) const β€” inherited from SoFieldContainer.
  • virtual SoField * getEventIn (const SbName &name) const β€” inherited from SoFieldContainer.
  • virtual SoField * getEventOut (const SbName &name) const β€” inherited from SoFieldContainer.
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” inherited from SoFieldContainer.
  • SbBool enableNotify (const SbBool flag) β€” inherited from SoFieldContainer.
  • SbBool isNotifyEnabled (void) const β€” inherited from SoFieldContainer.
  • SbBool set (const char *fielddata, SoInput *input) β€” inherited from SoFieldContainer.
  • void get (SbString &fielddata, SoOutput *out) β€” inherited from SoFieldContainer.
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” inherited from SoFieldContainer.
  • SbBool getIsBuiltIn (void) const β€” inherited from SoFieldContainer.
  • virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) const β€” inherited from SoFieldContainer.
  • void setUserData (void *userdata) const β€” inherited from SoFieldContainer.
  • void * getUserData (void) const β€” inherited from SoFieldContainer.

πŸŽ€ Public Member Functions inherited from SoBase πŸŽ€

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

⭐ Static Public Member Functions ⭐

  • static SoType getClassTypeId (void) β€” static public, still iconic.
  • static const SoNodekitCatalog * getClassNodekitCatalog (void) β€” static public.
  • static void initClass (void) β€” static public.

🌟 Static Public Member Functions inherited from SoBaseKit 🌟

  • static SoType getClassTypeId (void) β€” inherited from SoBaseKit.
  • static void initClass (void) β€” inherited from SoBaseKit.
  • static const SoNodekitCatalog * getClassNodekitCatalog (void) β€” inherited from SoBaseKit.
  • static SbBool isSearchingChildren (void) β€” inherited from SoBaseKit.
  • static void setSearchingChildren (const SbBool newval) β€” inherited from SoBaseKit.

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

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

πŸ’– Static Public Member Functions inherited from SoFieldContainer πŸ’–

  • static void initClass (void) β€” inherited from SoFieldContainer.
  • static SoType getClassTypeId (void) β€” inherited from SoFieldContainer.
  • static void cleanupClass (void) β€” inherited from SoFieldContainer.
  • static void initCopyDict (void) β€” inherited from SoFieldContainer.
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” inherited from SoFieldContainer.
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” inherited from SoFieldContainer.
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” inherited from SoFieldContainer.
  • static void copyDone (void) β€” inherited from SoFieldContainer.

πŸ¦‹ Static Public Member Functions inherited from SoBase πŸ¦‹

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

πŸ”’ Protected Member Functions πŸ”’

  • virtual const SoFieldData * getFieldData (void) const β€” protected, so handle with care, bestie.
  • virtual ~SoLightKit () β€” destructor, protected.

πŸ’… Protected Member Functions inherited from SoBaseKit πŸ’…

  • virtual ~SoBaseKit () β€” inherited from SoBaseKit.
  • virtual SoNode * addToCopyDict (void) const β€” inherited from SoBaseKit.
  • virtual void copyContents (const SoFieldContainer *fromfc, SbBool copyconnections) β€” inherited from SoBaseKit.
  • SoGroup * getContainerNode (const SbName &listname, SbBool makeifneeded=TRUE) β€” inherited from SoBaseKit.
  • virtual SoNode * getAnyPart (const SbName &partname, SbBool makeifneeded, SbBool leafcheck=FALSE, SbBool publiccheck=FALSE) β€” inherited from SoBaseKit.
  • virtual SoNodeKitPath * createPathToAnyPart (const SbName &partname, SbBool makeifneeded, SbBool leafcheck=FALSE, SbBool publiccheck=FALSE, const SoPath *pathtoextend=NULL) β€” inherited from SoBaseKit.
  • virtual SbBool setAnyPart (const SbName &partname, SoNode *from, SbBool anypart=TRUE) β€” inherited from SoBaseKit.
  • void createNodekitPartsList (void) β€” inherited from SoBaseKit.
  • void createFieldList (void) β€” inherited from SoBaseKit.
  • virtual void createDefaultParts (void) β€” inherited from SoBaseKit.
  • const SoNodekitParts * getNodekitPartsList (void) const β€” inherited from SoBaseKit.
  • const SbList< SoSFNode * > & getCatalogInstances (void) const β€” inherited from SoBaseKit.
  • void catalogError (void) β€” inherited from SoBaseKit.
  • virtual SbBool setUpConnections (SbBool onoff, SbBool doitalways=FALSE) β€” inherited from SoBaseKit.
  • virtual SbBool readInstance (SoInput *in, unsigned short flags) β€” inherited from SoBaseKit.
  • virtual void setDefaultOnNonWritingFields (void) β€” inherited from SoBaseKit.
  • void countMyFields (SoOutput *out) β€” inherited from SoBaseKit.
  • virtual SbBool setPart (const int partNum, SoNode *node) β€” inherited from SoBaseKit.

πŸ›‘οΈ Protected Member Functions inherited from SoNode πŸ›‘οΈ

  • SoNode (void) β€” inherited from SoNode.
  • virtual ~SoNode () β€” inherited from SoNode.

🧚 Protected Member Functions inherited from SoFieldContainer 🧚

  • SoFieldContainer (void) β€” inherited from SoFieldContainer.
  • virtual ~SoFieldContainer () β€” inherited from SoFieldContainer.

🌸 Protected Member Functions inherited from SoBase 🌸

  • SoBase (void) β€” inherited from SoBase.
  • virtual ~SoBase () β€” inherited from SoBase.
  • virtual void destroy (void) β€” inherited from SoBase.
  • SbBool hasMultipleWriteRefs (void) const β€” inherited from SoBase.
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” inherited from SoBase.
  • void writeFooter (SoOutput *out) const β€” inherited from SoBase.
  • virtual const char * getFileFormatName (void) const β€” inherited from SoBase.

✨ Static Protected Member Functions ✨

  • static const SoFieldData ** getFieldDataPtr (void) β€” static protected.
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void) β€” static protected.

πŸ’« Static Protected Member Functions inherited from SoBaseKit πŸ’«

  • static const SoFieldData ** getFieldDataPtr (void) β€” inherited from SoBaseKit.
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void) β€” inherited from SoBaseKit.

🌈 Static Protected Member Functions inherited from SoNode 🌈

  • static const SoFieldData ** getFieldDataPtr (void) β€” inherited from SoNode.
  • static void setNextActionMethodIndex (int index) β€” inherited from SoNode.
  • static int getNextActionMethodIndex (void) β€” inherited from SoNode.
  • static void incNextActionMethodIndex (void) β€” inherited from SoNode.
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” inherited from SoNode.

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

  • static uint32_t getCurrentWriteCounter (void) β€” inherited from SoBase.
  • static void staticDataLock (void) β€” inherited from SoBase.
  • static void staticDataUnlock (void) β€” inherited from SoBase.

πŸŽ€ Protected Attributes πŸŽ€

  • SoSFNode icon β€” protected attribute, part of the inner circle.
  • SoSFNode iconSeparator β€” protected attribute.
  • SoSFNode light β€” protected attribute.
  • SoSFNode transform β€” protected attribute.
  • SoSFNode transformGroup β€” protected attribute.

πŸ’– Protected Attributes inherited from SoBaseKit πŸ’–

  • SoSFNode callbackList β€” inherited from SoBaseKit.
  • SoChildList * children β€” inherited from SoBaseKit.
  • SbBool connectionsSetUp β€” inherited from SoBaseKit.

🌟 Protected Attributes inherited from SoNode 🌟

  • uint32_t uniqueId β€” inherited from SoNode.

🌸 Protected Attributes inherited from SoFieldContainer 🌸

  • SbBool isBuiltIn β€” inherited from SoFieldContainer.

Additional Inherited Members πŸ’–

okay so before we get into the main character energy of SoLightKit, let's give a shoutout to the stuff it inherited, because bestie, it's giving "I got it from my ancestors" and we love that for it. πŸ’…

Public Types inherited from SoNode ✨

so SoNode passed down this enum called NodeType, and it's literally a whole mood board of versions. no cap, here's the exact list:

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,
    COIN_3_0 = 0x8000, INVENTOR_6_0 = 0x10000 }

like, that's a lot of versions, but we respect the hustle. 🫢

Protected Types inherited from SoBase πŸ¦‹

and SoBase gave us BaseFlags, which is short but iconic:

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

lowkey just two flags, but they matter, iykyk. πŸ’œ

Static Protected Attributes inherited from SoNode 🌸

then SoNode also has these static protected attributes, and they're just sitting there being all static and protected:

static uint32_t nextUniqueId = 1
static int nextActionMethodIndex = 0

periodt. ✨


Detailed Description πŸ’…

okay so the SoLightKit class? it's literally a kit that provides a transform, a light and a shape or subgraph. it's giving "I contain multitudes" and honestly, same. πŸ’–

here's the node kit structure, with new entries versus the parent class marked with an arrow prefix:

       CLASS SoLightKit
       -->"this"
             "callbackList"
       -->   "transformGroup"
       -->      "transform"
       -->      "light"
       -->      "iconSeparator"
       -->         "icon"

(if you wanna know more about the output formatting, check out SoBaseKit::printDiagram() β€” it's the plug. πŸ”Œ)

and here's the detailed info on catalog parts, no cap:

       CLASS SoLightKit
       PVT   "this",  SoLightKit  ---
             "callbackList",  SoNodeKitListPart [ SoCallback, SoEventCallback ]
       PVT   "transformGroup",  SoTransformSeparator  ---
             "transform",  SoTransform  ---
             "light",  SoLight  --- , (default type = SoDirectionalLight)
       PVT   "iconSeparator",  SoSeparator  ---
             "icon",  SoNode  --- , (default type = SoCube)

(and again, for the formatting tea, see SoBaseKit::printTable() β€” it's giving organized. πŸ“‹)


Constructor & Destructor Documentation πŸŽ€

SoLightKit::SoLightKit (void )

this is the constructor. it constructs. it's the birth of your kit. slay. πŸ‘‘

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

and this is the destructor. it's protected and virtual, so it's giving "I clean up after myself, but only in the right circles." πŸ’…


Member Function Documentation πŸ“š

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

so this one returns the type identification of an object derived from a class inheriting SoBase. it's used for run-time type checking and "downward" casting. basically it's the "who dis?" of the Coin world. πŸ’β€β™€οΈ

here's a usage example, exactly as it appears:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
}

now, for all my application programmers out there who wanna extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. it's 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 info on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

reimplemented from SoBaseKit. πŸ”₯

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

this one returns a pointer to the class-wide field data storage object for this instance. if no fields are present, it returns NULL. so basically it's the "do we have fields? maybe not" energy. πŸ™ˆ

reimplemented from SoBaseKit. πŸ’–

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

and this one returns the nodekit catalog which defines the layout of this class' kit. it's the blueprint, the map, the whole vibe. πŸ—ΊοΈ

reimplemented from SoBaseKit. ✨


Author ✍️

generated automatically by Doxygen for Coin from the source code. so you know it's official. no ghostwriting here, just robots doing their thing. πŸ€–


and that's a wrap on this page, bestie! this was brought to you by Coin, version 3.1.3, and the page itself is SoLightKit(3). no date on the footer, but the vibes are timeless. mwah πŸ’‹

πŸ“¦ where this page comes from