#include <color.h>
Inheritance diagram for GltColor:


Public Methods | |
| GltColor () | |
| Default constructor: black color. | |
| GltColor (const float red, const float green, const float blue, const float alpha=1.0) | |
| Construct from float red, green and blue components. | |
| GltColor (const double red, const double green, const double blue, const double alpha=1.0) | |
| Construct from double precision red, green and blue components. | |
| GltColor (const int red, const int green, const int blue, const int alpha=1) | |
| Construct from integer red, green and blue components. | |
| GltColor (const GltColor &col) | |
| Copy constructor. | |
| GltColor (const GltColor &col, const real alpha) | |
| Copy constructor with alpha. | |
| GltColor (const Vector &col) | |
| Construct from x,y,z tuple. | |
| GltColor (const std::string &name) | |
| Construct from name or HTML color string. | |
| ~GltColor () | |
| Destructor. | |
| GltColor & | operator= (const GltColor &) |
| Assignment operator. | |
| void | glColor () const |
| Set the current OpenGL color. | |
| void | glColor (const GLdouble alpha) const |
| Set the current OpenGL color with alpha. | |
| void | glClearColor () const |
| Set the current OpenGL clear color. | |
| void | glFogColor () const |
| Set the current OpenGL fog color. | |
| void | glMaterial (const GLenum face, const GLenum field) const |
| Set an OpenGL material setting. | |
| void | glGetMaterial (const GLenum face, const GLenum field) |
| Get an OpenGL material setting. | |
| void | glLight (const GLenum light, const GLenum field) const |
| Set an OpenGL lighting setting. | |
| void | glGetLight (const GLenum light, const GLenum field) |
| Get an OpenGL lighting setting. | |
| real & | red () |
| red component | |
| real & | green () |
| green component | |
| real & | blue () |
| blue component | |
| real & | alpha () |
| alpha component | |
| const real & | red () const |
| red component | |
| const real & | green () const |
| green component | |
| const real & | blue () const |
| blue component | |
| const real & | alpha () const |
| alpha component | |
| const real | brightness () const |
| Obtain the brightness of the color. | |
| void | toHSV (real &h, real &s, real &v) const |
| Convert to HSV. | |
| void | fromHSV (const real h, const real s, const real v) |
| Convert from HSV. | |
| const bool | isGrey () const |
| Is the color (exactly) grey? | |
| std::string | html () const |
| Convert to HTML RGB color string. | |
| bool | operator< (const GltColor &c) const |
| less-than comparison | |
| bool | operator> (const GltColor &c) const |
| greater-than comparison | |
| bool | operator== (const GltColor &c) const |
| equal-to comparison | |
Friends | |
| GltColor | operator * (const GltColor &c, const real x) |
| Scale color. | |
| GltColor | operator/ (const GltColor &c, const real x) |
| Scale color. | |
| GltColor | operator * (const real x, const GltColor &c) |
| Scale color. | |
| GltColor | operator+ (const GltColor &c1, const GltColor &c2) |
| Add red, green and blue components. | |
| GltColor | operator- (const GltColor &c1, const GltColor &c2) |
| Subtract red, green and blue components. | |
See also Colorspace FAQ http://www.faqs.org/faqs/graphics/colorspace-faq/
Definition at line 54 of file color.h.
1.2.18