OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
Class representing colour. More...
#include <OgreColourValue.h>
Public Member Functions | |
ColourValue (float red=1.0f, float green=1.0f, float blue=1.0f, float alpha=1.0f) | |
ABGR | getAsABGR (void) const |
Retrieves colours as ABGR. More... | |
ARGB | getAsARGB (void) const |
Retrieves colour as ARGB. More... | |
BGRA | getAsBGRA (void) const |
Retrieves colour as BGRA. More... | |
RGBA | getAsRGBA (void) const |
Retrieves colour as RGBA. More... | |
void | getHSB (float &hue, float &saturation, float &brightness) const |
Convert the current colour to Hue, Saturation and Brightness values. More... | |
void | getHSB (float *hue, float *saturation, float *brightness) const |
bool | operator!= (const ColourValue &rhs) const |
ColourValue | operator* (const float fScalar) const |
ColourValue | operator* (const ColourValue &rhs) const |
ColourValue & | operator*= (const float fScalar) |
ColourValue | operator+ (const ColourValue &rkVector) const |
ColourValue & | operator+= (const ColourValue &rkVector) |
ColourValue | operator- (const ColourValue &rkVector) const |
ColourValue & | operator-= (const ColourValue &rkVector) |
ColourValue | operator/ (const ColourValue &rhs) const |
ColourValue | operator/ (const float fScalar) const |
ColourValue & | operator/= (const float fScalar) |
bool | operator== (const ColourValue &rhs) const |
float | operator[] (const size_t i) const |
Array accessor operator. More... | |
float & | operator[] (const size_t i) |
Array accessor operator. More... | |
float * | ptr () |
Pointer accessor for direct copying. More... | |
const float * | ptr () const |
Pointer accessor for direct copying. More... | |
void | saturate (void) |
Clamps colour value to the range [0, 1]. More... | |
ColourValue | saturateCopy (void) const |
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy. More... | |
void | setAsABGR (ABGR val) |
Sets colour as ABGR. More... | |
void | setAsARGB (ARGB val) |
Sets colour as ARGB. More... | |
void | setAsBGRA (BGRA val) |
Sets colour as BGRA. More... | |
void | setAsRGBA (RGBA val) |
Sets colour as RGBA. More... | |
void | setHSB (float hue, float saturation, float brightness) |
Set a colour value from Hue, Saturation and Brightness. More... | |
Public Attributes | |
float | a |
float | b |
float | g |
float | r |
Static Public Attributes | |
static const ColourValue | Black |
static const ColourValue | Blue |
static const ColourValue | Green |
static const ColourValue | Red |
static const ColourValue | White |
static const ColourValue | ZERO |
Friends | |
ColourValue | operator* (const float fScalar, const ColourValue &rkVector) |
std::ostream & | operator<< (std::ostream &o, const ColourValue &c) |
Function for writing to a stream. More... | |
Class representing colour.
|
inlineexplicit |
References Ogre::operator!=(), and Ogre::operator==().
bool Ogre::ColourValue::operator== | ( | const ColourValue & | rhs | ) | const |
bool Ogre::ColourValue::operator!= | ( | const ColourValue & | rhs | ) | const |
RGBA Ogre::ColourValue::getAsRGBA | ( | void | ) | const |
Retrieves colour as RGBA.
ARGB Ogre::ColourValue::getAsARGB | ( | void | ) | const |
Retrieves colour as ARGB.
BGRA Ogre::ColourValue::getAsBGRA | ( | void | ) | const |
Retrieves colour as BGRA.
ABGR Ogre::ColourValue::getAsABGR | ( | void | ) | const |
Retrieves colours as ABGR.
void Ogre::ColourValue::setAsRGBA | ( | RGBA | val | ) |
Sets colour as RGBA.
void Ogre::ColourValue::setAsARGB | ( | ARGB | val | ) |
Sets colour as ARGB.
void Ogre::ColourValue::setAsBGRA | ( | BGRA | val | ) |
Sets colour as BGRA.
void Ogre::ColourValue::setAsABGR | ( | ABGR | val | ) |
Sets colour as ABGR.
|
inline |
Clamps colour value to the range [0, 1].
Referenced by saturateCopy().
|
inline |
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy.
References saturate().
|
inline |
Array accessor operator.
|
inline |
Array accessor operator.
|
inline |
Pointer accessor for direct copying.
|
inline |
Pointer accessor for direct copying.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Ogre::ColourValue::setHSB | ( | float | hue, |
float | saturation, | ||
float | brightness | ||
) |
Set a colour value from Hue, Saturation and Brightness.
hue | Hue value, scaled to the [0,1] range as opposed to the 0-360 |
saturation | Saturation level, [0,1] |
brightness | Brightness level, [0,1] |
void Ogre::ColourValue::getHSB | ( | float & | hue, |
float & | saturation, | ||
float & | brightness | ||
) | const |
Convert the current colour to Hue, Saturation and Brightness values.
hue | Output hue value, scaled to the [0,1] range as opposed to the 0-360 |
saturation | Output saturation level, [0,1] |
brightness | Output brightness level, [0,1] |
|
inline |
|
friend |
|
friend |
Function for writing to a stream.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
float Ogre::ColourValue::r |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), and Ogre::RenderSystem::setAmbientLight().
float Ogre::ColourValue::g |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), and Ogre::RenderSystem::setAmbientLight().
float Ogre::ColourValue::b |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), and Ogre::RenderSystem::setAmbientLight().
float Ogre::ColourValue::a |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), and operator/().