Color Class Reference

#include <Color.h>

List of all members.

Public Member Functions

 Color (const unsigned char uR=0, const unsigned char uG=0, const unsigned char uB=0, const unsigned char uA=255)
 Color (const int iR, const int iG, const int iB, const int iA=255)
 Color (const float fR, const float fG, const float fB, const float fA=1.0f)
 Color (const unsigned char *pData)
 Color (const float *pData)
 ~Color ()
void Set (const unsigned char uR, const unsigned char uG, const unsigned char uB, const unsigned char uA=255)
const unsigned char * Get () const
void SetRed (const unsigned char uR)
const unsigned char GetRed () const
void SetGreen (const unsigned char uG)
const unsigned char GetGreen () const
void SetBlue (const unsigned char uB)
const unsigned char GetBlue () const
void SetAlpha (const unsigned char uA)
const unsigned char GetAlpha () const
void SetNormalized (const float fR, const float fG, const float fB, const float fA=1.0f)
void SetNormalizedRed (const float fR)
void SetNormalizedGreen (const float fG)
void SetNormalizedBlue (const float fB)
void SetNormalizedAlpha (const float fA)
const float GetNormalizedRed () const
const float GetNormalizedGreen () const
const float GetNormalizedBlue () const
const float GetNormalizedAlpha () const
void SetHSV (const float fHue, const float fSaturation, const float fValue)
const Coloroperator*= (const float fOther)
const Coloroperator/= (const float fOther)
const Coloroperator+= (const Color &colOther)
const Coloroperator-= (const Color &colOther)
const Color operator* (const float fOther) const
const Color operator/ (const float fOther) const
const Color operator+ (const Color &colOther) const
const Color operator- (const Color &colOther) const
const bool operator== (const Color &colOther) const
const bool operator!= (const Color &colOther) const
const bool choose ()
 Color (const unsigned char uR=0, const unsigned char uG=0, const unsigned char uB=0, const unsigned char uA=255)
 Color (const int iR, const int iG, const int iB, const int iA=255)
 Color (const float fR, const float fG, const float fB, const float fA=1.0f)
 Color (const unsigned char *pData)
 Color (const float *pData)
 ~Color ()
void Set (const unsigned char uR, const unsigned char uG, const unsigned char uB, const unsigned char uA=255)
const unsigned char * Get () const
void SetRed (const unsigned char uR)
const unsigned char GetRed () const
void SetGreen (const unsigned char uG)
const unsigned char GetGreen () const
void SetBlue (const unsigned char uB)
const unsigned char GetBlue () const
void SetAlpha (const unsigned char uA)
const unsigned char GetAlpha () const
void SetNormalized (const float fR, const float fG, const float fB, const float fA=1.0f)
void SetNormalizedRed (const float fR)
void SetNormalizedGreen (const float fG)
void SetNormalizedBlue (const float fB)
void SetNormalizedAlpha (const float fA)
const float GetNormalizedRed () const
const float GetNormalizedGreen () const
const float GetNormalizedBlue () const
const float GetNormalizedAlpha () const
void SetHSV (const float fHue, const float fSaturation, const float fValue)
const Coloroperator*= (const float fOther)
const Coloroperator/= (const float fOther)
const Coloroperator+= (const Color &colOther)
const Coloroperator-= (const Color &colOther)
const Color operator* (const float fOther) const
const Color operator/ (const float fOther) const
const Color operator+ (const Color &colOther) const
const Color operator- (const Color &colOther) const
const bool operator== (const Color &colOther) const
const bool operator!= (const Color &colOther) const
const bool choose ()

Static Public Member Functions

static const bool chooseColor (Color &colColor)
static const bool chooseColor (Color &colColor)

Private Attributes

unsigned char m_uData [4]


Detailed Description

a (r,g,b,a) color value

Constructor & Destructor Documentation

Color::Color ( const unsigned char  uR = 0,
const unsigned char  uG = 0,
const unsigned char  uB = 0,
const unsigned char  uA = 255 
) [inline]

Constructs a new color obect. uR Red uG Green uB Blue uA Alpha

Color::Color ( const int  iR,
const int  iG,
const int  iB,
const int  iA = 255 
) [inline]

