OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
Class representing colour. More...
#include <OgreColourValue.h>
Public Member Functions | |
ColourValue (const uchar *byte) | |
ColourValue (float red=1.0f, float green=1.0f, float blue=1.0f, float alpha=1.0f) | |
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 ColourValue &rhs) const |
ColourValue | operator* (const float fScalar) 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) |
Array accessor operator. More... | |
float | operator[] (const size_t i) const |
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 | setHSB (float hue, float saturation, float brightness) |
Set a colour value from Hue, Saturation and Brightness. More... | |
conversions from/ to native-endian packed formats | |
RGBA | getAsRGBA (void) const |
value packed as PF_R8G8B8A8 More... | |
ARGB | getAsARGB (void) const |
value packed as PF_A8R8G8B8 More... | |
BGRA | getAsBGRA (void) const |
value packed as PF_B8G8R8A8 More... | |
ABGR | getAsABGR (void) const |
value packed as PF_A8B8G8R8 More... | |
RGBA | getAsBYTE () const |
value packed as PF_BYTE_RGBA More... | |
void | setAsRGBA (RGBA val) |
Set value from PF_R8G8B8A8. More... | |
void | setAsARGB (ARGB val) |
Set value from PF_A8R8G8B8. More... | |
void | setAsBGRA (BGRA val) |
Set value from PF_B8G8R8A8. More... | |
void | setAsABGR (ABGR val) |
Set value from PF_A8B8G8R8. 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 |
Class representing colour.
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
RGBA Ogre::ColourValue::getAsRGBA | ( | void | ) | const |
value packed as PF_R8G8B8A8
ARGB Ogre::ColourValue::getAsARGB | ( | void | ) | const |
value packed as PF_A8R8G8B8
BGRA Ogre::ColourValue::getAsBGRA | ( | void | ) | const |
value packed as PF_B8G8R8A8
ABGR Ogre::ColourValue::getAsABGR | ( | void | ) | const |
value packed as PF_A8B8G8R8
|
inline |
value packed as PF_BYTE_RGBA
void Ogre::ColourValue::setAsRGBA | ( | RGBA | val | ) |
Set value from PF_R8G8B8A8.
void Ogre::ColourValue::setAsARGB | ( | ARGB | val | ) |
Set value from PF_A8R8G8B8.
void Ogre::ColourValue::setAsBGRA | ( | BGRA | val | ) |
Set value from PF_B8G8R8A8.
void Ogre::ColourValue::setAsABGR | ( | ABGR | val | ) |
Set value from PF_A8B8G8R8.
|
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 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
float Ogre::ColourValue::r |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator==(), Ogre::PixelUtil::packColour(), and Ogre::PixelUtil::unpackColour().
float Ogre::ColourValue::g |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator==(), Ogre::PixelUtil::packColour(), and Ogre::PixelUtil::unpackColour().
float Ogre::ColourValue::b |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator==(), Ogre::PixelUtil::packColour(), and Ogre::PixelUtil::unpackColour().
float Ogre::ColourValue::a |
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator==(), Ogre::PixelUtil::packColour(), and Ogre::PixelUtil::unpackColour().