#include <color.hpp>
Definition at line 47 of file color.hpp.
Public Types | |
enum | component { COMPONENT_RED = 0, COMPONENT_GREEN = 1, COMPONENT_BLUE = 2, COMPONENT_ALPHA = 3, NUM_COMPONENTS = 4 } |
Public Member Functions | |
color (const color &c) | |
color (float red=1.0f, float green=1.0f, float blue=1.0f, float alpha=1.0f) | |
const float * | get_val () const |
float & | get_val (const component c) |
const float & | get_val (const component c) const |
color & | operator= (const color &c) |
float & | operator[] (const component c) |
const float & | operator[] (const component c) const |
void | set () const |
Sets the current OpenGL color to the value of this color. | |
Static Public Attributes | |
static const color | BLACK |
static const color | WHITE |
Private Attributes | |
float | val [4] |
enum component |
Definition at line 77 of file color.hpp.
Referenced by material::bind(), light::bind(), and checkered_box::draw().
void set | ( | ) | const |
Sets the current OpenGL color to the value of this color.
Definition at line 49 of file color.cpp.
References CHECK_GL_ERRORS, and color::val.
Referenced by widget::draw(), coord_system::draw(), treebox_node::draw(), treebox_plus::draw(), tabbox::draw(), spherical_clipmap::draw(), scrollbar::draw(), button::draw(), and application::draw_budget().
Definition at line 50 of file color.hpp.
Referenced by color::color(), color::operator=(), and color::set().