28#ifndef _COLOURVALUE_H__
29#define _COLOURVALUE_H__
165 inline const float*
ptr()
const
324 o <<
"ColourValue(" <<
c.r <<
", " <<
c.g <<
", " <<
c.b <<
", " <<
c.a <<
")";
Class representing colour.
static const ColourValue Green
void setAsRGBA(const RGBA val)
Sets colour as RGBA.
void setAsABGR(const ABGR val)
Sets colour as ABGR.
BGRA getAsBGRA(void) const
Retrieves colour as BGRA.
ABGR getAsABGR(void) const
Retrieves colours as ABGR.
void getHSB(Real *hue, Real *saturation, Real *brightness) const
Convert the current colour to Hue, Saturation and Brightness values.
void saturate(void)
Clamps colour value to the range [0, 1].
ARGB getAsARGB(void) const
Retrieves colour as ARGB.
void setHSB(Real hue, Real saturation, Real brightness)
Set a colour value from Hue, Saturation and Brightness.
float * ptr()
Pointer accessor for direct copying.
void setAsARGB(const ARGB val)
Sets colour as ARGB.
RGBA getAsRGBA(void) const
Retrieves colour as RGBA.
bool operator!=(const ColourValue &rhs) const
static const ColourValue Blue
bool operator==(const ColourValue &rhs) const
static const ColourValue Black
const float * ptr() const
Pointer accessor for direct copying.
static const ColourValue White
ColourValue saturateCopy(void) const
As saturate, except that this colour value is unaffected and the saturated colour value is returned a...
static const ColourValue Red
static const ColourValue ZERO
ColourValue(float red=1.0f, float green=1.0f, float blue=1.0f, float alpha=1.0f)
void setAsBGRA(const BGRA val)
Sets colour as BGRA.
Reference-counted shared pointer, used for objects where implicit destruction is required.