SoSFColor(3)
π 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) constvirtual void copyFrom (const SoField &field)const SoSFColor & operator= (const SoSFColor &field)virtual SbBool isSame (const SoField &field) constconst SbColor & getValue (void) constvoid setValue (const SbColor &newvalue)const SbColor & operator= (const SbColor &newvalue)int operator== (const SoSFColor &field) constint operator!= (const SoSFColor &field) constvoid 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) constvoid setDefault (SbBool defaultVal)SbBool isDefault (void) constSbBool isOfType (const SoType type) constvoid enableConnection (SbBool flag)SbBool isConnectionEnabled (void) constSbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)void disconnect (SoEngineOutput *engineoutput)SbBool isConnectedFromEngine (void) constSbBool getConnectedEngine (SoEngineOutput *&master) constSbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)void disconnect (SoField *field)SbBool isConnectedFromField (void) constSbBool getConnectedField (SoField *&master) constint getNumConnections (void) constint getForwardConnections (SoFieldList &slavelist) constint getConnections (SoFieldList &masterlist) constvoid disconnect (void)SbBool isConnected (void) constvoid setContainer (SoFieldContainer *cont)SoFieldContainer * getContainer (void) constSbBool set (const char *valuestring)void get (SbString &valuestring)SbBool shouldWrite (void) constvirtual void touch (void)virtual void startNotify (void)virtual void notify (SoNotList *nlist)SbBool enableNotify (SbBool on)SbBool isNotifyEnabled (void) constvoid addAuditor (void *f, SoNotRec::Type type)void removeAuditor (void *f, SoNotRec::Type type)int operator== (const SoField &f) constint operator!= (const SoField &f) constvirtual void connectionStatusChanged (int numconnections)SbBool isReadOnly (void) constvirtual void fixCopy (SbBool copyconnections)virtual SbBool referencesCopy (void) constvoid copyConnection (const SoField *fromfield)virtual SbBool read (SoInput *input, const SbName &name)virtual void write (SoOutput *out, const SbName &name) constvirtual void countWriteRefs (SoOutput *out) constvoid setFieldType (int type)int getFieldType (void) constSbBool getDirty (void) constvoid 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) constvirtual SbBool readConnection (SoInput *in)virtual void writeConnection (SoOutput *out) constSbBool isDestructing (void) constvirtual 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
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms