Public Member Functions | Static Public Attributes | Friends
Color Class Reference

Defines a color. More...

#include <Color.hh>

List of all members.

Public Member Functions

 Color ()
 Constructor.
 Color (float r, float g, float b, float a=1.0)
 Constructor.
 Color (const Color &clr)
 Copy Constructor.
virtual ~Color ()
 Destructor.
void Reset ()
 Reset the color to default values.
void Set (float r=1, float g=1, float b=1, float a=1)
 Set the contents of the vector.
math::Vector3 GetAsHSV () const
 Get the color in HSV colorspace.
void SetFromHSV (float h, float s, float v)
 Set a color based on HSV values.
math::Vector3 GetAsYUV () const
 Get the color in YUV colorspace.
void SetFromYUV (float y, float u, float v)
 Set from yuv.
const Coloroperator= (const Color &_pt)
 Equal operator.
float operator[] (unsigned int index)
 Array index operator.
float R () const
 Get the red color.
float G () const
 Get the green color.
float B () const
 Get the blue color.
float A () const
 Get the alpha color.
void R (float r)
 Set the red color.
void G (float g)
 Set the green color.
void B (float b)
 Set the blue color.
void A (float a)
 Set the alpha color.
Color operator+ (const Color &pt) const
Color operator+ (const float &v) const
const Coloroperator+= (const Color &pt)
Color operator- (const Color &pt) const
Color operator- (const float &pt) const
const Coloroperator-= (const Color &pt)
const Color operator/ (const float &i) const
const Color operator/ (const Color &pt) const
const Coloroperator/= (const Color &pt)
const Color operator* (const float &i) const
const Color operator* (const Color &pt) const
const Coloroperator*= (const Color &pt)
bool operator== (const Color &pt) const
bool operator!= (const Color &pt) const

Static Public Attributes

static const Color White
static const Color Black
static const Color Red
static const Color Green
static const Color Blue

Friends

std::ostream & operator<< (std::ostream &out, const Color &pt)
std::istream & operator>> (std::istream &in, Color &pt)

Detailed Description

Defines a color.


The documentation for this class was generated from the following file: