SOANNOTATION(3iv)

πŸ’– SoAnnotation πŸ’–

okay so bestie, we're reading the 3IV manual together and today's main character is SoAnnotation β€” the annotation group node πŸŽ€βœ¨. Think of it as the friend who shows up fashionably last but gets to stand in front of everybody. πŸ‘‘


🌸 INHERITS FROM 🌸

It's giving very long bloodline, no cap:

SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoAnnotation


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoAnnotation.h>

     Fields from class SoSeparator:

SoSFEnum            renderCaching
SoSFEnum            boundingBoxCaching
SoSFEnum            renderCulling
SoSFEnum            pickCulling

     Methods from class SoAnnotation:

                SoAnnotation()
static SoType       getClassTypeId()

     Methods from class SoSeparator:

static void         setNumRenderCaches(int howMany)
static int          getNumRenderCaches()

     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 delays rendering its children until all other nodes have been traversed, and before it does that, it turns off depth buffer comparisons. The result? The shapes under the annotation node get rendered on top of the rest of the scene. Main character energy, literally β€” it refuses to be behind anyone. πŸ’…

And because it's derived from SoSeparator, it saves and restores traversal state for all actions. Iconic, consistent, we love to see it. ✨

⚠️ bestie, important: if more than one annotation node is present in a graph, the order in which they are traversed determines the stacking order β€” later nodes are rendered on top of earlier ones. So the order is the vibe check. πŸ‘€
⚠️ also: since depth buffer comparisons are disabled, complex 3D objects may not be rendered correctly when used under annotation nodes. That's not a glow-up, that's a risk. 😭
πŸ™ˆ and one more: the annotation node does nothing special when picking along a ray. Like, it does not modify the sorting order of intersected objects based on which ones are under annotation nodes. If your application uses annotation nodes and you want to make sure objects under them get picked "in front of" other objects, you can tell the pick action that you want to pick all objects along the ray, and then scan through the paths in the resulting picked point instances to see if any of them passes through an annotation node. Then your program can decide what to do in such a case. iykyk πŸ’œ

πŸ¦‹ METHODS πŸ¦‹

  • SoAnnotation() β€” Creates an annotation node with default settings. Fresh out of the box, no notes. πŸŽ€
  • static SoType getClassTypeId() β€” Returns type identifier for this class. It's the class's little ID card. πŸͺͺ

πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction β€” Delays rendering its children until all other nodes have been traversed, turning off depth buffer comparisons first. (Yes, the whole dramatic entrance again. πŸ‘‘)
  • SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoRayPickAction, SoSearchAction β€” Same as SoSeparator. No extra lore, just inherited behavior. πŸ’–

πŸ“ FILE FORMAT/DEFAULTS πŸ“

Annotation {
    renderCaching       AUTO
    boundingBoxCaching  AUTO
    renderCulling       AUTO
    pickCulling         AUTO
}

and that's the whole page bestie!! πŸ§šπŸ’« this one came from the SoAnnotation(3IV) source, version 3IV β€” and the date slot on the footer is just empty (SoAnnotation(3IV)()), so like… no date, we simply don't know her birthday πŸ’€πŸŽ€ slay, go render something on top of everything πŸ’…πŸŒˆ