SoSFColor(3)

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

πŸ’– SoSFColor πŸ’–

okay bestie, welcome to the manual page for SoSFColor β€” section 3 of the Coin manual, and honestly? she's a lil legend. this class is literally just a container for a single SbColor value. that's the whole gig. and she ate. πŸŽ€


✨ NAME ✨

SoSFColor β€” the class that holds exactly one SbColor value, no more no less, and does it beautifully. πŸ’…


🌸 SYNOPSIS 🌸

#include <Inventor/fields/SoSFColor.h>

she inherits SoSField. yes ma'am, that's her lineage. πŸ‘‘

🫢 Public Member Functions 🫢

  • virtual SoType getTypeId (void) const
  • virtual void copyFrom (const SoField &field)
  • const SoSFColor & operator= (const SoSFColor &field)
  • virtual SbBool isSame (const SoField &field) const
  • const SbColor & getValue (void) const
  • void setValue (const SbColor &newvalue)
  • const SbColor & operator= (const SbColor &newvalue)
  • int operator== (const SoSFColor &field) const
  • int operator!= (const SoSFColor &field) const
  • void setValue (const SbVec3f &vec)
  • void setValue (float red, float green, float blue)
  • void setValue (const float rgb[3])
  • void setHSVValue (float h, float s, float v)
  • void setHSVValue (const float hsv[3])

🌈 Public Member Functions inherited from SoSField 🌈

  • virtual ~SoSField ()

πŸ¦‹ Public Member Functions inherited from SoField πŸ¦‹

  • 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)
  • static SoType getClassTypeId (void)
  • static void initClass (void)

πŸ’œ Static Public Member Functions inherited from SoSField πŸ’œ

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void atexit_cleanup (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 Attributes πŸ“

  • SbColor value

πŸŽ€ Additional Inherited Members πŸŽ€

Public Types inherited from SoField

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

Protected Member Functions inherited from SoSField

  • SoSField (void)

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
  • virtual SoNotRec createNotRec (SoBase *cont)

πŸ’… DETAILED DESCRIPTION πŸ’…

okay so, the tea: SoSFColor is a container for an SbColor value. 🎨 that's it, that's the whole personality.

you reach for this field whenever nodes, engines, or other field containers need to stash a single color value β€” like, Red + Green + Blue, one singular vibe, no array nonsense.

when a field of this type writes itself out to a file, it saves its value as a "R G B" triple component, and every single color component value lives between 0.0 and 1.0. no cap. πŸ“

See also SoMFColor β€” that's the multi-color sibling if one color isn't enough for you, bestie. ✨


πŸ‘‘ MEMBER FUNCTION DOCUMENTATION πŸ‘‘

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

this one's considered internal to the library, so it's not likely to be of any interest to the application programmer. (iykyk, you probably never touch this.)

creates a new instance of the class type corresponding to the SoType object. ✨

SoType SoSFColor::getClassTypeId (void ) [static]

this static method hands you back the SoType object associated with objects of this class. πŸͺͺ

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

returns the type identification of an object derived from a class inheriting SoField. this is what powers runtime type checking and "downward" casting. πŸ”

implements SoField.

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

copy value(s) from f into this field. heads up: f must be of the same type as this field, or it's not gonna fly. 🫢

implements SoField.

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

check for equal type and value(s). basically the vibe check for fields. βœ…

implements SoField.

void SoSFColor::initClass (void ) [static]

internal method called upon initialization of the library (from SoDB::init()) to set up the type system. don't worry about it, she handles herself. πŸ’…

void SoSFColor::setValue (const SbVec3f & vec)

set the color value from a vector with three elements. those three elements get interpreted as red, green and blue, respectively. 🌈

void SoSFColor::setValue (float red, float green, float blue)

set the color value from red, green and blue. the value range for each component is between 0.0 and 1.0. πŸ“

void SoSFColor::setValue (const float rgb[3])

set the color value from a floating point number array with three elements. those three get interpreted as red, green and blue, respectively. 🎨

void SoSFColor::setHSVValue (float h, float s, float v)

set the color value from h, s and v, where h is "hue", s is "saturation" and v is "value". iconic triad, fr fr. πŸ¦‹

void SoSFColor::setHSVValue (const float hsv[3])

set the color value from a floating point number array with three elements. those three get interpreted as hue, saturation and value, respectively. ✨


🌸 AUTHOR 🌸

Generated automatically by Doxygen for Coin from the source code. (she didn't write herself, but she would have slayed it tbh 😭)


and that's the whole page, bestie!! 🫢 this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00 β€” so go forth, set your colors, and stay iconic. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from