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

Ogre::ColourValue Class Reference

Class representing colour. More...

#include <OgreColourValue.h>

List of all members.

Public Member Functions

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

ARGB getAsARGB (void) const
 Retrieves colour as ARGB.

ABGR getAsABGR (void) const
 Retrieves colours as ABGR.

void setAsRGBA (const RGBA val)
 Sets colour as RGBA.

void setAsARGB (const ARGB val)
 Sets colour as ARGB.

void setAsABGR (const ABGR val)
 Sets colour as ABGR.

ColourValue operator+ (const ColourValue &rkVector) const
ColourValue operator- (const ColourValue &rkVector) const
ColourValue operator * (const float fScalar) const
ColourValue operator * (const ColourValue &rhs) const
ColourValue operator/ (const ColourValue &rhs) const
ColourValue operator/ (const float fScalar) const
ColourValueoperator+= (const ColourValue &rkVector)
ColourValueoperator-= (const ColourValue &rkVector)
ColourValueoperator *= (const float fScalar)
ColourValueoperator/= (const float fScalar)

Static Public Attributes

ColourValue Black
ColourValue White
ColourValue Red
ColourValue Green
ColourValue Blue

Friends

ColourValue operator * (const float fScalar, const ColourValue &rkVector)


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.

Definition at line 47 of file OgreColourValue.h.


Constructor & Destructor Documentation

Ogre::ColourValue::ColourValue float  red = 1.0f,
float  green = 1.0f,
float  blue = 1.0f,
float  alpha = 1.0f
[explicit]
 

Definition at line 56 of file OgreColourValue.h.


Member Function Documentation

ABGR Ogre::ColourValue::getAsABGR void   )  const
 

Retrieves colours as ABGR.

ARGB Ogre::ColourValue::getAsARGB void   )  const
 

Retrieves colour as ARGB.

RGBA Ogre::ColourValue::getAsRGBA void   )  const
 

Retrieves colour as RGBA.

ColourValue Ogre::ColourValue::operator * const ColourValue rhs  )  const
 

Definition at line 132 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue Ogre::ColourValue::operator * const float  fScalar  )  const
 

Definition at line 120 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue& Ogre::ColourValue::operator *= const float  fScalar  ) 
 

Definition at line 204 of file OgreColourValue.h.

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

ColourValue Ogre::ColourValue::operator+ const ColourValue rkVector  )  const
 

Definition at line 96 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue& Ogre::ColourValue::operator+= const ColourValue rkVector  ) 
 

Definition at line 184 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue Ogre::ColourValue::operator- const ColourValue rkVector  )  const
 

Definition at line 108 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue& Ogre::ColourValue::operator-= const ColourValue rkVector  ) 
 

Definition at line 194 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue Ogre::ColourValue::operator/ const float  fScalar  )  const
 

Definition at line 156 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue Ogre::ColourValue::operator/ const ColourValue rhs  )  const
 

Definition at line 144 of file OgreColourValue.h.

References a, b, g, and r.

ColourValue& Ogre::ColourValue::operator/= const float  fScalar  ) 
 

Definition at line 213 of file OgreColourValue.h.

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

void Ogre::ColourValue::setAsABGR const ABGR  val  ) 
 

Sets colour as ABGR.

void Ogre::ColourValue::setAsARGB const ARGB  val  ) 
 

Sets colour as ARGB.

void Ogre::ColourValue::setAsRGBA const RGBA  val  ) 
 

Sets colour as RGBA.


Friends And Related Function Documentation

ColourValue operator * const float  fScalar,
const ColourValue rkVector
[friend]
 

Definition at line 171 of file OgreColourValue.h.


Member Data Documentation

float Ogre::ColourValue::a
 

Definition at line 67 of file OgreColourValue.h.

Referenced by operator *(), operator+(), operator+=(), operator-(), operator-=(), and operator/().

float Ogre::ColourValue::b
 

Definition at line 67 of file OgreColourValue.h.

Referenced by operator *(), operator+(), operator+=(), operator-(), operator-=(), and operator/().

ColourValue Ogre::ColourValue::Black [static]
 

Definition at line 50 of file OgreColourValue.h.

ColourValue Ogre::ColourValue::Blue [static]
 

Definition at line 54 of file OgreColourValue.h.

float Ogre::ColourValue::g
 

Definition at line 67 of file OgreColourValue.h.

Referenced by operator *(), operator+(), operator+=(), operator-(), operator-=(), and operator/().

ColourValue Ogre::ColourValue::Green [static]
 

Definition at line 53 of file OgreColourValue.h.

float Ogre::ColourValue::r
 

Definition at line 67 of file OgreColourValue.h.

Referenced by operator *(), operator+(), operator+=(), operator-(), operator-=(), and operator/().

ColourValue Ogre::ColourValue::Red [static]
 

Definition at line 52 of file OgreColourValue.h.

float Ogre::ColourValue::val[4]
 

Definition at line 69 of file OgreColourValue.h.

ColourValue Ogre::ColourValue::White [static]
 

Definition at line 51 of file OgreColourValue.h.


The documentation for this class was generated from the following file:

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:00:16 2006