RTFX  0.3
Real time special effects collaborative visualization and production library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
RTFX::Colour Class Reference

A class to represent several formats of colours. More...

#include <algebra.hpp>

Public Member Functions

 Colour ()
 
 ~Colour ()
 
 Colour (const Colour &_other)
 
Colouroperator= (const Colour &_other)
 
void SetRGB (double _r, double _g, double _b)
 
void SetRed (double _r)
 
void SetGreen (double _g)
 
void SetBlue (double _b)
 
void SetHSV (double _h, double _s, double _v)
 
void SetHue (double _h)
 
void SetSaturation (double _s)
 
void SetValue (double _v)
 
double * GetRGB ()
 
double GetRed ()
 
double GetGreen ()
 
double GetBlue ()
 
double * GetHSV ()
 
double GetHue ()
 
double GetSaturation ()
 
double GetValue ()
 
void SetAlpha (double _alpha)
 
double GetAlpha ()
 
void MultiplyByScalar (double _s)
 
void AddColour (Colour _c)
 
bool operator== (Colour &_c)
 

Private Member Functions

void Init ()
 
template<class Archive >
void serialize (Archive &_ar, const unsigned int _version)
 

Private Attributes

double rgb [3]
 
double hsv [3]
 
double alpha
 

Friends

class boost::serialization::access
 

Detailed Description

A class to represent several formats of colours.

Constructor & Destructor Documentation

RTFX::Colour::Colour ( )
inline

Constructor: calls Init function

RTFX::Colour::~Colour ( )
inline

Destructor

RTFX::Colour::Colour ( const Colour _other)
inline

Copy constructor

References alpha, hsv, and rgb.

Member Function Documentation

void RTFX::Colour::AddColour ( Colour  _c)
inline

Add another colour to this one

References GetAlpha(), GetBlue(), GetGreen(), GetHue(), GetRed(), GetSaturation(), and GetValue().

double RTFX::Colour::GetAlpha ( )
inline

Get alpha

double RTFX::Colour::GetBlue ( )
inline

Get B

double RTFX::Colour::GetGreen ( )
inline

Get G

double* RTFX::Colour::GetHSV ( )
inline

Get HSV

double RTFX::Colour::GetHue ( )
inline

Get H

double RTFX::Colour::GetRed ( )
inline

Get R

double* RTFX::Colour::GetRGB ( )
inline

Get RGB

double RTFX::Colour::GetSaturation ( )
inline

Get S

double RTFX::Colour::GetValue ( )
inline

Get V

void RTFX::Colour::Init ( )
inlineprivate

Init colour values to zeros

void RTFX::Colour::MultiplyByScalar ( double  _s)
inline

Multiply colour by scalar value

Colour& RTFX::Colour::operator= ( const Colour _other)
inline

Equals operator sets this point to equal the other point

References alpha, hsv, and rgb.

bool RTFX::Colour::operator== ( Colour _c)
inline

Determine if this colour equals the input one

References GetAlpha(), GetBlue(), GetGreen(), GetHue(), GetRed(), GetSaturation(), and GetValue().

void RTFX::Colour::SetAlpha ( double  _alpha)
inline

Set Alpha

void RTFX::Colour::SetBlue ( double  _b)
inline

Set B

void RTFX::Colour::SetGreen ( double  _g)
inline

Set G

void RTFX::Colour::SetHSV ( double  _h,
double  _s,
double  _v 
)
inline

Set HSV

void RTFX::Colour::SetHue ( double  _h)
inline

Set H

void RTFX::Colour::SetRed ( double  _r)
inline

Set R

void RTFX::Colour::SetRGB ( double  _r,
double  _g,
double  _b 
)
inline

Set RGB

void RTFX::Colour::SetSaturation ( double  _s)
inline

Set S

void RTFX::Colour::SetValue ( double  _v)
inline

Set V

Member Data Documentation

double RTFX::Colour::alpha
private

the alpha value

double RTFX::Colour::hsv[3]
private

The array which holds the HSV colour data

double RTFX::Colour::rgb[3]
private

The array which holds the RGB colour data


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