SoMFColorRGBA(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸŽ€ SoMFColorRGBA πŸŽ€

okay bestie, this is the SoMFColorRGBA(3) page from the Coin manual (section 3, obviously), and we are going to go through literally every single line of it together. no skips, no "you get the gist", no hand-waving. every function, every inherited member, every protected attribute. grab a strawberry milk πŸ“πŸ₯› and let's go.


✨ NAME ✨

SoMFColorRGBA β€” it's a container for SbColor4f values. that's it, that's the whole job, and it does it flawlessly. πŸ’…


🌸 SYNOPSIS 🌸

#include <Inventor/fields/SoMFColorRGBA.h>

and it inherits SoMField. so everything SoMField can do, this one can do too, and then some. πŸ¦‹


πŸ‘‘ Public Member Functions

here's the whole roster, every last one:

  • virtual SoType getTypeId (void) const β€” hands you the type id. classic.
  • virtual void copyFrom (const SoField &field) β€” copies the value(s) over from another field.
  • const SoMFColorRGBA & operator= (const SoMFColorRGBA &field) β€” assignment, but make it fashion.
  • virtual SbBool isSame (const SoField &field) const β€” checks if the type AND the value(s) match. the vibe check. πŸ”
  • const SbColor4f & operator[] (const int idx) const β€” index into it like an array, read-only edition.
  • const SbColor4f * getValues (const int start) const β€” pointer to the values array starting at start.
  • int find (const SbColor4f &value, SbBool addifnotfound=FALSE) β€” hunts for a value. addifnotfound defaults to FALSE, so it won't just add it unless you say so.
  • void setValues (const int start, const int num, const SbColor4f *newvals) β€” drop num values in, starting at start.
  • void set1Value (const int idx, const SbColor4f &value) β€” set exactly one value at idx.
  • void setValue (const SbColor4f &value) β€” set the whole thing to a single value.
  • const SbColor4f & operator= (const SbColor4f &val) β€” assign a single SbColor4f in.
  • SbBool operator== (const SoMFColorRGBA &field) const β€” equality. twin check. πŸ‘―
  • SbBool operator!= (const SoMFColorRGBA &field) const β€” inequality. not-twin check. πŸ™ˆ
  • SbColor4f * startEditing (void) β€” opens editing mode, gives you a pointer to play with.
  • void finishEditing (void) β€” closes it back up. don't forget this one, bestie, it's the "and that's the tea" of the pair. πŸ«–
  • void setValuesPointer (const int num, const float *userdata) β€” pointer-sharing, const float flavour.
  • void setValuesPointer (const int num, float *userdata) β€” pointer-sharing, non-const float flavour.
  • void setValuesPointer (const int num, const SbColor4f *userdata) β€” pointer-sharing, const SbColor4f flavour.
  • void setValuesPointer (const int num, SbColor4f *userdata) β€” pointer-sharing, non-const SbColor4f flavour.
  • void setValues (int start, int num, const float rgba[][4]) β€” set num RGBA values from a float array, starting at index start.
  • void setHSVValues (int start, int num, const float hsv[][4]) β€” same energy but HSV, starting at index start.
  • void setValue (const SbVec4f &vec) β€” set to a single value from a vector.
  • void setValue (float r, float g, float b, float a) β€” set to a single value from four floats.
  • void setValue (const float rgba[4]) β€” set to a single value from a float array.
  • void setHSVValue (float h, float s, float v, float a) β€” set to a single HSV value from four floats.
  • void setHSVValue (const float hsva[4]) β€” set to a single HSV value from an array.
  • void set1Value (int idx, const SbVec4f &vec) β€” set the one at idx from a vector.
  • void set1Value (int idx, float r, float g, float b, float a) β€” set the one at idx from four floats.
  • void set1Value (int idx, const float rgba[4]) β€” set the one at idx from an array.
  • void set1HSVValue (int idx, float h, float s, float v, float a) β€” set the one at idx from four HSV floats.
  • void set1HSVValue (int idx, const float hsva[4]) β€” set the one at idx from an HSV array.
psst β€” the synopsis above calls that one setHSVValues (int start, int num, const float hsv[][4]) and the docs further down call it setHSVValues (int start, int numarg, const float hsva[][4]). both are in the original, so both are staying here, and i'm not picking a side. πŸ’€

Public Member Functions inherited from SoMField

these are hand-me-downs from the parent and yes, they all come with you. verbatim, every one:

virtual ~SoMField ()
int getNum (void) const
void setNum (const int num)
virtual void deleteValues (int start, int num=-1)
virtual void insertSpace (int start, int num)
SbBool set1 (const int index, const char *const valuestring)
void get1 (const int index, SbString &valuestring)
virtual void enableDeleteValues (void)
virtual SbBool isDeleteValuesEnabled (void) const

Public Member Functions inherited from SoField

the whole ancestral scroll, no cuts:

virtual ~SoField ()
void setIgnored (SbBool ignore)
SbBool isIgnored (void) const
void setDefault (SbBool defaultVal)
SbBool isDefault (void) const
SbBool isOfType (const SoType type) const
void enableConnection (SbBool flag)
SbBool isConnectionEnabled (void) const
SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE,
    SbBool append=FALSE)
SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)
void disconnect (SoEngineOutput *engineoutput)
SbBool isConnectedFromEngine (void) const
SbBool getConnectedEngine (SoEngineOutput *&master) const
SbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool
    append=FALSE)
SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)
void disconnect (SoField *field)
SbBool isConnectedFromField (void) const
SbBool getConnectedField (SoField *&master) const
int getNumConnections (void) const
int getForwardConnections (SoFieldList &slavelist) const
int getConnections (SoFieldList &masterlist) const
void disconnect (void)
SbBool isConnected (void) const
void setContainer (SoFieldContainer *cont)
SoFieldContainer * getContainer (void) const
SbBool set (const char *valuestring)
void get (SbString &valuestring)
SbBool shouldWrite (void) const
virtual void touch (void)
virtual void startNotify (void)
virtual void notify (SoNotList *nlist)
SbBool enableNotify (SbBool on)
SbBool isNotifyEnabled (void) const
void addAuditor (void *f, SoNotRec::Type type)
void removeAuditor (void *f, SoNotRec::Type type)
int operator== (const SoField &f) const
int operator!= (const SoField &f) const
virtual void connectionStatusChanged (int numconnections)
SbBool isReadOnly (void) const
virtual void fixCopy (SbBool copyconnections)
virtual SbBool referencesCopy (void) const
void copyConnection (const SoField *fromfield)
virtual SbBool read (SoInput *input, const SbName &name)
virtual void write (SoOutput *out, const SbName &name) const
virtual void countWriteRefs (SoOutput *out) const
void setFieldType (int type)
int getFieldType (void) const
SbBool getDirty (void) const
void setDirty (SbBool dirty)
void evaluate (void) const

⭐ Static Public Member Functions

  • static void * createInstance (void) β€” makes you a fresh instance. ✨
  • static SoType getClassTypeId (void) β€” the SoType for this class.
  • static void initClass (void) β€” sets the class up in the type system.

Static Public Member Functions inherited from SoMField

static SoType getClassTypeId (void)
static void atexit_cleanup (void)
static void initClass (void)

Static Public Member Functions inherited from SoField

static void initClass (void)
static void initClasses (void)
static void cleanupClass (void)
static SoType getClassTypeId (void)

🧚 Protected Member Functions

  • virtual void deleteAllValues (void) β€” the original literally says this one is "considered internal to the library, as it is not likely to be of interest to the application programmer." so like… noted, moving on. πŸ™ˆ
  • virtual void copyValue (int to, int from) β€” shuffles values around inside a multivalue field. it's overridden per field so copy constructors get run when they need to.
  • virtual int fieldSizeof (void) const β€” size of the field, in bytes-ish terms.
  • virtual void * valuesPtr (void) β€” the raw pointer to the values.
  • virtual void setValuesPtr (void *ptr) β€” set that pointer.
  • virtual void allocValues (int num) β€” make room for num of them.

Protected Member Functions inherited from SoMField

SoMField (void)
virtual void makeRoom (int newnum)
virtual SoNotRec createNotRec (SoBase *container)
void setChangedIndex (const int chgidx)
void setChangedIndices (const int chgidx=-1, const int numchgind=0)

Protected Member Functions inherited from SoField

SoField (void)
void valueChanged (SbBool resetdefault=TRUE)
virtual void evaluateConnection (void) const
virtual SbBool readConnection (SoInput *in)
virtual void writeConnection (SoOutput *out) const
SbBool isDestructing (void) const

πŸ’œ Protected Attributes

  • SbColor4f * values β€” the actual values, right there, protected.

Protected Attributes inherited from SoMField

int num
int maxNum
SbBool userDataIsUsed

🌈 Additional Inherited Members

Public Types inherited from SoField

enum FieldType { NORMAL_FIELD = 0, EVENTIN_FIELD, EVENTOUT_FIELD,
    EXPOSED_FIELD }

πŸ’– Detailed Description πŸ’–

SoMFColorRGBA is a container for SbColor4f values. that's the headline, that's the brand.

this field is the one you reach for when nodes, engines or other field containers need to store multiple color values β€” and the original describes those as "Red Green Blue" triplets, which is what it says, and we are respecting the text as-is. πŸ’€

it also supports application data sharing through a setValuesPointer() method. for the full tea on how to actually use that, the original points you at the SoMField documentation.

See also: SbColor4f, SoSFColorRGBA


πŸ¦‹ Member Function Documentation πŸ¦‹

void * SoMFColorRGBA::createInstance (void ) [static]

this one is internal to the library, bestie β€” the original says it's "not likely to be of interest to the application programmer." it creates a new instance of the class type that corresponds to the SoType object.

SoType SoMFColorRGBA::getClassTypeId (void ) [static]

static method, returns the SoType object associated with objects of this class. πŸŽ€

SoType SoMFColorRGBA::getTypeId (void ) const [virtual]

returns the type identification of an object derived from a class inheriting SoField. this is what makes runtime type checking and "downward" casting work. it implements SoField.

void SoMFColorRGBA::copyFrom (const SoField & f) [virtual]

copy the value(s) from f into this field. f must be the same type as this field, no mixing. implements SoField.

SbBool SoMFColorRGBA::isSame (const SoField & f) const [virtual]

checks for equal type and value(s). implements SoField.

void SoMFColorRGBA::deleteAllValues (void ) [protected], [virtual]

again with the "internal to the library, not likely to be of interest to the application programmer" note. implements SoMField.

void SoMFColorRGBA::copyValue (int to, int from) [protected], [virtual]

used for moving values around internally within a multivalue field. it has to be overridden in each field so it automatically takes care of running copy constructors where necessary. implements SoMField.

const SbColor4f * SoMFColorRGBA::getValues (const int start) const [inline]

returns a pointer to the values array. πŸ“

void SoMFColorRGBA::initClass (void ) [static]

internal method called upon initialization of the library (from SoDB::init()) to set up the type system.

void SoMFColorRGBA::setValues (int start, int numarg, const float rgba[][4])

set num RGB color values, starting at index start.

void SoMFColorRGBA::setHSVValues (int start, int numarg, const float hsva[][4])

set num HSV color values, starting at index start.

void SoMFColorRGBA::setValue (const SbVec4f & vec)

set the color array to a single value. vec is interpreted as a three element vector with the red, green and blue components, respectively.

void SoMFColorRGBA::setValue (float r, float g, float b, float a)

set the color array to a single value. r, g and b are the red, green and blue components, respectively.

void SoMFColorRGBA::setValue (const float rgba[4])

set the color array to a single value. rgb is a three element vector with the red, green and blue components, respectively.

void SoMFColorRGBA::setHSVValue (float h, float s, float v, float a)

set the color array to a single value. h, s and v are the hue, saturation and value components, respectively.

void SoMFColorRGBA::setHSVValue (const float hsva[4])

set the color array to a single value. hsv is a three element vector with the hue, saturation and value components, respectively.

void SoMFColorRGBA::set1Value (int idx, const SbVec4f & vec)

set the color at idx. vec is interpreted as a three element vector with the red, green and blue components, respectively.

void SoMFColorRGBA::set1Value (int idx, float r, float g, float b, float a)

set the color at idx. r, g and b is the red, green and blue components, respectively.

void SoMFColorRGBA::set1Value (int idx, const float rgba[4])

set the color at idx. rgb is interpreted as a three element vector with the red, green and blue components, respectively.

void SoMFColorRGBA::set1HSVValue (int idx, float h, float s, float v, float a)

set the color at idx. h, s and v is the hue, saturation and value components, respectively.

void SoMFColorRGBA::set1HSVValue (int idx, const float hsva[4])

set the color at idx. hsv is a three element vector with the hue, saturation and value components, respectively.


🫢 Author 🫢

generated automatically by Doxygen for Coin from the source code. not a human, just a robot doing its little robot thing. πŸ€–βœ¨


and that's the whole page, bestie, you made it to the end. πŸ‘‘ this was version 4.0.10, dated Thu Jun 25 2026 00:00:00, and yes it's filed under SoMFColorRGBA(3). slay, go write some RGBA values. πŸ’–πŸŒˆπŸ’…

πŸ“¦ where this page comes from