SoPackedColor(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– 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 node
  • virtual void doAction (SoAction *action) β€” does the action thing
  • virtual void GLRender (SoGLRenderAction *action) β€” the actual render moment, main character energy πŸ”₯
  • virtual void callback (SoCallbackAction *action) β€” runs the callback action
  • SbBool 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 state
  • SbBool isOverride (void) const β€” is it overriding? inquiring minds
  • void setNodeType (const NodeType type) β€” sets the node type
  • NodeType getNodeType (void) const β€” gets the node type back
  • virtual SoNode * copy (SbBool copyconnections=0) const β€” copies the node
  • virtual SbBool affectsState (void) const β€” does it mess with the state
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” render below the path
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” render in the path
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” render off the path
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” grabs the bounding box
  • virtual void getMatrix (SoGetMatrixAction *action) β€” grabs the matrix
  • virtual void handleEvent (SoHandleEventAction *action) β€” handles the event
  • virtual void pick (SoPickAction *action) β€” the pick
  • virtual void rayPick (SoRayPickAction *action) β€” the ray pick, fancy
  • virtual void search (SoSearchAction *action) β€” searches
  • virtual void write (SoWriteAction *action) β€” writes it out
  • virtual void audioRender (SoAudioRenderAction *action) β€” audio render, yes really πŸ”Š
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” counts the primitives
  • virtual void grabEventsSetup (void) β€” sets up the event grabbing
  • virtual void grabEventsCleanup (void) β€” cleans up the event grabbing
  • virtual void startNotify (void) β€” kicks off the notify
  • uint32_t getNodeId (void) const β€” the node's id
  • virtual SoChildList * getChildren (void) const β€” the children list
  • virtual void writeInstance (SoOutput *out) β€” writes the instance
  • virtual SoNode * addToCopyDict (void) const β€” adds itself to the copy dict
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections) β€” copies the contents
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copies through the connection

πŸ’š Public Member Functions inherited from SoFieldContainer πŸ’š

  • void setToDefaults (void) β€” back to defaults, reset era
  • SbBool hasDefaultValues (void) const β€” does it have default values
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” are the fields equal
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0) β€” copies the field values over
  • SbBool set (const char *const fielddata) β€” sets from field data
  • void get (SbString &fielddata) β€” gets the field data out
  • virtual int getFields (SoFieldList &l) const β€” gets the fields
  • virtual int getAllFields (SoFieldList &l) const β€” gets all the fields, no crumbs left
  • virtual SoField * getField (const SbName &name) const β€” gets one field by name
  • virtual SoField * getEventIn (const SbName &name) const β€” gets an event in
  • virtual SoField * getEventOut (const SbName &name) const β€” gets an event out
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” gets a field's name
  • SbBool enableNotify (const SbBool flag) β€” toggles notify
  • SbBool isNotifyEnabled (void) const β€” is notify enabled
  • SbBool set (const char *fielddata, SoInput *in) β€” sets from fielddata and input
  • void get (SbString &fielddata, SoOutput *out) β€” gets into fielddata via output
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” checks a new field value
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0) β€” adds a write reference
  • SbBool getIsBuiltIn (void) const β€” is it built in
  • void setUserData (void *userdata) const β€” sets your user data
  • void * getUserData (void) const β€” gets your user data back

πŸ’› Public Member Functions inherited from SoBase πŸ’›

  • void ref (void) const β€” refs it up, keep it alive
  • void unref (void) const β€” unrefs it
  • void unrefNoDelete (void) const β€” unrefs but no delete
  • int32_t getRefCount (void) const β€” the ref count
  • void touch (void) β€” touches it, wake up bestie
  • SbBool isOfType (SoType type) const β€” is it this type
  • virtual SbName getName (void) const β€” its name
  • virtual void setName (const SbName &newname) β€” renames it
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” adds an auditor
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” removes an auditor
  • const SoAuditorList & getAuditors (void) const β€” gets the auditors list
  • SbBool shouldWrite (void) β€” should it write
  • void assertAlive (void) const β€” asserts it's alive, dramatic but fair πŸ’€

