SOSWITCH(3iv)
β¨ SoSwitch β¨
okay bestie, welcome to the SoSwitch(3IV) page π this is the group node that traverse one chosen child β that's literally the whole NAME, and yes it's iconic, no cap.
π¦ INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch
so it's giving deep family tree, iykyk β all that ancestor energy flows downhill π
πΈ SYNOPSIS
#include <Inventor/nodes/SoSwitch.h>
π Fields from class SoSwitch:
SoSFInt32 whichChild
π Methods from class SoSwitch:
SoSwitch()
SoSwitch(int nChildren)
static SoType getClassTypeId()
π Methods from class SoGroup:
void addChild(SoNode *child)
void insertChild(SoNode *child, int newChildIndex)
SoNode * getChild(int index) const
int findChild(const SoNode *child) const
int getNumChildren() const
void removeChild(int index)
void removeChild(SoNode *child)
void removeAllChildren()
void replaceChild(int index, SoNode *newChild)
void replaceChild(SoNode *oldChild, SoNode *newChild)
π 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)
π 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 picture this: this group node usually traverses only one of its children, or literally none of them. it's doing the same kinda thing as a switch statement in C β hence the name, the branding, the whole moment. π
you can use it to switch the effects of some properties on and off, or to switch between different properties. main character energy fr fr.
the whichChild field says which child gets traversed β the index, bestie β and the first child has index 0. periodt.
- a value of
SO_SWITCH_NONE(-1, which is the default) means: do not traverse any children. silence. no thoughts, head empty. π - a value of
SO_SWITCH_INHERIT(-2) lets the index be inherited from a previously-encounteredSoSwitchnode, or from certain other nodes (likeSoArrayorSoMultipleCopy) that set the switch value. it's giving borrowed vibes β¨ - a value of
SO_SWITCH_ALL(-3) traverses all children, which makes the switch behave exactly like a regularSoGroup. glow up complete π₯
π FIELDS
SoSFInt32whichChildβ the index of the child to traverse, or one ofSO_SWITCH_NONE,SO_SWITCH_INHERIT, orSO_SWITCH_ALL. that's it, that's the field π«Ά
π§ METHODS
SoSwitch()β creates a switch node with default settings. brand new, fresh out the box βSoSwitch(int nChildren)β constructor that takes the approximate number of children. just a lil heads-up for the memory, she's thoughtful like that πstatic SoType getClassTypeId()β returns the type identifier for this class. hi, who are you? π
π ACTION BEHAVIOR
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoGetMatrixAction,SoHandleEventAction,SoRayPickActionβ traverses the chosen child or children. only the selected ones get the spotlight πSoSearchActionβ if the action's Searching-All flag is set, it always traverses all children. otherwise, it traverses just the chosen child or children. no flag, no all-access pass ποΈ
π FILE FORMAT/DEFAULTS
Switch {
whichChild -1
}
π SEE ALSO
SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch
ngl bestie, that's the whole page β every flag, every index, every default, untouched. we don't skip lore in this house π
and for the sign-off: this is the SoSwitch page of the 3IV manual, and the footer is literally SoSwitch(3IV)() β with the source/version-and-date slot left totally empty, like a story still waiting to be written. iconic. slay. bye bestie πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms