|  | OGRE 14.3
    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. | |
| 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. | |
| 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 | setHSB (float hue, float saturation, float brightness) | 
| Set a colour value from Hue, Saturation and Brightness. | |
| conversions from/ to native-endian packed formats | |
| RGBA | getAsRGBA (void) const | 
| value packed as PF_R8G8B8A8 | |
| ARGB | getAsARGB (void) const | 
| value packed as PF_A8R8G8B8 | |
| BGRA | getAsBGRA (void) const | 
| value packed as PF_B8G8R8A8 | |
| ABGR | getAsABGR (void) const | 
| value packed as PF_A8B8G8R8 | |
| RGBA | getAsBYTE () const | 
| value packed as PF_BYTE_RGBA | |
| void | setAsRGBA (RGBA val) | 
| Set value from PF_R8G8B8A8. | |
| void | setAsARGB (ARGB val) | 
| Set value from PF_A8R8G8B8. | |
| void | setAsBGRA (BGRA val) | 
| Set value from PF_B8G8R8A8. | |
| void | setAsABGR (ABGR val) | 
| Set value from PF_A8B8G8R8. | |
| 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.
Colour is represented as 4 components, each of which is a floating-point value from 0.0 to 1.0.
| 
 | inlineexplicit | 
Referenced by operator!=(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator<<, operator==(), and saturateCopy().
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue().
| RGBA Ogre::ColourValue::getAsRGBA | ( | void | ) | const | 
value packed as PF_R8G8B8A8
Referenced by getAsBYTE().
| 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
Referenced by Ogre::VertexElement::convertColourValue(), and getAsBYTE().
| 
 | inline | 
value packed as PF_BYTE_RGBA
References getAsABGR(), and getAsRGBA().
Referenced by Ogre::RenderSystem::convertColourValue(), Ogre::Root::convertColourValue(), and Ogre::Billboard::setColour().
| 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 | 
| 
 | inline | 
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy.
References ColourValue(), and saturate().
| 
 | inline | 
Array accessor operator.
References r.
| 
 | inline | 
Array accessor operator.
References r.
| 
 | inline | 
Pointer accessor for direct copying.
References r.
| 
 | inline | 
Pointer accessor for direct copying.
References r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 
 | inline | 
References ColourValue(), a, b, g, and r.
| 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] | 
Referenced by getHSB().
| 
 | inline | 
References getHSB().
| 
 | static | 
| 
 | static | 
Referenced by Ogre::Viewport::clear(), Ogre::D3D11RenderSystem::clearFrameBuffer(), Ogre::D3D9RenderSystem::clearFrameBuffer(), Ogre::GL3PlusRenderSystem::clearFrameBuffer(), Ogre::GLES2RenderSystem::clearFrameBuffer(), Ogre::GLRenderSystem::clearFrameBuffer(), Ogre::MetalRenderSystem::clearFrameBuffer(), Ogre::RenderSystem::clearFrameBuffer(), Ogre::TinyRenderSystem::clearFrameBuffer(), Ogre::VulkanRenderSystem::clearFrameBuffer(), and Ogre::StringConverter::parseColourValue().
| 
 | static | 
Referenced by Ogre::Billboard::Billboard(), Ogre::BillboardSet::createBillboard(), Ogre::BillboardSet::createBillboard(), Ogre::DefaultDebugDrawer::drawWireBox(), Ogre::Font::putText(), Ogre::TextureUnitState::setColourOperationEx(), Ogre::Material::setFog(), Ogre::Pass::setFog(), Ogre::SceneManager::setFog(), and Ogre::Technique::setFog().
| 
 | static | 
| 
 | static | 
| 
 | static | 
| float Ogre::ColourValue::r | 
Referenced by ColourValue(), ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator==(), operator[](), operator[](), Ogre::PixelUtil::packColour(), ptr(), ptr(), saturate(), Ogre::PixelUtil::unpackColour(), and Ogre::PixelUtil::unpackColour().
| float Ogre::ColourValue::g | 
Referenced by ColourValue(), ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator==(), Ogre::PixelUtil::packColour(), saturate(), Ogre::PixelUtil::unpackColour(), and Ogre::PixelUtil::unpackColour().
| float Ogre::ColourValue::b | 
Referenced by ColourValue(), ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator==(), Ogre::PixelUtil::packColour(), saturate(), Ogre::PixelUtil::unpackColour(), and Ogre::PixelUtil::unpackColour().
| float Ogre::ColourValue::a | 
Referenced by ColourValue(), ColourValue(), operator*(), operator*(), operator*, operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/(), operator/=(), operator==(), Ogre::PixelUtil::packColour(), saturate(), Ogre::PixelUtil::unpackColour(), and Ogre::PixelUtil::unpackColour().