🧚 Static Public Member Functions 🧚

  • static SoType getClassTypeId (void) β€” the class type id
  • static 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 types
  • static SoType getClassTypeId (void) β€” class type id
  • static SoNode * getByName (const SbName &name) β€” grabs a node by name
  • static int getByName (const SbName &name, SoNodeList &l) β€” grabs nodes by name into a list
  • static void initClass (void) β€” init the class
  • static void initClasses (void) β€” init all the classes
  • static uint32_t getNextNodeId (void) β€” the next node id
  • static int getActionMethodIndex (const SoType type) β€” the action method index
  • static void getBoundingBoxS (SoAction *action, SoNode *node) β€” static bounding box
  • static void GLRenderS (SoAction *action, SoNode *node) β€” static GL render
  • static void callbackS (SoAction *action, SoNode *node) β€” static callback
  • static void getMatrixS (SoAction *action, SoNode *node) β€” static get matrix
  • static void handleEventS (SoAction *action, SoNode *node) β€” static handle event
  • static void pickS (SoAction *action, SoNode *node) β€” static pick
  • static void rayPickS (SoAction *action, SoNode *node) β€” static ray pick
  • static void searchS (SoAction *action, SoNode *node) β€” static search
  • static void writeS (SoAction *action, SoNode *node) β€” static write
  • static void audioRenderS (SoAction *action, SoNode *node) β€” static audio render
  • static void getPrimitiveCountS (SoAction *action, SoNode *node) β€” static primitive count

πŸ¦‹ Static Public Member Functions inherited from SoFieldContainer πŸ¦‹

  • static void initClass (void) β€” init the class
  • static SoType getClassTypeId (void) β€” class type id
  • static void initCopyDict (void) β€” inits the copy dict
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” adds a copy
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” checks a copy
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” finds a copy
  • static void copyDone (void) β€” copying's done, we love closure

⭐ Static Public Member Functions inherited from SoBase ⭐

  • static void initClass (void) β€” init the class
  • static SoType getClassTypeId (void) β€” class type id
  • static void addName (SoBase *const base, const char *const name) β€” adds a name
  • static void removeName (SoBase *const base, const char *const name) β€” removes a name
  • static void incrementCurrentWriteCounter (void) β€” bumps the current write counter up
  • static void decrementCurrentWriteCounter (void) β€” bumps it back down
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” gets a named base
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” gets named bases into a list
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype) β€” reads
  • static void setInstancePrefix (const SbString &c) β€” sets the instance prefix
  • static void setTraceRefs (SbBool trace) β€” toggles trace refs
  • static SbBool getTraceRefs (void) β€” gets trace refs
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” connects a route
  • static 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 data
  • virtual ~SoPackedColor () β€” the destructor, we don't talk about her πŸ’€
  • virtual void notify (SoNotList *list) β€” notifies

πŸ’œ Protected Member Functions inherited from SoNode πŸ’œ

  • SoNode (void) β€” constructor
  • virtual ~SoNode () β€” destructor
  • virtual 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) β€” constructor
  • virtual ~SoBase () β€” destructor
  • virtual void destroy (void) β€” destroys it
  • SbBool hasMultipleWriteRefs (void) const β€” does it have multiple write refs
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” writes the header
  • void writeFooter (SoOutput *out) const β€” writes the footer
  • virtual 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 pointer
  • static void setNextActionMethodIndex (int index) β€” sets the next action method index
  • static int getNextActionMethodIndex (void) β€” gets the next action method index
  • static void incNextActionMethodIndex (void) β€” increments the next action method index
  • static 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 counter
  • static void staticDataLock (void) β€” locks the static data
  • static 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 at 0
  • static int nextActionMethodIndex = 0 β€” the next action method index, also starting at 0

πŸ”₯ 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