#include <CColor.h>
Public Member Functions | |
cColorb () | |
cColorb (const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue, const GLubyte a_alpha=0xff) | |
~cColorb () | |
void | set (const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue, const GLubyte a_alpha=0xff) |
void | setMem3 (const GLubyte *a_colorRGB) |
void | setMem4 (const GLubyte *a_colorRGBA) |
void | setR (const GLubyte a_red) |
GLfloat | getR () const |
void | setG (const GLubyte a_green) |
GLfloat | getG () const |
void | setB (const GLubyte a_blue) |
GLfloat | getB () const |
void | setA (const GLubyte a_alpha) |
GLfloat | getA () const |
void | render () const |
const GLubyte * | pColor () const |
cColorf | getColorf () const |
Public Attributes | |
GLubyte | m_color [4] |
Color in GLubyte format [R,G,B,A]. |
cColorb::cColorb | ( | ) | [inline] |
Constructor of cColorb.
cColorb::cColorb | ( | const GLubyte | a_red, | |
const GLubyte | a_green, | |||
const GLubyte | a_blue, | |||
const GLubyte | a_alpha = 0xff | |||
) | [inline] |
Constructor of cColorb. Define a color by passing its RGBA components. as parameters.
a_red | Red component. | |
a_green | Green component. | |
a_blue | Blue component. | |
a_alpha | Alpha component. |
cColorb::~cColorb | ( | ) | [inline] |
Destructor of cColorf.
GLfloat cColorb::getA | ( | ) | const [inline] |
Read the alpha component.
GLfloat cColorb::getB | ( | ) | const [inline] |
Read the blue component.
cColorf cColorb::getColorf | ( | void | ) | const |
GLfloat cColorb::getG | ( | ) | const [inline] |
Read the green component.
GLfloat cColorb::getR | ( | ) | const [inline] |
Read the red component.
const GLubyte* cColorb::pColor | ( | ) | const [inline] |
Return a pointer to the raw color array.
void cColorb::render | ( | ) | const [inline] |
Render this color in OpenGL (sets it to be the current color). Does not confirm that GL color-tracking is enabled.
void cColorb::set | ( | const GLubyte | a_red, | |
const GLubyte | a_green, | |||
const GLubyte | a_blue, | |||
const GLubyte | a_alpha = 0xff | |||
) | [inline] |
Set a color by passing its RGBA components as parameters.
a_red | Red component. | |
a_green | Green component. | |
a_blue | Blue component. | |
a_alpha | Alpha component. |
void cColorb::setA | ( | const GLubyte | a_alpha | ) | [inline] |
Set the alpha component.
a_alpha | Alpha component. |
void cColorb::setB | ( | const GLubyte | a_blue | ) | [inline] |
Set the blue component.
a_blue | Blue component. |
void cColorb::setG | ( | const GLubyte | a_green | ) | [inline] |
Set the green component.
a_green | Green component. |
void cColorb::setMem3 | ( | const GLubyte * | a_colorRGB | ) | [inline] |
Set color by copying three floats from an external array, each describing an RGB component. Alpha is set to 0xff.
a_colorRGB | Pointer to array of type GLubyte. |
void cColorb::setMem4 | ( | const GLubyte * | a_colorRGBA | ) | [inline] |
Set color by copying four floats from an external array, each describing an RGBA component.
a_colorRGBA | Pointer to an array of type GLubyte. |
void cColorb::setR | ( | const GLubyte | a_red | ) | [inline] |
Set the red component.
a_red | Red component. |