SBDColor Class Reference

This class describes a color. More...

Constructors and destructors

 SBDColor ()
 Constructs a color (1.0f, 1.0f, 1.0f, 1.0f)
 
 SBDColor (float red, float green, float blue, float alpha=1.0f)
 Constructs a color (red, green, blue, alpha)
 
 SBDColor (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
 Constructs a color (red, green, blue, alpha)
 
 SBDColor (float *color)
 Constructs a color (color[0], color[1], color[2], color[3])
 
 SBDColor (const SBDColor &color)
 Constructs a color (color[0], color[1], color[2], color[3])
 
virtual ~SBDColor ()
 Destructs the color.
 

Serialization

bool isSerializable () const
 Returns true.
 
void serialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0)) const
 Serializes the document.
 
void unserialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0))
 Unserializes the document.
 

Operators

SBDColoroperator= (const SBDColor &color)
 

Accessors

float getRed () const
 
void setRed (float red)
 Returns the red component.
 
float getGreen () const
 Sets the red component.
 
void setGreen (float green)
 Returns the green component.
 
float getBlue () const
 Sets the green component.
 
void setBlue (float blue)
 Returns the blue component.
 
float getAlpha () const
 Sets the blue component.
 
void setAlpha (float alpha)
 Returns the alpha component.
 
void getColor (float *color) const
 Sets the alpha component. More...
 

Conversions

static SBDColor fromHSV (float hue, float saturation, float value)
 

Debugging

virtual void print (unsigned int offset=0) const
 Prints the color.
 

Detailed Description

This class describes a color in SAMSON. Please refer to this page for more information.

See also
Color schemes

Member Function Documentation

◆ getColor()

void SBDColor::getColor ( float *  color) const

Stores the four components as a float array