Constructs a new color obect. iR Red iG Green iB Blue iA Alpha

Color::Color ( const float  fR,
const float  fG,
const float  fB,
const float  fA = 1.0f 
) [inline]

Constructs a new color obect. fR Red fG Green fB Blue fA Alpha

Color::Color ( const unsigned char *  pData  )  [inline]

Constructs a new color obect. pData Data

Color::Color ( const float *  pData  )  [inline]

Constructs a new color obect. pData Data

Color::~Color (  )  [inline]

Destroys the object.

Color::Color ( const unsigned char  uR = 0,
const unsigned char  uG = 0,
const unsigned char  uB = 0,
const unsigned char  uA = 255 
) [inline]

Constructs a new color obect. uR Red uG Green uB Blue uA Alpha

Color::Color ( const int  iR,
const int  iG,
const int  iB,
const int  iA = 255 
) [inline]

Constructs a new color obect. iR Red iG Green iB Blue iA Alpha

Color::Color ( const float  fR,
const float  fG,
const float  fB,
const float  fA = 1.0f 
) [inline]

Constructs a new color obect. fR Red fG Green fB Blue fA Alpha

Color::Color ( const unsigned char *  pData  )  [inline]

Constructs a new color obect. pData Data

Color::Color ( const float *  pData  )  [inline]

Constructs a new color obect. pData Data

Color::~Color (  )  [inline]

Destroys the object.


Member Function Documentation

const bool Color::choose (  )  [inline]

const bool Color::choose (  )  [inline]

static const bool Color::chooseColor ( Color colColor  )  [inline, static]

static const bool Color::chooseColor ( Color colColor  )  [inline, static]

const unsigned char* Color::Get (  )  const [inline]

Returns the color

Returns:
The color

const unsigned char* Color::Get (  )  const [inline]

Returns the color

Returns:
The color

const unsigned char Color::GetAlpha (  )  const [inline]

Returns the alpha component

Returns:
Alpha

const unsigned char Color::GetAlpha (  )  const [inline]

Returns the alpha component

Returns:
Alpha

const unsigned char Color::GetBlue (  )  const [inline]

Returns the blue component

Returns:
Blue

const unsigned char Color::GetBlue (  )  const [inline]

Returns the blue component

Returns:
Blue

const unsigned char Color::GetGreen (  )  const [inline]

Returns the green component

Returns:
Green

const unsigned char Color::GetGreen (  )  const [inline]

Returns the green component

Returns:
Green

const float Color::GetNormalizedAlpha (  )  const [inline]

Return the normalized alpha.

Returns:
Normalized alpha

const float Color::GetNormalizedAlpha (  )  const [inline]

Return the normalized alpha.

Returns:
Normalized alpha

const float Color::GetNormalizedBlue (  )  const [inline]

Return the normalized blue.

Returns:
Normalized blue

const float Color::GetNormalizedBlue (  )  const [inline]

Return the normalized blue.

Returns:
Normalized blue

const float Color::GetNormalizedGreen (  )  const [inline]

Return the normalized green.

Returns:
Normalized green

const float Color::GetNormalizedGreen (  )  const [inline]

Return the normalized green.

Returns:
Normalized green

const float Color::GetNormalizedRed (  )  const [inline]

Return the normalized red.

Returns:
Normalized red

const float Color::GetNormalizedRed (  )  const [inline]

Return the normalized red.

Returns:
Normalized red

const unsigned char Color::GetRed (  )  const [inline]

Returns the red component

Returns:
Red

const unsigned char Color::GetRed (  )  const [inline]

Returns the red component

Returns:
Red

const bool Color::operator!= ( const Color colOther  )  const [inline]

const bool Color::operator!= ( const Color colOther  )  const [inline]

const Color Color::operator* ( const float  fOther  )  const [inline]

const Color Color::operator* ( const float  fOther  )  const [inline]

const Color& Color::operator*= ( const float  fOther  )  [inline]

const Color& Color::operator*= ( const float  fOther  )  [inline]

const Color Color::operator+ ( const Color colOther  )  const [inline]

const Color Color::operator+ ( const Color colOther  )  const [inline]

const Color& Color::operator+= ( const Color colOther  )  [inline]

