#include <Color.h>

Public Member Functions | |
| Color () | |
| Standard constructor. | |
| Color (const enum colorCode &code) | |
| Constructor with initialization. | |
| Color (const GLubyte &red, const GLubyte &green, const GLubyte &blue) | |
| Constructor with initialization. | |
| Color (const GLubyte &red, const GLubyte &green, const GLubyte &blue, const GLubyte &alpha) | |
| Constructor with initialization. | |
| Color (const Color &source) | |
| Copy constructor. | |
| ~Color () | |
| Destructor. | |
| void | colorGl (const bool &alpha) |
| Uses this color in OpenGl;. | |
| GLubyte | getRed () |
| Getter for red. | |
| GLubyte | getGreen () |
| Getter for green. | |
| GLubyte | getBlue () |
| Getter for blue. | |
| GLubyte | getAlpha () |
| Getter for alpha. | |
| void | setRed (const GLubyte &red) |
| Setter for red. | |
| void | setGreen (const GLubyte &green) |
| Setter for green. | |
| void | setBlue (const GLubyte &blue) |
| Setter for blue. | |
| void | setAlpha (const GLubyte &alpha) |
| Setter for alpha. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
| Color | operator= (const Color &color) |
| Operator =. | |
Private Attributes | |
| GLubyte | channels [4] |
| The color values. | |
Color objects model colors in the RGBA space and provide means to use them in OpenGL.
| Color::Color | ( | ) |
Standard constructor.
Creates a black color
| Color::Color | ( | const enum colorCode & | code | ) |
Constructor with initialization.
Creates a color by initialization.
| code | The color code to be used |
| Color::Color | ( | const GLubyte & | red, | |
| const GLubyte & | green, | |||
| const GLubyte & | blue | |||
| ) |
Constructor with initialization.
Creates a color by initialization.
| red | The red channel value of the color | |
| green | The green channel value of the color | |
| blue | The blue channel value of the color |
| Color::Color | ( | const GLubyte & | red, | |
| const GLubyte & | green, | |||
| const GLubyte & | blue, | |||
| const GLubyte & | alpha | |||
| ) |
Constructor with initialization.
Creates a color by initialization.
| red | The red channel value of the color | |
| green | The green channel value of the color | |
| blue | The blue channel value of the color | |
| alpha | The alpha channel value of the color |
| Color::Color | ( | const Color & | source | ) |
Copy constructor.
Creates a new color by cloning a source
| source | The color to be cloned |
| Color::~Color | ( | ) |
Destructor.
| void Color::colorGl | ( | const bool & | alpha | ) |
Uses this color in OpenGl;.
| GLubyte Color::getRed | ( | ) |
Getter for red.
| GLubyte Color::getGreen | ( | ) |
Getter for green.
| GLubyte Color::getBlue | ( | ) |
Getter for blue.
| GLubyte Color::getAlpha | ( | ) |
Getter for alpha.
| void Color::setRed | ( | const GLubyte & | red | ) |
Setter for red.
| red | the new value for the red channel |
| void Color::setGreen | ( | const GLubyte & | green | ) |
Setter for green.
| green | the new value for the green channel |
| void Color::setBlue | ( | const GLubyte & | blue | ) |
Setter for blue.
| blue | the new value for the blue channel |
| void Color::setAlpha | ( | const GLubyte & | alpha | ) |
Setter for alpha.
| alpha | the new value for the alpha channel |
| string Color::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from Object.
| string Color::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from Object.
| enum classId Color::classId | ( | ) | const [virtual] |
GLubyte Color::channels[4] [private] |
The color values.
1.5.6