Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GltColor Class Reference
[GLT]

OpenGL RGB Color. More...

#include <color.h>

Inheritance diagram for GltColor:

Inheritance graph
[legend]
Collaboration diagram for GltColor:

Collaboration graph
[legend]
List of all members.

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.

realred ()
 red component

realgreen ()
 green component

realblue ()
 blue component

realalpha ()
 alpha component

const realred () const
 red component

const realgreen () const
 green component

const realblue () const
 blue component

const realalpha () 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.


Detailed Description

OpenGL RGB Color.

See also Colorspace FAQ http://www.faqs.org/faqs/graphics/colorspace-faq/

Definition at line 54 of file color.h.


The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:42 2002 for GLT by doxygen1.2.18