#include <Color.h>
Collaboration diagram for Teddy::Graphics::Color:
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.
Definition at line 73 of file Color.h.
|
Default Color constructor.
Definition at line 64 of file Color.cpp. References rgba. Referenced by operator *, operator+, and operator-. |
|
Color constructor with given rgb components.
Definition at line 78 of file Color.cpp. References rgba. |
|
Color constructor with given rgba components.
Definition at line 93 of file Color.cpp. References rgba. |
|
Color constructor with given rgba components in array.
Definition at line 105 of file Color.cpp. References rgba. |
|
Debugging information.
|
|
Apply color to OpenGL state.
Definition at line 120 of file Color.cpp. References rgba. |
|
|
|
Definition at line 220 of file Color.cpp. Referenced by rgb2hsv. |
|
Definition at line 236 of file Color.cpp. Referenced by rgb2hsv. |
|
Multiply this Color with a scalar.
|
|
Multiply this Color with a scalar.
Definition at line 209 of file Color.cpp. References rgba. |
|
Add two colors together.
|
|
Add two colors together.
Definition at line 147 of file Color.cpp. References rgba. |
|
Substract other Color from this Color.
|
|
Substract other Color from this Color.
Definition at line 178 of file Color.cpp. References rgba. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The color components in float array.
Definition at line 81 of file Color.h. Referenced by Teddy::Materials::Light::applyLight, Color, Teddy::Scenes::Scene::draw, Teddy::Imports::LWLight::genLight, glApply, operator *, operator *=, operator+, operator+=, operator-, and operator-=. |
|
|
|
|