#include <color.h>
Public Member Functions | |
| Color () | |
| Constructor. | |
| Color (float r, float g, float b) | |
| Constructor. | |
| Color (const Color &c) | |
| Copy constructor. | |
| ~Color () | |
| Destructor. | |
| const Color & | operator= (const Color &c) |
| Assignment operator. | |
| void | red (float r) |
| Sets the red component. | |
| void | green (float g) |
| Sets the green component. | |
| void | blue (float b) |
| Sets the blue component. | |
| float | red () const |
| Gets the red component. | |
| float | green () const |
| Gets the green component. | |
| float | blue () const |
| Gets the blue component. | |
| Color | operator+ (const Color &c) |
| Add colors. | |
| Color | operator- (const Color &c) |
| Subtract colors. | |
Private Attributes | |
| float | c_red |
| The red component. | |
| float | c_green |
| The green component. | |
| float | c_blue |
| The blue component. | |
| GVectors::Color::Color | ( | ) | [inline] |
Sets all component to zero.
| GVectors::Color::Color | ( | float | r, | |
| float | g, | |||
| float | b | |||
| ) | [inline] |
Initializes the color components to the given values.
| r | Value of the red component. | |
| g | Value of the green component. | |
| b | Value of the blue component. |
| GVectors::Color::Color | ( | const Color & | c | ) | [inline] |
| GVectors::Color::~Color | ( | ) | [inline] |
Destructor. Just for completeness. Does nothing.
| void GVectors::Color::red | ( | float | r | ) | [inline] |
Sets the red component.
| r | Value of the red component. |
| void GVectors::Color::green | ( | float | g | ) | [inline] |
Sets the green component.
| g | Value of the green component. |
| void GVectors::Color::blue | ( | float | b | ) | [inline] |
Sets the blue component.
| b | Value of the blue component. |
| float GVectors::Color::red | ( | ) | const [inline] |
Gets the red component.
| float GVectors::Color::green | ( | ) | const [inline] |
Gets the green component.
| float GVectors::Color::blue | ( | ) | const [inline] |
Gets the blue component.
float GVectors::Color::c_red [private] |
The red component of the color.
float GVectors::Color::c_green [private] |
The green component of the color.
float GVectors::Color::c_blue [private] |
The blue component of the color.
1.4.7