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 to2.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 πβ¨ππ¦πΈπ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms