SOCOLORINDEX(3iv)

πŸ’… SoColorIndex β€” surface color index node πŸ’…

okay bestie, welcome to the SoColorIndex(3IV) page ✨ (yes that (3IV) is the manual section, we're in the Inventor 3D library zone, no cap).


πŸ¦‹ INHERITS FROM πŸ¦‹

SoBase > SoFieldContainer > SoNode > SoColorIndex

so like, it's a whole lineage, it goes all the way down, it's giving generational ✨


🌸 SYNOPSIS 🌸

#include <Inventor/nodes/SoColorIndex.h>

Fields from class SoColorIndex

SoMFInt32           index

Methods from class SoColorIndex

                     SoColorIndex()
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

πŸ’– DESCRIPTION πŸ’–

so this node specifies the color to use for all the subsequent shapes β€” and it does it as an index into the current color table, not as an actual RGB moment. 🎨

and bestie, listen: this only works for BASE_COLOR lighting (go check SoLightModel for that one) and only in color index mode. color index mode can be enabled by the window where the rendering happens β€” so it's the window's call, not yours, iykyk. πŸͺŸ

and because color indices only make sense in the context of OpenGL rendering, this node implements only a method for the SoGLRenderAction. that's it. that's the whole menu. periodt. πŸ’…


πŸŽ€ FIELDS πŸŽ€

  • SoMFInt32 index β€” the color index. that's the vibe. it's a multi-value SoMFInt32, and it's the index. literally the whole field. πŸ’–

✨ METHODS ✨

  • SoColorIndex() β€” creates a color index node with default settings. brand new node, fresh out the box, main character energy. πŸ‘‘
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it tells you what this thing is. πŸ’«

πŸ”₯ ACTION BEHAVIOR πŸ”₯

SoGLRenderAction

sets the color index for subsequent shapes rendered with BASE_COLOR lighting. that's the whole job. she does one thing and she does it slayfully. πŸ’…βœ¨


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

ColorIndex {
    index  1
}

yep, index defaults to 1. no notes. πŸ’œ


🌈 SEE ALSO 🌈

SoBaseColor, SoLightModel

go read those too, they're the supporting cast and honestly they ate 🫢


⚠️ gentle reminder bestie: color indices only make sense in the context of OpenGL rendering, so don't come for this node expecting anything beyond SoGLRenderAction. she said what she said. πŸ’€

and that's the page!! footer says SoColorIndex(3IV)() β€” that's the source/version tag for this manpage, and there's genuinely no date on it, iconic honestly, we don't do timestamps here πŸŽ€ bye bestie, go render something cute βœ¨πŸ’–