SOPACKEDCOLOR(3iv)

✨ SoPackedColor(3IV) ✨

ok so bestie. welcome to the SoPackedColor page, aka the node that defines base colors using packed representation. it's giving efficiency, it's giving memory-conscious, it's giving let me fit a whole color plus transparency into one tiny little number. i'm obsessed. πŸ’–


🌸 NAME 🌸

SoPackedColor β€” node that defines base colors using packed representation πŸ’…


πŸ¦‹ INHERITS FROM πŸ¦‹

SoBase > SoFieldContainer > SoNode > SoPackedColor

like yes she has a whole ancestry. generational talent fr fr. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoPackedColor.h>

Fields from class SoPackedColor:

SoMFUInt32          orderedRGBA

Methods from class SoPackedColor:

                     SoPackedColor()
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 SoPackedColor is lowkey the sister of SoBaseColor β€” both of them set the diffuse color component of the current material. but here's the plot twist: SoPackedColor also changes the transparency component. she does both. main character behavior. ✨

the color and transparency info gets packed into unsigned 32-bit integers like this: 0xrrggbbaa. and in that little hex bundle, aa is the alpha (0x00 = fully transparent, 0xff = opaque), while rr, gg, and bb represent the red, blue, and green components of the color, respectively.

⚠️ bestie listen. note that the order (r,g,b,a) of these components is reversed from the ordering in releases of Inventor prior to 2.1. so if you're porting old code, do a vibe check first, okay? 😭

and here's a transparency tea: if the transparency type is SoGLRenderAction::SCREEN_DOOR, only the first transparency value will be used. with other transparency types, multiple transparencies will be used. periodt.

also the whole point of her: SoPackedColor uses less memory than SoBaseColor or SoMaterial to store multiple color and transparency values. it can be used in cases where space is critical. she's frugal, she's iconic, she's saving your RAM. πŸŽ€


πŸ“ FIELDS πŸ“

  • SoMFUInt32 orderedRGBA β€” Defines the packed colors. that's it, that's the whole field, and she ate. πŸ’…

🌈 METHODS 🌈

  • SoPackedColor() β€” Creates a packed color node with default settings. fresh out the box, defaults on, ready to slay. ✨
  • static SoType getClassTypeId() β€” Returns type identifier for this class. iykyk. πŸ¦‹

πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction, SoCallbackAction β€” Sets the current base (diffuse) color(s) in the state. πŸ’œ

πŸŽ€ FILE FORMAT/DEFAULTS πŸŽ€

PackedColor {
    orderedRGBA  0xccccccff
}

⭐ SEE ALSO ⭐

SoBaseColor, SoMaterial


k bye bestie, go pack some colors, you're doing amazing sweetie 🫢

this was SoPackedColor(3IV) β€” that's the source/version tag right there in the corner, and the date spot on this page is just... empty, which is honestly so mysterious of it. slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’