SONODE(3iv)

πŸ’– SoNode β€” the whole entire vibe πŸ’–

okay so bestie, welcome to SoNode(3IV) β€” the man page that's basically the mother of all scene graph nodes. she's abstract, she's iconic, she's the blueprint. let's get into it ✨


🌸 NAME 🌸

SoNode β€” the abstract base class for all database nodes. every single one. the queen mother. πŸ‘‘


🧬 INHERITS FROM 🧬

SoBase > SoFieldContainer > SoNode

yes bestie, that's the lineage. three layers of ancestry and then her. royalty fr fr πŸŽ€


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoNode.h>

πŸ¦‹ Methods from class SoNode

void                setOverride(SbBool state)
SbBool              isOverride() const
SoNode *            copy(SbBool copyConnections = FALSE) const
virtual SbBool      affectsState() const
static SoNode *     getByName(const SbName &name)
static int          getByName(const SbName &name, SoNodeList &list)
static SoType       getClassTypeId()

πŸ¦‹ Methods from class SoFieldContainer

void                setToDefaults()
SbBool              hasDefaultValues() const
SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
void                copyFieldValues(const SoFieldContainer *fc, SbBool
                         copyConnections = FALSE)
SbBool              set(const char *fieldDataString)
void                get(SbString &fieldDataString)
virtual int         getFields(SoFieldList &resultList) const
virtual SoField *   getField(const SbName &fieldName) const
SbBool              getFieldName(const SoField *field, SbName &fieldName)
                         const
SbBool              isNotifyEnabled() const
SbBool              enableNotify(SbBool flag)

πŸ¦‹ Methods from class SoBase

void                ref()
void                unref() const
void                unrefNoDelete() const
void                touch()
virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const
virtual void        setName(const SbName &name)
virtual SbName      getName() const

πŸ’… DESCRIPTION πŸ’…

okay so listen. this is the abstract base class from which all scene graph node classes are derived. that's it. that's the whole description. she's the parent of literally everything and she's not even sorry about it. main character energy from day one 🫢


πŸ”₯ METHODS πŸ”₯

  • void setOverride(SbBool state) β€” flips the override flag on or off. toggle girlie ✨
  • SbBool isOverride() const β€” hands you back the current state of the override flag. a little vibe check on that flag, if you will πŸ’…
  • SoNode *copy(SbBool copyConnections = FALSE) const β€” makes you a whole exact copy of the node and returns it. if the node is a group, the children get copied too, obviously, she's not gonna abandon them 😭. if copyConnections is TRUE (and bestie, it's FALSE by default), any connections to fields of the node get copied too β€” but not connections from them, okay? read that twice. also real talk: if you have multiple references to a node inside the node you're copying, you'll end up with multiple references to the copy of that node. same energy, copied ✨
  • virtual SbBool affectsState() const β€” returns TRUE if a node has an effect on the state during traversal. the default method returns TRUE. node classes like SoSeparator that isolate their effects from the rest of the graph override this and return FALSE instead. boundaries, bestie πŸ›‘
  • static SoNode *getByName(const SbName &name) and static int getByName(const SbName &name, SoNodeList &list) β€” you can set a node's name with SoBase::setName(), and these two methods are how you go looking for nodes by that name. the first one gives you the last node that has the specified name. the second one gives you the number of nodes with that name, and adds pointers to those nodes into list. it's giving "find my friends" but for your scene graph πŸ”
  • static SoType getClassTypeId() β€” returns the type identifier for the SoNode class. the ID card. the birth certificate. periodt πŸ‘‘

🎬 ACTION BEHAVIOR 🎬

  • SoSearchAction β€” if the node pointer, type, or name matches the search criteria, it returns a path to the node. slay, found her πŸ’–
  • SoWriteAction β€” writes the contents of the node to the current SoOutput. pen to paper, bestie πŸ–ŠοΈ

πŸ“ FILE FORMAT/DEFAULTS πŸ“

this is an abstract class, babes. there's no format and no defaults here to peek at. go check the reference page of a derived class for the format and default values πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

SoPath, SoAction, SoNodeKit


ngl this page was brought to you by SoNode(3IV) β€” that's the source, the version, and the date all rolled into one cute little signature, so consider yourself signed off on πŸ’– bye bestie, go build a scene graph πŸ¦‹βœ¨