SONORMAL(3iv)

SoNormal πŸ’…βœ¨

okay bestie, gather round, because we're talking about SoNormal from the <cyan>3IV</cyan> manual β€” yes, the Open Inventor one, the iconic one. it's a node that defines surface normals for shapes, and honestly? it's giving quiet-luxury scene-graph energy. it doesn't even render anything itself. it just ✨sets the vibe✨ for everybody after it. periodt.


NAME πŸŽ€

SoNormal β€” node that defines surface normals for shapes


INHERITS FROM 🧬

SoBase > SoFieldContainer > SoNode > SoNormal

so yeah, it's a whole lineage. it got the whole family tree behind it. four generations deep and still slaying πŸ’œ


SYNOPSIS 🌈

#include <Inventor/nodes/SoNormal.h>

Fields from class SoNormal:

SoMFVec3f           vector

Methods from class SoNormal:

                     SoNormal()
static SoType       getClassTypeId()

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

like look at that inherited-methods list. it's a nepo baby and we love that for it πŸ’–


DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” this node defines a whole set of 3D surface normal vectors that get used by vertex-based shape nodes that follow it in the scene graph. that's the whole job. that's the assignment.

and here's the part that lowkey trips people up: this node does not produce a visible result during rendering. nope. nothing to see. it's not on screen, it's not in the shot, it's backstage. what it does do is simply replace the current normals in the rendering state for subsequent nodes to use. so it's less "main character" and more "the stylist that makes everyone else look expensive" 🫢

this node contains one multiple-valued field that contains the normal vectors. one field. that's it. minimalism.

now, why do we even care about surface normals? because they're needed to compute lighting when the Phong lighting model is used πŸ’‘. and plot twist β€” most vertex-based shapes that use normals can compute default normals if none are specified, depending on the current normal binding. so if you don't supply any, things might still work out. no cap.


FIELDS ✨

  • SoMFVec3f vector β€” the surface normal vectors. that's the field. that's the whole field. it's multiple-valued, it's Vec3f, it's doing exactly what it says on the tin πŸ’›

METHODS πŸ“

  • SoNormal() β€” creates a surface normal node with default settings. brand new baby node, fresh out the box, defaults on defaults πŸŽ€
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it's the node's government name. iykyk.

ACTION BEHAVIOR πŸ‘‘

SoGLRenderAction, SoCallbackAction, SoRayPickAction

sets the current normals in the traversal state. that's it. three actions, one job, zero drama. it walks in, sets the normals, leaves. πŸ’…


FILE FORMAT/DEFAULTS πŸ’€

Normal {
    vector  [  ]
}

look at that empty vector. a blank canvas. an unbothered icon. [ ] truly said "i contain multitudes, but not right now" 😭


SEE ALSO 🌸

SoCoordinate3, SoLightModel, SoNormalBinding, SoVertexShape

go read those too bestie, they're all in the same friend group 🫢


and that's the whole page!! 🌈✨ SoNormal(3IV)() β€” that's the source and version, and yes the date slot is just vibing there empty, which is honestly so real of it. mwah, go set some normals, you've got this πŸ’–πŸŽ€πŸ¦‹