Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ColourValue Class Reference

Class representing colour. More...

#include <OgreColourValue.h>

List of all members.

Public Methods

 ColourValue (Real red=1.0f, Real green=1.0f, Real blue=1.0f, Real alpha=1.0f)
bool operator== (const ColourValue &rhs) const
bool operator!= (const ColourValue &rhs) const
RGBA getAsLongRGBA (void) const
 Retrieves colour as RGBA. More...

ARGB getAsLongARGB (void) const
 Retrieves colour as ARGB. More...

ABGR getAsLongABGR (void) const
 Retrieves colours as ABGR. More...


Public Attributes

Real r
Real g
Real b
Real a

Static Public Attributes

ColourValue Black = ColourValue(0.0,0.0,0.0)
ColourValue White = ColourValue(1.0,1.0,1.0)
ColourValue Red = ColourValue(1.0,0.0,0.0)
ColourValue Green = ColourValue(0.0,1.0,0.0)
ColourValue Blue = ColourValue(0.0,0.0,1.0)


Detailed Description

Class representing colour.

Remarks:
Colour is represented as 4 components, each of which is a floating-point value from 0.0 to 1.0.

The 3 'normal' colour components are red, green and blue, a higher number indicating greater amounts of that component in the colour. The forth component is the 'alpha' value, which represents transparency. In this case, 0.0 is completely transparent and 1.0 is fully opaque.

Todo:
Add more formats e.g. 16-bit 5551 etc


Constructor & Destructor Documentation

Ogre::ColourValue::ColourValue Real    red = 1.0f,
Real    green = 1.0f,
Real    blue = 1.0f,
Real    alpha = 1.0f
[inline]
 


Member Function Documentation

ABGR Ogre::ColourValue::getAsLongABGR void    const
 

Retrieves colours as ABGR.

unsigned long Ogre::ColourValue::getAsLongARGB void    const
 

Retrieves colour as ARGB.

unsigned long Ogre::ColourValue::getAsLongRGBA void    const
 

Retrieves colour as RGBA.

bool Ogre::ColourValue::operator!= const ColourValue &    rhs const
 

bool Ogre::ColourValue::operator== const ColourValue &    rhs const
 


Member Data Documentation

Real Ogre::ColourValue::a
 

Real Ogre::ColourValue::b
 

ColourValue Ogre::ColourValue::Black = ColourValue(0.0,0.0,0.0) [static]
 

ColourValue Ogre::ColourValue::Blue = ColourValue(0.0,0.0,1.0) [static]
 

Real Ogre::ColourValue::g
 

ColourValue Ogre::ColourValue::Green = ColourValue(0.0,1.0,0.0) [static]
 

Real Ogre::ColourValue::r
 

ColourValue Ogre::ColourValue::Red = ColourValue(1.0,0.0,0.0) [static]
 

ColourValue Ogre::ColourValue::White = ColourValue(1.0,1.0,1.0) [static]
 

Copyright © 2002 by The OGRE Team