SoLightKit(3)

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

<h1>πŸ’– SoLightKit(3) πŸ’–</h1>

Library Functions Manual ✨ the SoLightKit era

okay bestie, sit down, hydrate, and let me tell you about SoLightKit β€” it's a library function and it's lowkey iconic πŸŽ€


✨ NAME ✨

SoLightKit β€” the SoLightKit class. It's giving kit. And what's in this kit, you ask? 🫢

  • a transform
  • a light
  • and a shape or a subgraph

that's it, that's the whole vibe πŸ’… a little bundle of three things, all wrapped up together, main character energy fr fr 🌸

no cap, it really is just those three: transform, light, and then shape or subgraph. pick your fighter for that last slot πŸ‘‘

more coming, stay tuned, don't go anywhere πŸ¦‹πŸ’œ

✨ SYNOPSIS ✨

Okay bestie, breathe. This is the part where the page just dumps every single thing this class and its whole ancestry can do, and honestly? It's giving royal family tree. πŸ’…

#include <Inventor/nodekits/SoLightKit.h>

Inherits SoBaseKit.

πŸŽ€ Public Member Functions πŸŽ€

These are the ones that are like, yours, the fresh new ones this class brings to the group chat:

  • virtual SoType getTypeId (void) const β€” hands you the runtime type id, the lil ID card this thing carries around πŸͺͺ
  • virtual const SoNodekitCatalog * getNodekitCatalog (void) const β€” coughs up the nodekit catalog so you can see how all the parts fit together
  • SoLightKit (void) β€” the constructor, aka where the magic starts, no cap ✨

πŸ’– Public Member Functions inherited from SoBaseKit

The stuff it got from its parent, still fully yours to use:

  • SoBaseKit (void) β€” the base kit constructor
  • virtual SoNode * getPart (const SbName &partname, SbBool makeifneeded) β€” grab one part by name, and tell it whether it should build the part on the spot if it doesn't exist yet
  • SbString getPartString (const SoBase *part) β€” reverse lookup: give it a part, get the name back
  • virtual SoNodeKitPath * createPathToPart (const SbName &partname, SbBool makeifneeded, const SoPath *pathtoextend=NULL) β€” builds a path straight to a part, optionally extending a path you already have
  • virtual SbBool setPart (const SbName &partname, SoNode *from) β€” swap a part out for another node
  • SbBool set (const char *namevaluepairliststring) β€” set a bunch of fields from one string of name/value pairs
  • SbBool set (const char *partnamestring, const char *parameterstring) β€” set a part using a part-name string plus a parameter string
  • virtual void doAction (SoAction *action) β€” runs the generic action machinery
  • virtual void callback (SoCallbackAction *action) β€” handles a SoCallbackAction
  • virtual void GLRender (SoGLRenderAction *action) β€” does the actual rendering pass 🎨
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” reports the bounding box
  • virtual void getMatrix (SoGetMatrixAction *action) β€” reports the transformation matrix
  • virtual void handleEvent (SoHandleEventAction *action) β€” deals with input events
  • virtual void rayPick (SoRayPickAction *action) β€” ray picking, the classic "what did I click on" move
  • virtual void search (SoSearchAction *action) β€” search traversal
  • virtual void write (SoWriteAction *action) β€” writes itself out to a file
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” counts primitives, for the stats girlies
  • virtual SoChildList * getChildren (void) const β€” hands over the child list
  • void printDiagram (void) β€” prints a diagram of the kit's structure, lowkey a vibe 🌸
  • void printSubDiagram (const SbName &rootname, int level) β€” prints a sub-diagram starting from rootname at level
  • void printTable (void) β€” prints the whole table of parts
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0) β€” registers a write reference, isfromfield defaulting to 0
  • SbBool forceChildDrivenWriteRefs (SoOutput *out) β€” forces child-driven write references