const Color& Color::operator+= ( const Color colOther  )  [inline]

const Color Color::operator- ( const Color colOther  )  const [inline]

const Color Color::operator- ( const Color colOther  )  const [inline]

const Color& Color::operator-= ( const Color colOther  )  [inline]

const Color& Color::operator-= ( const Color colOther  )  [inline]

const Color Color::operator/ ( const float  fOther  )  const [inline]

const Color Color::operator/ ( const float  fOther  )  const [inline]

const Color& Color::operator/= ( const float  fOther  )  [inline]

const Color& Color::operator/= ( const float  fOther  )  [inline]

const bool Color::operator== ( const Color colOther  )  const [inline]

const bool Color::operator== ( const Color colOther  )  const [inline]

void Color::Set ( const unsigned char  uR,
const unsigned char  uG,
const unsigned char  uB,
const unsigned char  uA = 255 
) [inline]

Sets the color. uR Red uG Green uB Blue uA Alpha

void Color::Set ( const unsigned char  uR,
const unsigned char  uG,
const unsigned char  uB,
const unsigned char  uA = 255 
) [inline]

Sets the color. uR Red uG Green uB Blue uA Alpha

void Color::SetAlpha ( const unsigned char  uA  )  [inline]

Sets the alpha component

Parameters:
uA Alpha

void Color::SetAlpha ( const unsigned char  uA  )  [inline]

Sets the alpha component

Parameters:
uA Alpha

void Color::SetBlue ( const unsigned char  uB  )  [inline]

Sets the blue component

Parameters:
uB Blue

void Color::SetBlue ( const unsigned char  uB  )  [inline]

Sets the blue component

Parameters:
uB Blue

void Color::SetGreen ( const unsigned char  uG  )  [inline]

Sets the green component

Parameters:
uG Green

void Color::SetGreen ( const unsigned char  uG  )  [inline]

Sets the green component

Parameters:
uG Green

void Color::SetHSV ( const float  fHue,
const float  fSaturation,
const float  fValue 
) [inline]

Sets the color with values of the hsv color space fHue Hue fSaturation Saturation fValue Value

void Color::SetHSV ( const float  fHue,
const float  fSaturation,
const float  fValue 
) [inline]

Sets the color with values of the hsv color space fHue Hue fSaturation Saturation fValue Value

void Color::SetNormalized ( const float  fR,
const float  fG,
const float  fB,
const float  fA = 1.0f 
) [inline]

Sets the color given normalized values. fR Normalized red fG Normalized green fB Normalized blue fA Normalized alpha

void Color::SetNormalized ( const float  fR,
const float  fG,
const float  fB,
const float  fA = 1.0f 
) [inline]

Sets the color given normalized values. fR Normalized red fG Normalized green fB Normalized blue fA Normalized alpha

void Color::SetNormalizedAlpha ( const float  fA  )  [inline]

Sets the alpha given normalized value. fA Normalized alpha

void Color::SetNormalizedAlpha ( const float  fA  )  [inline]

Sets the alpha given normalized value. fA Normalized alpha

void Color::SetNormalizedBlue ( const float  fB  )  [inline]

Sets the blue given normalized value. fB Normalized blue

void Color::SetNormalizedBlue ( const float  fB  )  [inline]

Sets the blue given normalized value. fB Normalized blue

void Color::SetNormalizedGreen ( const float  fG  )  [inline]

Sets the green given normalized value. fG Normalized green

void Color::SetNormalizedGreen ( const float  fG  )  [inline]

Sets the green given normalized value. fG Normalized green

void Color::SetNormalizedRed ( const float  fR  )  [inline]

Sets the red given normalized value. fR Normalized red

void Color::SetNormalizedRed ( const float  fR  )  [inline]

Sets the red given normalized value. fR Normalized red

void Color::SetRed ( const unsigned char  uR  )  [inline]

Sets the red component

Parameters:
uR Red

void Color::SetRed ( const unsigned char  uR  )  [inline]

Sets the red component

Parameters:
uR Red


Member Data Documentation

unsigned char Color::m_uData [private]


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

Generated on Tue Jan 20 23:44:12 2009 for FlowVis by  doxygen 1.5.7.1