Home | Download | Screen shots | Discussion | Documentation | Links |
---|
Inheritance diagram for SFColor:
Public Types | |
typedef const | float (&ConstArrayReference)[3] |
typedef float(* | ArrayPointer )[3] |
typedef const float(* | ConstArrayPointer )[3] |
Public Methods | |
typedef | float (&ArrayReference)[3] |
SFColor () throw () | |
Construct with the default value, (0, 0, 0). | |
SFColor (ConstArrayReference rgb) throw () | |
Construct a SFColor. | |
SFColor (float r, float g, float b) throw () | |
Construct a SFColor. | |
virtual | ~SFColor () throw () |
Destructor. | |
float | operator[] (size_t index) const throw () |
Array element dereference operator (const version). | |
float & | operator[] (size_t index) throw () |
Array element dereference operator (non-const version). | |
float | getR () const throw () |
Get the red component. | |
float | getG () const throw () |
Get the green component. | |
float | getB () const throw () |
Get the blue component. | |
ConstArrayReference | get () const throw () |
Get the value. | |
void | set (ConstArrayReference rgb) throw () |
Set the value. | |
void | setHSV (float h, float s, float v) throw () |
Set the value using HSV. | |
void | getHSV (ArrayReference hsv) const throw () |
Get the value expressed in HSV. | |
virtual std::auto_ptr< FieldValue > | clone () const throw (std::bad_alloc) |
Virtual copy constructor. | |
virtual FieldValue & | assign (const FieldValue &value) throw (std::bad_cast) |
Virtual assignment. | |
virtual Type | type () const throw () |
Get the FieldValue::Type associated with this class. | |
Static Public Methods | |
void | HSVtoRGB (ConstArrayReference hsv, ArrayReference rgb) throw () |
Convert a color from HSV to RGB. | |
void | RGBtoHSV (ConstArrayReference rgb, ArrayReference hsv) throw () |
Convert a color from RGB to HSV. | |
Private Methods | |
virtual void | print (std::ostream &out) const |
Print to an output stream. | |
Private Attributes | |
float | value [3] |
|
Construct with the default value, (0, 0, 0).
|
|
Construct a SFColor.
|
|
Construct a SFColor.
|
|
Destructor.
|
|
Virtual assignment.
Implements FieldValue. |
|
Virtual copy constructor.
Implements FieldValue. |
|
Get the value.
|
|
Get the blue component.
|
|
Get the green component.
|
|
Get the value expressed in HSV.
|
|
Get the red component.
|
|
Convert a color from HSV to RGB. Convert from HSV (with(with h in [0,360), s, v in [0,1]) to RGB (with each component in [0,1]).
|
|
Array element dereference operator (non-const version).
|
|
Array element dereference operator (const version).
|
|
Print to an output stream.
Implements FieldValue. |
|
Convert a color from RGB to HSV. Convert from RGB (with each component in [0,1]) to HSV (with h in [0,360), s, v in [0,1]).
|
|
Set the value.
|
|
Set the value using HSV.
|
|
Get the FieldValue::Type associated with this class.
Implements FieldValue. |