πŸ¦‹ Public Member Functions inherited from SoNode

  • void setOverride (const SbBool state) β€” flip override mode on or off
  • SbBool isOverride (void) const β€” are we in override mode rn?
  • void setNodeType (const NodeType type) β€” set the node type
  • NodeType getNodeType (void) const β€” read the node type back
  • virtual SoNode * copy (SbBool copyconnections=0) const β€” copies the node, copyconnections defaults to 0
  • virtual SbBool affectsState (void) const β€” does this node mess with the traversal state?
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” render, below-path flavour
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” render, in-path flavour
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” render, off-path flavour
  • virtual void pick (SoPickAction *action) β€” the generic pick
  • virtual void audioRender (SoAudioRenderAction *action) β€” audio rendering πŸ”Š
  • virtual void grabEventsSetup (void) β€” set up event grabbing
  • virtual void grabEventsCleanup (void) β€” tear that event grabbing back down
  • virtual void startNotify (void) β€” kicks off notification
  • virtual void notify (SoNotList *l) β€” propagates a notification
  • uint32_t getNodeId (void) const β€” the node's unique id
  • virtual void writeInstance (SoOutput *out) β€” writes this instance out
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copies through the connection

🌈 Public Member Functions inherited from SoFieldContainer

  • void setToDefaults (void) β€” reset every field to its default
  • SbBool hasDefaultValues (void) const β€” is everything still default?
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” compare fields against another container
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0) β€” copy fields from another container, copyconnections defaults to 0
  • SbBool set (const char *const fielddata) β€” set fields from a data string
  • void get (SbString &fielddata) β€” read the field data out into a string
  • virtual int getFields (SoFieldList &l) const β€” fill a list with the fields
  • virtual int getAllFields (SoFieldList &l) const β€” fill a list with all the fields
  • virtual SoField * getField (const SbName &name) const β€” look up a field by name
  • virtual SoField * getEventIn (const SbName &name) const β€” look up an event in by name
  • virtual SoField * getEventOut (const SbName &name) const β€” look up an event out by name
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” reverse lookup: field β†’ name
  • SbBool enableNotify (const SbBool flag) β€” turn notifications on or off
  • SbBool isNotifyEnabled (void) const β€” are notifications on?
  • SbBool set (const char *fielddata, SoInput *in) β€” set fields from data, using an SoInput
  • void get (SbString &fielddata, SoOutput *out) β€” read field data out, using an SoOutput
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” sanity-checks a new field value
  • SbBool getIsBuiltIn (void) const β€” is this thing built in?
  • void setUserData (void *userdata) const β€” stash your own lil pointer on it
  • void * getUserData (void) const β€” get that pointer back

πŸ’œ Public Member Functions inherited from SoBase

  • void ref (void) const β€” bump the ref count
  • void unref (void) const β€” drop the ref count
  • void unrefNoDelete (void) const β€” drop the ref count without deleting
  • int32_t getRefCount (void) const β€” what's the ref count rn?
  • void touch (void) β€” touch it, forces a notification
  • SbBool isOfType (SoType type) const β€” is it this type?
  • virtual SbName getName (void) const β€” what's its name?
  • virtual void setName (const SbName &newname) β€” rename it
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” add an auditor
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” remove an auditor
  • const SoAuditorList & getAuditors (void) const β€” hand over the auditor list
  • SbBool shouldWrite (void) β€” should this be written out?
  • void assertAlive (void) const β€” asserts that it's alive, like a little pulse check πŸ’€

πŸ‘‘ Static Public Member Functions πŸ‘‘

  • static SoType getClassTypeId (void) β€” the class-level type id
  • static const SoNodekitCatalog * getClassNodekitCatalog (void) β€” the class-level nodekit catalog
  • static void initClass (void) β€” run this to set the class up

🌸 Static Public Member Functions inherited from SoBaseKit

  • static SoType getClassTypeId (void) β€” class type id, base-kit edition
  • static void initClass (void) β€” init the base kit class
  • static const SoNodekitCatalog * getClassNodekitCatalog (void) β€” class nodekit catalog, base-kit edition
  • static SbBool isSearchingChildren (void) β€” is it currently searching children?
  • static void setSearchingChildren (const SbBool newval) β€” set that searching-children flag to newval
  • static SoNode * typeCheck (const SbName &partname, const SoType &parttype, SoNode *node) β€” type-checks a node against a part name and part type

