SoLightKit(3)
<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 togetherSoLightKit (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 constructorvirtual 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 yetSbString getPartString (const SoBase *part)β reverse lookup: give it a part, get the name backvirtual SoNodeKitPath * createPathToPart (const SbName &partname, SbBool makeifneeded, const SoPath *pathtoextend=NULL)β builds a path straight to a part, optionally extending a path you already havevirtual SbBool setPart (const SbName &partname, SoNode *from)β swap a part out for another nodeSbBool set (const char *namevaluepairliststring)β set a bunch of fields from one string of name/value pairsSbBool set (const char *partnamestring, const char *parameterstring)β set a part using a part-name string plus a parameter stringvirtual void doAction (SoAction *action)β runs the generic action machineryvirtual void callback (SoCallbackAction *action)β handles aSoCallbackActionvirtual void GLRender (SoGLRenderAction *action)β does the actual rendering pass π¨virtual void getBoundingBox (SoGetBoundingBoxAction *action)β reports the bounding boxvirtual void getMatrix (SoGetMatrixAction *action)β reports the transformation matrixvirtual void handleEvent (SoHandleEventAction *action)β deals with input eventsvirtual void rayPick (SoRayPickAction *action)β ray picking, the classic "what did I click on" movevirtual void search (SoSearchAction *action)β search traversalvirtual void write (SoWriteAction *action)β writes itself out to a filevirtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β counts primitives, for the stats girliesvirtual SoChildList * getChildren (void) constβ hands over the child listvoid 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 levelvoid printTable (void)β prints the whole table of partsvirtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)β registers a write reference, isfromfield defaulting to0SbBool forceChildDrivenWriteRefs (SoOutput *out)β forces child-driven write references
π¦ Public Member Functions inherited from SoNode
void setOverride (const SbBool state)β flip override mode on or offSbBool isOverride (void) constβ are we in override mode rn?void setNodeType (const NodeType type)β set the node typeNodeType getNodeType (void) constβ read the node type backvirtual SoNode * copy (SbBool copyconnections=0) constβ copies the node, copyconnections defaults to0virtual SbBool affectsState (void) constβ does this node mess with the traversal state?virtual void GLRenderBelowPath (SoGLRenderAction *action)β render, below-path flavourvirtual void GLRenderInPath (SoGLRenderAction *action)β render, in-path flavourvirtual void GLRenderOffPath (SoGLRenderAction *action)β render, off-path flavourvirtual void pick (SoPickAction *action)β the generic pickvirtual void audioRender (SoAudioRenderAction *action)β audio rendering πvirtual void grabEventsSetup (void)β set up event grabbingvirtual void grabEventsCleanup (void)β tear that event grabbing back downvirtual void startNotify (void)β kicks off notificationvirtual void notify (SoNotList *l)β propagates a notificationuint32_t getNodeId (void) constβ the node's unique idvirtual void writeInstance (SoOutput *out)β writes this instance outvirtual SoFieldContainer * copyThroughConnection (void) constβ copies through the connection
π Public Member Functions inherited from SoFieldContainer
void setToDefaults (void)β reset every field to its defaultSbBool hasDefaultValues (void) constβ is everything still default?SbBool fieldsAreEqual (const SoFieldContainer *container) constβ compare fields against another containervoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)β copy fields from another container, copyconnections defaults to0SbBool set (const char *const fielddata)β set fields from a data stringvoid get (SbString &fielddata)β read the field data out into a stringvirtual int getFields (SoFieldList &l) constβ fill a list with the fieldsvirtual int getAllFields (SoFieldList &l) constβ fill a list with all the fieldsvirtual SoField * getField (const SbName &name) constβ look up a field by namevirtual SoField * getEventIn (const SbName &name) constβ look up an event in by namevirtual SoField * getEventOut (const SbName &name) constβ look up an event out by nameSbBool getFieldName (const SoField *const field, SbName &name) constβ reverse lookup: field β nameSbBool enableNotify (const SbBool flag)β turn notifications on or offSbBool isNotifyEnabled (void) constβ are notifications on?SbBool set (const char *fielddata, SoInput *in)β set fields from data, using anSoInputvoid get (SbString &fielddata, SoOutput *out)β read field data out, using anSoOutputvirtual SbBool validateNewFieldValue (SoField *field, void *newval)β sanity-checks a new field valueSbBool getIsBuiltIn (void) constβ is this thing built in?void setUserData (void *userdata) constβ stash your own lil pointer on itvoid * getUserData (void) constβ get that pointer back
π Public Member Functions inherited from SoBase
void ref (void) constβ bump the ref countvoid unref (void) constβ drop the ref countvoid unrefNoDelete (void) constβ drop the ref count without deletingint32_t getRefCount (void) constβ what's the ref count rn?void touch (void)β touch it, forces a notificationSbBool isOfType (SoType type) constβ is it this type?virtual SbName getName (void) constβ what's its name?virtual void setName (const SbName &newname)β rename itvoid addAuditor (void *const auditor, const SoNotRec::Type type)β add an auditorvoid removeAuditor (void *const auditor, const SoNotRec::Type type)β remove an auditorconst SoAuditorList & getAuditors (void) constβ hand over the auditor listSbBool 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 idstatic const SoNodekitCatalog * getClassNodekitCatalog (void)β the class-level nodekit catalogstatic 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 editionstatic void initClass (void)β init the base kit classstatic const SoNodekitCatalog * getClassNodekitCatalog (void)β class nodekit catalog, base-kit editionstatic SbBool isSearchingChildren (void)β is it currently searching children?static void setSearchingChildren (const SbBool newval)β set that searching-children flag to newvalstatic 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 bitmaskstatic SoType getClassTypeId (void)β class type id, node editionstatic SoNode * getByName (const SbName &name)β find a node by namestatic int getByName (const SbName &name, SoNodeList &l)β find nodes by name, fill a list, return a countstatic void initClass (void)β init the node classstatic void initClasses (void)β init all the classes, plural energystatic uint32_t getNextNodeId (void)β hand out the next node idstatic int getActionMethodIndex (const SoType type)β the action method index for a typestatic void getBoundingBoxS (SoAction *action, SoNode *node)β static bounding-box handlerstatic void GLRenderS (SoAction *action, SoNode *node)β static render handlerstatic void callbackS (SoAction *action, SoNode *node)β static callback handlerstatic void getMatrixS (SoAction *action, SoNode *node)β static matrix handlerstatic void handleEventS (SoAction *action, SoNode *node)β static event handlerstatic void pickS (SoAction *action, SoNode *node)β static pick handlerstatic void rayPickS (SoAction *action, SoNode *node)β static ray-pick handlerstatic void searchS (SoAction *action, SoNode *node)β static search handlerstatic void writeS (SoAction *action, SoNode *node)β static write handlerstatic void audioRenderS (SoAction *action, SoNode *node)β static audio-render handlerstatic 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 classstatic SoType getClassTypeId (void)β class type id, field-container editionstatic void initCopyDict (void)β init the copy dictionarystatic void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β register an original/copy pairstatic SoFieldContainer * checkCopy (const SoFieldContainer *orig)β check the copy dict for an originalstatic SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β find the copy, respecting copyconnectionsstatic void copyDone (void)β wrap up the copying
π§ Static Public Member Functions inherited from SoBase
static void initClass (void)β init the base classstatic SoType getClassTypeId (void)β class type id, base editionstatic void addName (SoBase *const base, const char *const name)β give a base a namestatic void removeName (SoBase *const base, const char *const name)β take that name awaystatic void incrementCurrentWriteCounter (void)β bump the write counterstatic void decrementCurrentWriteCounter (void)β drop the write counterstatic SoBase * getNamedBase (const SbName &name, SoType type)β find a named base of a given typestatic int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β find named bases into a list, return a countstatic SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)β read a base instatic void setInstancePrefix (const SbString &c)β set the instance prefixstatic void setTraceRefs (SbBool trace)β toggle ref tracingstatic 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 fieldsstatic 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 datavirtual ~SoLightKit ()β the destructor, protect ya neck
π
Protected Member Functions inherited from SoBaseKit
virtual ~SoBaseKit ()β base-kit destructorvirtual SoNode * addToCopyDict (void) constβ add itself to the copy dictionaryvirtual void copyContents (const SoFieldContainer *fromfc, SbBool copyconnections)β copy the contents over, respecting copyconnectionsSoGroup * getContainerNode (const SbName &listname, SbBool makeifneeded=1)β get the container node for a list, makeifneeded defaults to1virtual SoNode * getAnyPart (const SbName &partname, SbBool makeifneeded, SbBool leafcheck=0, SbBool publiccheck=0)β get any part, with leafcheck and publiccheck both defaulting to0virtual 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 of0, plus pathtoextend defaulting toNULLvirtual SbBool setAnyPart (const SbName &partname, SoNode *from, SbBool anypart=1)β set any part, anypart defaults to1void createNodekitPartsList (void)β build the nodekit parts listvoid createFieldList (void)β build the field listvirtual void createDefaultParts (void)β create all the default partsconst SoNodekitParts * getNodekitPartsList (void) constβ hand over the nodekit parts listconst SbList< SoSFNode * > & getCatalogInstances (void) constβ hand over the catalog instances listvoid 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 to0virtual SbBool readInstance (SoInput *in, unsigned short flags)β read an instance invirtual void setDefaultOnNonWritingFields (void)β set defaults on non-writing fieldsvoid countMyFields (SoOutput *out)β count the fieldsvirtual SbBool setPart (const int partNum, SoNode *node)β set a part by its number
π Protected Member Functions inherited from SoNode
SoNode (void)β the node constructorvirtual ~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 constructorvirtual ~SoBase ()β the base destructorvirtual void destroy (void)β destroy itSbBool hasMultipleWriteRefs (void) constβ does it have multiple write refs?SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ write the headervoid writeFooter (SoOutput *out) constβ write the footervirtual const char * getFileFormatName (void) constβ what's the file format name?
β¨ Static Protected Member Functions β¨
static const SoFieldData ** getFieldDataPtr (void)β pointer to the field datastatic 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 editionstatic 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 editionstatic void setNextActionMethodIndex (int index)β set the next action method indexstatic int getNextActionMethodIndex (void)β get the next action method indexstatic void incNextActionMethodIndex (void)β increment that indexstatic 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 partSoSFNode iconSeparatorβ the separator around the iconSoSFNode lightβ the light itself, the whole point of the kit π‘SoSFNode transformβ the transform partSoSFNode transformGroupβ the transform group
π«Ά Protected Attributes inherited from SoBaseKit
SoSFNode callbackListβ the callback list nodeSoChildList * childrenβ pointer to the child listSbBool 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 at0static int nextActionMethodIndex = 0β the next action method index, also starting at0
π 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
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms