SOSEPARATOR(3iv)

πŸŽ€ SoSeparator πŸŽ€

hii bestie!! you just opened the SoSeparator(3IV) man page and honestly? iconic choice. she's a group node that saves and restores traversal state, and she is about to carry your whole scene graph on her back. no cap. let's get into it πŸ’–


πŸ¦‹ INHERITS FROM πŸ¦‹

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator

so yeah, she comes from a whole dynasty and inherits literally everything from all of them. main character lineage fr fr πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoSeparator.h>
enum CacheEnabled {
     SoSeparator::OFF    Never build a cache
     SoSeparator::ON     Always try to build a cache
     SoSeparator::AUTO   Decide whether to cache based on some heuristic
}

πŸ’œ Fields from class SoSeparator:

SoSFEnum            renderCaching
SoSFEnum            boundingBoxCaching
SoSFEnum            renderCulling
SoSFEnum            pickCulling

πŸ’œ Methods from class SoSeparator:

                     SoSeparator()
                     SoSeparator(int nChildren)
static void         setNumRenderCaches(int howMany)
static int          getNumRenderCaches()
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 here's the tea. this group node does a push (save) of the traversal state before traversing its children, and a pop (restore) after traversing them. the whole point? it isolates the separator's children from the rest of the scene graph. periodt.

a separator can include lights, cameras, coordinates, normals, bindings, and literally all other properties. and the best part? separators are relatively inexpensive, so you can use them freely within scenes. spam them. go off. πŸ’…

the SoSeparator node also provides caching of state during rendering and bounding box computation. you turn that on by setting the renderCaching and boundingBoxCaching fields. by default these are set to AUTO, which means Inventor decides whether to build a cache based on internal heuristics. she's autonomous like that. 🧚

separators can also perform culling during rendering and picking. culling skips over traversal of the separator's children if they're not going to be rendered or picked, based on comparing the separator's bounding box with the current view volume. culling is controlled by the renderCulling and pickCulling fields. these are also set to AUTO by default β€” however, render culling can be expensive (and can interfere with render caching), so the AUTO heuristics leave it disabled unless specified otherwise. so like, she's cautious. respect. 🫢


✨ FIELDS ✨

  • SoSFEnum renderCaching β€” whether to cache during rendering traversal πŸ‘€
  • SoSFEnum boundingBoxCaching β€” whether to cache during bounding box traversal πŸ“¦
  • SoSFEnum renderCulling β€” whether to cull during rendering traversal βœ‚οΈ
  • SoSFEnum pickCulling β€” whether to cull during picking traversal 🎯

πŸ’… METHODS πŸ’…

  • SoSeparator() β€” creates a separator node with default settings. a clean slate, a fresh start, the beginning of your era ✨
  • SoSeparator(int nChildren) β€” constructor that takes the approximate number of children. she likes a heads-up so she can prep πŸŽ€
  • static void setNumRenderCaches(int howMany) β€” by default, each separator node maintains 2 render caches. (this is to allow two different representations, such as filled and wireframe, to both be cached.) setNumRenderCaches() sets the number of render caches each separator will have. each render cache uses memory, so increasing this number may increase the memory requirements of the application. heads up: this method affects only separators that are created after it is called, not separators that were created before. and setting the number of caches to 0 turns off render caching globally from then on. πŸ’€ so be careful with that one.
  • static int getNumRenderCaches() β€” returns the current number of render caches. just a lil vibe check πŸ”
  • static SoType getClassTypeId() β€” returns the type identifier for this class. her ID, her passport, her whole identity πŸͺͺ

πŸ”₯ ACTION BEHAVIOR πŸ”₯

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction, SoSearchAction

saves the current traversal state, traverses all children, and restores the previous traversal state. that's it. that's the whole move. push, traverse, pop. she ate and left no crumbs πŸ‘‘


🌈 FILE FORMAT/DEFAULTS 🌈

Separator {
   renderCaching       AUTO
   boundingBoxCaching  AUTO
   renderCulling       AUTO
   pickCulling         AUTO
}

look at those defaults. all AUTO, all confident, all letting the heuristics do their thing πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

  • SoSelection
  • SoTransformSeparator

go read those next bestie, iykyk πŸ“š


and that's the whole page!! every flag, every field, every method, every default β€” all accounted for, no cap. she's a lot but she's worth it πŸ’œ

so anyway, this was SoSeparator(3IV) β€” and about that footer, the version/source slot is just sitting there empty (it reads SoSeparator(3IV)() with nothing filled in) and the date line is blank too, so like… no date to give you, bestie, she's timeless πŸ’« byeeee, go build something iconic!! πŸŽ€βœ¨πŸ¦‹