⭐ Static Public Member Functions inherited from SoNode

  • static uint32_t getCompatibilityTypes (const SoType &nodetype) β€” grabs the compatibility type bitmask
  • static SoType getClassTypeId (void) β€” class type id, node edition
  • static SoNode * getByName (const SbName &name) β€” find a node by name
  • static int getByName (const SbName &name, SoNodeList &l) β€” find nodes by name, fill a list, return a count
  • static void initClass (void) β€” init the node class
  • static void initClasses (void) β€” init all the classes, plural energy
  • static uint32_t getNextNodeId (void) β€” hand out the next node id
  • static int getActionMethodIndex (const SoType type) β€” the action method index for a type
  • static void getBoundingBoxS (SoAction *action, SoNode *node) β€” static bounding-box handler
  • static void GLRenderS (SoAction *action, SoNode *node) β€” static render handler
  • static void callbackS (SoAction *action, SoNode *node) β€” static callback handler
  • static void getMatrixS (SoAction *action, SoNode *node) β€” static matrix handler
  • static void handleEventS (SoAction *action, SoNode *node) β€” static event handler
  • static void pickS (SoAction *action, SoNode *node) β€” static pick handler
  • static void rayPickS (SoAction *action, SoNode *node) β€” static ray-pick handler
  • static void searchS (SoAction *action, SoNode *node) β€” static search handler
  • static void writeS (SoAction *action, SoNode *node) β€” static write handler
  • static void audioRenderS (SoAction *action, SoNode *node) β€” static audio-render handler
  • static void getPrimitiveCountS (SoAction *action, SoNode *node) β€” static primitive-count handler

🫢 Static Public Member Functions inherited from SoFieldContainer

  • static void initClass (void) β€” init the field-container class
  • static SoType getClassTypeId (void) β€” class type id, field-container edition
  • static void initCopyDict (void) β€” init the copy dictionary
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” register an original/copy pair
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” check the copy dict for an original
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” find the copy, respecting copyconnections
  • static void copyDone (void) β€” wrap up the copying

🧚 Static Public Member Functions inherited from SoBase

  • static void initClass (void) β€” init the base class
  • static SoType getClassTypeId (void) β€” class type id, base edition
  • static void addName (SoBase *const base, const char *const name) β€” give a base a name
  • static void removeName (SoBase *const base, const char *const name) β€” take that name away
  • static void incrementCurrentWriteCounter (void) β€” bump the write counter
  • static void decrementCurrentWriteCounter (void) β€” drop the write counter
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” find a named base of a given type
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” find named bases into a list, return a count
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype) β€” read a base in
  • static void setInstancePrefix (const SbString &c) β€” set the instance prefix
  • static void setTraceRefs (SbBool trace) β€” toggle ref tracing
  • static SbBool getTraceRefs (void) β€” is ref tracing on?
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” wire up a route between nodes and fields
  • static SbBool readRoute (SoInput *in) β€” read a route in

πŸ”₯ Protected Member Functions πŸ”₯

The family-only zone, but I'm telling you everything anyway, bestie:

  • virtual const SoFieldData * getFieldData (void) const β€” grab the field data
  • virtual ~SoLightKit () β€” the destructor, protect ya neck

πŸ’… Protected Member Functions inherited from SoBaseKit

  • virtual ~SoBaseKit () β€” base-kit destructor
  • virtual SoNode * addToCopyDict (void) const β€” add itself to the copy dictionary
  • virtual void copyContents (const SoFieldContainer *fromfc, SbBool copyconnections) β€” copy the contents over, respecting copyconnections
  • SoGroup * getContainerNode (const SbName &listname, SbBool makeifneeded=1) β€” get the container node for a list, makeifneeded defaults to 1
  • virtual SoNode * getAnyPart (const SbName &partname, SbBool makeifneeded, SbBool leafcheck=0, SbBool publiccheck=0) β€” get any part, with leafcheck and publiccheck both defaulting to 0
  • virtual SoNodeKitPath * createPathToAnyPart (const SbName &partname, SbBool makeifneeded, SbBool leafcheck=0, SbBool publiccheck=0, const SoPath *pathtoextend=NULL) β€” path to any part, same leafcheck / publiccheck defaults of 0, plus pathtoextend defaulting to NULL
  • virtual SbBool setAnyPart (const SbName &partname, SoNode *from, SbBool anypart=1) β€” set any part, anypart defaults to 1
  • void createNodekitPartsList (void) β€” build the nodekit parts list
  • void createFieldList (void) β€” build the field list
  • virtual void createDefaultParts (void) β€” create all the default parts
  • const SoNodekitParts * getNodekitPartsList (void) const β€” hand over the nodekit parts list
  • const SbList< SoSFNode * > & getCatalogInstances (void) const β€” hand over the catalog instances list
  • void catalogError (void) β€” throws the catalog error, dramatic but necessary 😭
  • virtual SbBool setUpConnections (SbBool onoff, SbBool doitalways=0) β€” set up or tear down connections, doitalways defaults to 0
  • virtual SbBool readInstance (SoInput *in, unsigned short flags) β€” read an instance in
  • virtual void setDefaultOnNonWritingFields (void) β€” set defaults on non-writing fields
  • void countMyFields (SoOutput *out) β€” count the fields
  • virtual SbBool setPart (const int partNum, SoNode *node) β€” set a part by its number

🌈 Protected Member Functions inherited from SoNode

  • SoNode (void) β€” the node constructor
  • virtual ~SoNode () β€” the node destructor

πŸ“ Protected Member Functions inherited from SoFieldContainer

  • SoFieldContainer (void) β€” the field-container constructor
  • ~SoFieldContainer () β€” the field-container destructor

πŸŽ€ Protected Member Functions inherited from SoBase

  • SoBase (void) β€” the base constructor
  • virtual ~SoBase () β€” the base destructor
  • virtual void destroy (void) β€” destroy it
  • SbBool hasMultipleWriteRefs (void) const β€” does it have multiple write refs?
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” write the header
  • void writeFooter (SoOutput *out) const β€” write the footer
  • virtual const char * getFileFormatName (void) const β€” what's the file format name?

✨ Static Protected Member Functions ✨

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void) β€” pointer to the class nodekit catalog

πŸ’œ Static Protected Member Functions inherited from SoBaseKit

  • static const SoFieldData ** getFieldDataPtr (void) β€” field data pointer, base-kit edition
  • static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void) β€” class nodekit catalog pointer, base-kit edition

πŸ¦‹ Static Protected Member Functions inherited from SoNode

  • static const SoFieldData ** getFieldDataPtr (void) β€” field data pointer, node edition
  • static void setNextActionMethodIndex (int index) β€” set the next action method index
  • static int getNextActionMethodIndex (void) β€” get the next action method index
  • static void incNextActionMethodIndex (void) β€” increment that index
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” set compatibility types for a node type

🌸 Static Protected Member Functions inherited from SoBase

  • static uint32_t getCurrentWriteCounter (void) β€” what's the current write counter?
  • static void staticDataLock (void) β€” lock the static data πŸ”’
  • static void staticDataUnlock (void) β€” unlock the static data πŸ”“

πŸ’– Protected Attributes πŸ’–

The actual data members this class is guarding, and yes they're all SoSFNode:

  • SoSFNode icon β€” the icon part
  • SoSFNode iconSeparator β€” the separator around the icon
  • SoSFNode light β€” the light itself, the whole point of the kit πŸ’‘
  • SoSFNode transform β€” the transform part
  • SoSFNode transformGroup β€” the transform group

🫢 Protected Attributes inherited from SoBaseKit

  • SoSFNode callbackList β€” the callback list node
  • SoChildList * children β€” pointer to the child list
  • SbBool connectionsSetUp β€” flag for whether the connections are set up

⭐ Protected Attributes inherited from SoNode

  • uint32_t uniqueId β€” the node's unique id

🧚 Protected Attributes inherited from SoFieldContainer

  • SbBool isBuiltIn β€” is it built in?

πŸ‘‘ Additional Inherited Members πŸ‘‘

Public Types inherited from SoNode

The NodeType enum, and bestie it's a whole mood board of versions:

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
    }

Protected Types inherited from SoBase

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

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, also starting at 0

πŸ’– Detailed Description πŸ’–

okay so bestie, the SoLightKit class is literally a whole kit with a transform, a light and a shape or subgraph. it's giving ✨main character energy✨.

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

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

if u wanna know about how that prints, SoBaseKit::printDiagram() has the tea β˜•

Detailed information on catalog parts:

       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 for the formatting deets, SoBaseKit::printTable() is right there πŸ’…


πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

SoLightKit::SoLightKit (void )

Constructor. it's the constructor bestie, it makes the thing. it references SoLightKit(), and SoNode::SoNode(). and it's referenced by getFieldData(), and SoLightKit().

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

Destructor. protected + virtual, so it's lowkey special.


πŸ” Member Function Documentation πŸ”

SoType SoLightKit::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
         }
       }

so if ur an application programmer wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. that'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 information 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]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoBaseKit.

References SoLightKit().

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

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

Reimplemented from SoBaseKit.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code.


and that's the tea β˜• this manual page is SoLightKit(3) from Coin, version 2.5.0. stay slaying bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from