Public Methods |
| | Color () |
| | Default Color constructor. More...
|
| | Color (const float r, const float g, const float b) |
| | Color constructor with given rgb components. More...
|
| | Color (const float r, const float g, const float b, const float a) |
| | Color constructor with given rgba components. More...
|
| | Color (const float rgba[4]) |
| | Color constructor with given rgba components in array. More...
|
| void | debug () |
| | Debugging information. More...
|
| void | glApply () const |
| | Apply color to OpenGL state. More...
|
| Color | operator+ (const Color &c) const |
| | Add two colors together. More...
|
| Color & | operator+= (const Color &c) |
| | Add two colors together. More...
|
| Color | operator- (const Color &c) const |
| | Substract other Color from this Color. More...
|
| Color & | operator-= (const Color &c) |
| | Substract other Color from this Color. More...
|
| Color | operator * (const float &k) const |
| | Multiply this Color with a scalar. More...
|
| Color & | operator *= (const float &k) |
| | Multiply this Color with a scalar. More...
|
Static Public Methods |
| float | maxrgb (float r, float g, float b) |
| float | minrgb (float r, float g, float b) |
| void | rgb2hsv (float r, float g, float b, float *hout, float *sout, float *vout) |
| void | hsv2rgb (float hin, float s, float v, float *rout, float *gout, float *bout) |
Public Attributes |
| float | rgba [4] |
| | The color components in float array. More...
|
Static Public Attributes |
| Color | BLACK = Color( C_BLACK ) |
| Color | WHITE = Color( C_WHITE ) |
| Color | RED = Color( C_RED ) |
| Color | GREEN = Color( C_GREEN ) |
| Color | BLUE = Color( C_BLUE ) |
| Color | GRAY = Color( C_GRAY ) |
| Color | CYAN = Color( C_CYAN ) |
| Color | MAGENTA = Color( C_MAGENTA ) |
| Color | YELLOW = Color( C_YELLOW ) |
| Color | ORANGE = Color( C_ORANGE ) |
| Color | DARK_RED = Color( C_DARK_RED ) |
| Color | DARK_GREEN = Color( C_DARK_GREEN ) |
| Color | DARK_BLUE = Color( C_DARK_BLUE ) |
| Color | DARK_CYAN = Color( C_DARK_CYAN ) |
| Color | DARK_MAGENTA = Color( C_DARK_MAGENTA ) |
| Color | DARK_YELLOW = Color( C_DARK_YELLOW ) |
| Color | DARK_ORANGE = Color( C_DARK_ORANGE ) |
| Color | LIGHT_RED = Color( C_LIGHT_RED ) |
| Color | LIGHT_GREEN = Color( C_LIGHT_GREEN ) |
| Color | LIGHT_BLUE = Color( C_LIGHT_BLUE ) |
| Color | LIGHT_CYAN = Color( C_LIGHT_CYAN ) |
| Color | LIGHT_MAGENTA = Color( C_LIGHT_MAGENTA ) |
| Color | LIGHT_YELLOW = Color( C_LIGHT_YELLOW ) |
| Color | LIGHT_ORANGE = Color( C_LIGHT_ORANGE ) |
| Color | GRAY_50 = Color( C_GRAY_50 ) |
| Color | GRAY_25 = Color( C_GRAY_25 ) |
| Color | GRAY_75 = Color( C_GRAY_75 ) |
This class stores colors and applies them to OpenGL.