SoPackedColor(3)
π SoPackedColor(3) β Library Functions Manual β¨
okay bestie, buckle up, we're doing the SoPackedColor page from the Library Functions Manual and it's a whole vibe π
πΈ NAME πΈ
SoPackedColor β the SoPackedColor class is a node for setting diffuse and transparency material values. literally its whole personality π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoPackedColor.h>
Inherits SoNode. (so it's got that SoNode bloodline, iconic lineage π)
π Public Member Functions π
virtual SoType getTypeId (void) constβ hands you back the type id, the standard little identity check πͺͺSoPackedColor (void)β the constructor, we love a fresh new nodevirtual void doAction (SoAction *action)β does the action thingvirtual void GLRender (SoGLRenderAction *action)β the actual render moment, main character energy π₯virtual void callback (SoCallbackAction *action)β runs the callback actionSbBool isTransparent (void)β asks the big question: is it transparent or not π«Ά
π Public Member Functions inherited from SoNode π
void setOverride (const SbBool state)β sets the override stateSbBool isOverride (void) constβ is it overriding? inquiring mindsvoid setNodeType (const NodeType type)β sets the node typeNodeType getNodeType (void) constβ gets the node type backvirtual SoNode * copy (SbBool copyconnections=0) constβ copies the nodevirtual SbBool affectsState (void) constβ does it mess with the statevirtual void GLRenderBelowPath (SoGLRenderAction *action)β render below the pathvirtual void GLRenderInPath (SoGLRenderAction *action)β render in the pathvirtual void GLRenderOffPath (SoGLRenderAction *action)β render off the pathvirtual void getBoundingBox (SoGetBoundingBoxAction *action)β grabs the bounding boxvirtual void getMatrix (SoGetMatrixAction *action)β grabs the matrixvirtual void handleEvent (SoHandleEventAction *action)β handles the eventvirtual void pick (SoPickAction *action)β the pickvirtual void rayPick (SoRayPickAction *action)β the ray pick, fancyvirtual void search (SoSearchAction *action)β searchesvirtual void write (SoWriteAction *action)β writes it outvirtual void audioRender (SoAudioRenderAction *action)β audio render, yes really πvirtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β counts the primitivesvirtual void grabEventsSetup (void)β sets up the event grabbingvirtual void grabEventsCleanup (void)β cleans up the event grabbingvirtual void startNotify (void)β kicks off the notifyuint32_t getNodeId (void) constβ the node's idvirtual SoChildList * getChildren (void) constβ the children listvirtual void writeInstance (SoOutput *out)β writes the instancevirtual SoNode * addToCopyDict (void) constβ adds itself to the copy dictvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)β copies the contentsvirtual SoFieldContainer * copyThroughConnection (void) constβ copies through the connection
π Public Member Functions inherited from SoFieldContainer π
void setToDefaults (void)β back to defaults, reset eraSbBool hasDefaultValues (void) constβ does it have default valuesSbBool fieldsAreEqual (const SoFieldContainer *container) constβ are the fields equalvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)β copies the field values overSbBool set (const char *const fielddata)β sets from field datavoid get (SbString &fielddata)β gets the field data outvirtual int getFields (SoFieldList &l) constβ gets the fieldsvirtual int getAllFields (SoFieldList &l) constβ gets all the fields, no crumbs leftvirtual SoField * getField (const SbName &name) constβ gets one field by namevirtual SoField * getEventIn (const SbName &name) constβ gets an event invirtual SoField * getEventOut (const SbName &name) constβ gets an event outSbBool getFieldName (const SoField *const field, SbName &name) constβ gets a field's nameSbBool enableNotify (const SbBool flag)β toggles notifySbBool isNotifyEnabled (void) constβ is notify enabledSbBool set (const char *fielddata, SoInput *in)β sets from fielddata and inputvoid get (SbString &fielddata, SoOutput *out)β gets into fielddata via outputvirtual SbBool validateNewFieldValue (SoField *field, void *newval)β checks a new field valuevirtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)β adds a write referenceSbBool getIsBuiltIn (void) constβ is it built invoid setUserData (void *userdata) constβ sets your user datavoid * getUserData (void) constβ gets your user data back
π Public Member Functions inherited from SoBase π
void ref (void) constβ refs it up, keep it alivevoid unref (void) constβ unrefs itvoid unrefNoDelete (void) constβ unrefs but no deleteint32_t getRefCount (void) constβ the ref countvoid touch (void)β touches it, wake up bestieSbBool isOfType (SoType type) constβ is it this typevirtual SbName getName (void) constβ its namevirtual void setName (const SbName &newname)β renames itvoid addAuditor (void *const auditor, const SoNotRec::Type type)β adds an auditorvoid removeAuditor (void *const auditor, const SoNotRec::Type type)β removes an auditorconst SoAuditorList & getAuditors (void) constβ gets the auditors listSbBool shouldWrite (void)β should it writevoid assertAlive (void) constβ asserts it's alive, dramatic but fair π
π§ Static Public Member Functions π§
static SoType getClassTypeId (void)β the class type idstatic void initClass (void)β initializes the class, the classic ritual β¨
π Static Public Member Functions inherited from SoNode π
static uint32_t getCompatibilityTypes (const SoType &nodetype)β gets compatibility typesstatic SoType getClassTypeId (void)β class type idstatic SoNode * getByName (const SbName &name)β grabs a node by namestatic int getByName (const SbName &name, SoNodeList &l)β grabs nodes by name into a liststatic void initClass (void)β init the classstatic void initClasses (void)β init all the classesstatic uint32_t getNextNodeId (void)β the next node idstatic int getActionMethodIndex (const SoType type)β the action method indexstatic void getBoundingBoxS (SoAction *action, SoNode *node)β static bounding boxstatic void GLRenderS (SoAction *action, SoNode *node)β static GL renderstatic void callbackS (SoAction *action, SoNode *node)β static callbackstatic void getMatrixS (SoAction *action, SoNode *node)β static get matrixstatic void handleEventS (SoAction *action, SoNode *node)β static handle eventstatic void pickS (SoAction *action, SoNode *node)β static pickstatic void rayPickS (SoAction *action, SoNode *node)β static ray pickstatic void searchS (SoAction *action, SoNode *node)β static searchstatic void writeS (SoAction *action, SoNode *node)β static writestatic void audioRenderS (SoAction *action, SoNode *node)β static audio renderstatic void getPrimitiveCountS (SoAction *action, SoNode *node)β static primitive count
π¦ Static Public Member Functions inherited from SoFieldContainer π¦
static void initClass (void)β init the classstatic SoType getClassTypeId (void)β class type idstatic void initCopyDict (void)β inits the copy dictstatic void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β adds a copystatic SoFieldContainer * checkCopy (const SoFieldContainer *orig)β checks a copystatic SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β finds a copystatic void copyDone (void)β copying's done, we love closure
β Static Public Member Functions inherited from SoBase β
static void initClass (void)β init the classstatic SoType getClassTypeId (void)β class type idstatic void addName (SoBase *const base, const char *const name)β adds a namestatic void removeName (SoBase *const base, const char *const name)β removes a namestatic void incrementCurrentWriteCounter (void)β bumps the current write counter upstatic void decrementCurrentWriteCounter (void)β bumps it back downstatic SoBase * getNamedBase (const SbName &name, SoType type)β gets a named basestatic int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β gets named bases into a liststatic SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)β readsstatic void setInstancePrefix (const SbString &c)β sets the instance prefixstatic void setTraceRefs (SbBool trace)β toggles trace refsstatic SbBool getTraceRefs (void)β gets trace refsstatic SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)β connects a routestatic SbBool readRoute (SoInput *in)β reads a route
π Public Attributes π
SoMFUInt32 orderedRGBAβ the field itself, the moment, the star of the show π
π§Έ Protected Member Functions π§Έ
virtual const SoFieldData * getFieldData (void) constβ gets the field datavirtual ~SoPackedColor ()β the destructor, we don't talk about her πvirtual void notify (SoNotList *list)β notifies
π Protected Member Functions inherited from SoNode π
SoNode (void)β constructorvirtual ~SoNode ()β destructorvirtual SbBool readInstance (SoInput *in, unsigned short flags)β reads the instance
π Protected Member Functions inherited from SoFieldContainer π
SoFieldContainer (void)β constructor~SoFieldContainer ()β destructor
π«§ Protected Member Functions inherited from SoBase π«§
SoBase (void)β constructorvirtual ~SoBase ()β destructorvirtual void destroy (void)β destroys itSbBool hasMultipleWriteRefs (void) constβ does it have multiple write refsSbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ writes the headervoid writeFooter (SoOutput *out) constβ writes the footervirtual const char * getFileFormatName (void) constβ gets the file format name
πΈ Static Protected Member Functions πΈ
static const SoFieldData ** getFieldDataPtr (void)β the field data pointer, get it
π« Static Protected Member Functions inherited from SoNode π«
static const SoFieldData ** getFieldDataPtr (void)β field data pointerstatic void setNextActionMethodIndex (int index)β sets the next action method indexstatic int getNextActionMethodIndex (void)β gets the next action method indexstatic void incNextActionMethodIndex (void)β increments the next action method indexstatic void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β sets the compatibility types
π Static Protected Member Functions inherited from SoBase π
static uint32_t getCurrentWriteCounter (void)β gets the current write counterstatic void staticDataLock (void)β locks the static datastatic void staticDataUnlock (void)β unlocks the static data
π Additional Inherited Members π
π Public Types inherited from SoNode π
enum NodeType β the whole roster, look at the lineup:
enum NodeType {
INVENTOR = 0x0000,
VRML1 = 0x0001,
VRML2 = 0x0002,
INVENTOR_1 = 0x0004,
INVENTOR_2_0 = 0x0008,
INVENTOR_2_1 = 0x0010,
INVENTOR_2_5 = 0x0020,
INVENTOR_2_6 = 0x0040,
COIN_1_0 = 0x0080,
COIN_2_0 = 0x0100,
EXTENSION = 0x0200,
COIN_2_2 = 0x0400,
COIN_2_3 = 0x0800,
COIN_2_4 = 0x1000,
INVENTOR_5_0 = 0x2000,
COIN_2_5 = 0x4000
}
π¦ Protected Types inherited from SoBase π¦
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }β the flags, short and sweet
π§ Protected Attributes inherited from SoNode π§
uint32_t uniqueIdβ its very own unique id, no duplicates allowed
π Protected Attributes inherited from SoFieldContainer π
SbBool isBuiltInβ is it built in or not
β Static Protected Attributes inherited from SoNode β
static uint32_t nextUniqueId = 0β the next unique id, starting at0static int nextActionMethodIndex = 0β the next action method index, also starting at0
π₯ Detailed Description π₯
okay so the SoPackedColor class is a node for setting diffuse and transparency material values. that's the whole thing, that's her job π
This node gives you a convenient way of setting diffuse colors and transparency values with packed 32-bit RGBA vectors. convenient, bestie. we love convenient β¨
π FILE FORMAT/DEFAULTS: π
PackedColor {
orderedRGBA 0xccccccff
}
π See also π
SoBaseColor
π Constructor & Destructor Documentation π
πΈ SoPackedColor::SoPackedColor (void ) πΈ
Constructor. it's giving new beginnings, fresh node, no baggage β¨
References orderedRGBA, and SoPackedColor().
Referenced by getFieldData(), and SoPackedColor().
π SoPackedColor::~SoPackedColor () [protected], [virtual] π
Destructor. she's leaving the group chat, protected and virtual about it π
π«Ά Member Function Documentation π«Ά
okay bestie, this is the part where we meet the actual methods. they're iconic, they're useful, and yes we're going through every single one π
π SoType SoPackedColor::getTypeId (void ) const [virtual] π
this is the vibe check for object types, fr. it returns the type identification of an object derived from a class inheriting SoBase. it's what you use for run-time type checking and "downward" casting.
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type
}
}
for the application programmers who wanna extend the library with new nodes, engines, nodekits, draggers or whatever: you need to override this method in all subclasses. typically you do it while setting up the full type system for extension classes, and that's usually done with the pre-defined macros from, for example, Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes), and so on.
wanna know more about writing Coin extensions? go read the class documentation of the toplevel superclasses for the various class groups. β¨
Implements SoBase.
π const SoFieldData * SoPackedColor::getFieldData (void ) const [protected], [virtual] π
returns a pointer to the class-wide field data storage object for this instance. if there are no fields present, it returns NULL. that's it, that's the tea π΅
Reimplemented from SoFieldContainer.
References SoPackedColor().
π₯ void SoPackedColor::doAction (SoAction * action) [virtual] π₯
this function performs the typical operation of a node for any action. it's the main character of action handling, no cap.
Reimplemented from SoNode.
References SoOverrideElement::getDiffuseColorOverride(), SoAction::getState(), SoState::isElementEnabled(), SoNode::isOverride(), isTransparent(), orderedRGBA, SoOverrideElement::setDiffuseColorOverride(), SoBase::staticDataLock(), and SoBase::staticDataUnlock().
Referenced by callback(), and GLRender().
β¨ void SoPackedColor::GLRender (SoGLRenderAction * action) [virtual] β¨
action method for the SoGLRenderAction.
this gets called during rendering traversals. any node that influences the rendering state in any way, or who wants to throw geometry primitives at OpenGL, overrides this method. slay π
Reimplemented from SoNode.
References doAction().
πΈ void SoPackedColor::callback (SoCallbackAction * action) [virtual] πΈ
action method for SoCallbackAction.
it simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. lowkey useful, highkey iconic.
Reimplemented from SoNode.
References doAction().
π¦ SbBool SoPackedColor::isTransparent (void ) π¦
returns TRUE if there is at least one RGBA vector in the set which is not completely opaque. so if even one little vector is see-through-ish, this says yes bestie.
References orderedRGBA.
Referenced by doAction().
π void SoPackedColor::notify (SoNotList * l) [protected], [virtual] π
notifies all auditors for this instance when changes are made. it's the group chat ping for scene graph updates, fr fr.
Reimplemented from SoNode.
References SoNotList::getLastField(), SoNode::notify(), and orderedRGBA.
π Member Data Documentation π
π SoMFUInt32 SoPackedColor::orderedRGBA π
set of packed 32-bit RGBA vectors.
the most significant 24 bits specifies 8 bits each for the red, green and blue components.
the least significant 8 bits specifies the transparency value, where 0x00 means completely transparent, and 0xff completely opaque. so 0xff is the full-glam opaque era, and 0x00 is the invisible ghost vibe π»
Referenced by doAction(), isTransparent(), notify(), and SoPackedColor().
π«Ά Author π«Ά
Generated automatically by Doxygen for Coin from the source code.
π that's the whole page, bestie! it's from Coin, Version 2.5.0, and it's SoPackedColor(3). the footer didn't have a date on it, so no date to spill β just the source/version vibe. periodt. π β¨
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms