Home | Download | Screen shots | Discussion | Documentation |
---|
Public Member Functions | |
color () throw () | |
Construct. | |
color (const float(&rgb)[3]) throw () | |
color (float r, float g, float b) throw () | |
Construct from red, green, and blue components. | |
const float & | operator[] (size_t index) const throw () |
Index-based component access. | |
float | r () const throw () |
Get the red component. | |
float | g () const throw () |
Get the green component. | |
float | b () const throw () |
Get the blue component. | |
void | r (float value) throw () |
Set the red component. | |
void | g (float value) throw () |
Set the green component. | |
void | b (float value) throw () |
Set the blue component. | |
void | hsv (float(&result)[3]) const throw () |
Get the color as hue, saturation, and value. | |
void | hsv (float h, float s, float v) throw () |
Set the color from hue, saturation, and value. | |
Private Attributes | |
float | rgb [3] |
RGB triplet. | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const color &lhs, const color &rhs) throw() |
Compare for equality. | |
bool | operator!= (const color &lhs, const color &rhs) throw() |
Compare for inequality. | |
std::ostream & | operator<< (std::ostream &out, const color &c) |
Stream output. |
VRML colors are represented as three single precision floating point components--red, green, and blue--ranging from 0.0 to 1.0.
|
Construct from red, green, and blue components.
|
|
Set the blue component.
|
|
Get the blue component.
|
|
Set the green component.
|
|
Get the green component.
|
|
Set the color from hue, saturation, and value.
|
|
Get the color as hue, saturation, and value.
|
|
Index-based component access.
|
|
Set the red component.
|
|
Get the red component.
|
|
Compare for inequality.
|
|
Stream output.
|
|
Compare for equality.
|
|
RGB triplet.
For internal use only.
|