OGRE
1.9.0
|
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. | |
ARGB | getAsARGB (void) const |
Retrieves colour as ARGB. | |
BGRA | getAsBGRA (void) const |
Retrieves colour as BGRA. | |
RGBA | getAsRGBA (void) const |
Retrieves colour as RGBA. | |
void | getHSB (Real *hue, Real *saturation, Real *brightness) const |
Convert the current colour to Hue, Saturation and Brightness values. | |
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. | |
float | operator[] (const size_t i) const |
Array accessor operator. | |
float * | ptr () |
Pointer accessor for direct copying. | |
const float * | ptr () const |
Pointer accessor for direct copying. | |
void | saturate (void) |
Clamps colour value to the range [0, 1]. | |
ColourValue | saturateCopy (void) const |
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy. | |
void | setAsABGR (const ABGR val) |
Sets colour as ABGR. | |
void | setAsARGB (const ARGB val) |
Sets colour as ARGB. | |
void | setAsBGRA (const BGRA val) |
Sets colour as BGRA. | |
void | setAsRGBA (const RGBA val) |
Sets colour as RGBA. | |
void | setHSB (Real hue, Real saturation, Real brightness) |
Set a colour value from Hue, Saturation and Brightness. | |
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) |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const ColourValue &c) |
Function for writing to a stream. | |
Class representing colour.
Definition at line 57 of file OgreColourValue.h.
|
explicit |
Definition at line 67 of file OgreColourValue.h.
Referenced by operator!=(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator<<, operator==(), and saturateCopy().
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] |
bool Ogre::ColourValue::operator!= | ( | const ColourValue & | rhs | ) | const |
References ColourValue().
ColourValue Ogre::ColourValue::operator* | ( | const ColourValue & | rhs | ) | const |
Definition at line 208 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue Ogre::ColourValue::operator* | ( | const float | fScalar | ) | const |
Definition at line 196 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue & Ogre::ColourValue::operator*= | ( | const float | fScalar | ) |
Definition at line 280 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue Ogre::ColourValue::operator+ | ( | const ColourValue & | rkVector | ) | const |
Definition at line 172 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue & Ogre::ColourValue::operator+= | ( | const ColourValue & | rkVector | ) |
Definition at line 260 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue Ogre::ColourValue::operator- | ( | const ColourValue & | rkVector | ) | const |
Definition at line 184 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue & Ogre::ColourValue::operator-= | ( | const ColourValue & | rkVector | ) |
Definition at line 270 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue Ogre::ColourValue::operator/ | ( | const ColourValue & | rhs | ) | const |
Definition at line 220 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue Ogre::ColourValue::operator/ | ( | const float | fScalar | ) | const |
Definition at line 232 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
ColourValue & Ogre::ColourValue::operator/= | ( | const float | fScalar | ) |
Definition at line 289 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
bool Ogre::ColourValue::operator== | ( | const ColourValue & | rhs | ) | const |
References ColourValue().
float & Ogre::ColourValue::operator[] | ( | const size_t | i | ) |
float Ogre::ColourValue::operator[] | ( | const size_t | i | ) | const |
float * Ogre::ColourValue::ptr | ( | ) |
Pointer accessor for direct copying.
Definition at line 160 of file OgreColourValue.h.
References r.
const float * Ogre::ColourValue::ptr | ( | ) | const |
Pointer accessor for direct copying.
Definition at line 165 of file OgreColourValue.h.
References r.
void Ogre::ColourValue::saturate | ( | void | ) |
Clamps colour value to the range [0, 1].
Definition at line 111 of file OgreColourValue.h.
Referenced by saturateCopy().
ColourValue Ogre::ColourValue::saturateCopy | ( | void | ) | const |
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy.
Definition at line 136 of file OgreColourValue.h.
References ColourValue(), and saturate().
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] |
|
friend |
Definition at line 247 of file OgreColourValue.h.
References ColourValue(), a, b, g, and r.
|
friend |
Function for writing to a stream.
Definition at line 321 of file OgreColourValue.h.
References ColourValue(), and _OgreExport.
float Ogre::ColourValue::a |
Definition at line 76 of file OgreColourValue.h.
Referenced by ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), saturate(), and Ogre::AnimableValue::setAsBaseValue().
float Ogre::ColourValue::b |
Definition at line 76 of file OgreColourValue.h.
Referenced by ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), saturate(), and Ogre::AnimableValue::setAsBaseValue().
|
static |
Definition at line 61 of file OgreColourValue.h.
Referenced by Ogre::Viewport::clear(), Ogre::RenderSystem::clearFrameBuffer(), and Ogre::StringConverter::parseColourValue().
|
static |
Definition at line 65 of file OgreColourValue.h.
float Ogre::ColourValue::g |
Definition at line 76 of file OgreColourValue.h.
Referenced by ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), saturate(), and Ogre::AnimableValue::setAsBaseValue().
|
static |
Definition at line 64 of file OgreColourValue.h.
float Ogre::ColourValue::r |
Definition at line 76 of file OgreColourValue.h.
Referenced by ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator[](), operator[](), ptr(), ptr(), saturate(), and Ogre::AnimableValue::setAsBaseValue().
|
static |
Definition at line 63 of file OgreColourValue.h.
|
static |
Definition at line 62 of file OgreColourValue.h.
Referenced by Ogre::Billboard::Billboard(), Ogre::RenderSystem::_setFog(), Ogre::BillboardSet::createBillboard(), Ogre::BillboardSet::createBillboard(), Ogre::TextureUnitState::setColourOperationEx(), Ogre::Material::setFog(), Ogre::Pass::setFog(), Ogre::SceneManager::setFog(), and Ogre::Technique::setFog().
|
static |
Definition at line 60 of file OgreColourValue.h.