SO3::SColourGradient Class Reference

#include <SO3ColourGradient.h>

List of all members.

Public Types

typedef ColourFrames::value_type ColourFrame
 A single colour frame.

Public Member Functions

 SColourGradient (bool fillBoundsWithDefault=true)
 SColourGradient (const Ogre::ColourValue &overridedMinDefaultColour, const Ogre::ColourValue &overridedMaxDefaultColour)
 ~SColourGradient ()
void AddColourFrame (const ColourFrame &colourFrame)
void AddColourFrame (const float &gradientPosition, const Ogre::ColourValue &colour)
void Clear ()
const Ogre::ColourValue GetColour (float gradientPosition) const

Detailed Description

Optimized gradient class, idea comes from SkyX, but totally rewritten in order to be more efficient.

Definition at line 39 of file SO3ColourGradient.h.


Member Typedef Documentation

typedef ColourFrames::value_type SO3::SColourGradient::ColourFrame

A single colour frame.

Definition at line 50 of file SO3ColourGradient.h.


Constructor & Destructor Documentation

SO3::SColourGradient::SColourGradient ( bool  fillBoundsWithDefault = true  ) 

Constructor

Parameters:
fillBoundsWithDefault If true, and no colour frame with index 0.0 was provided, provide a default black colour for this position of the gradient. In the same way, if no colour frame is provided for 1.0 value, a default white colour is provided for this position of the gradient.

Definition at line 33 of file SO3ColourGradient.cpp.

SO3::SColourGradient::SColourGradient ( const Ogre::ColourValue &  overridedMinDefaultColour,
const Ogre::ColourValue &  overridedMaxDefaultColour 
)

Constructor, bound filling is automatically activated when using this constructor.

Parameters:
overridedMinDefaultColour The default "black" colour used by automatic bound filling will be replaced by the provided colour
overridedMaxDefaultColour 

Definition at line 39 of file SO3ColourGradient.cpp.

SO3::SColourGradient::~SColourGradient (  ) 

Destructor

Definition at line 45 of file SO3ColourGradient.cpp.


Member Function Documentation

void SO3::SColourGradient::AddColourFrame ( const float &  gradientPosition,
const Ogre::ColourValue &  colour 
) [inline]

Add colour frame

Parameters:
colour Coulour of this frame
gradientPosition Position of this frame in the gradient (overwrite if value exists).

Definition at line 85 of file SO3ColourGradient.h.

void SO3::SColourGradient::AddColourFrame ( const ColourFrame colourFrame  )  [inline]

Add colour frame

Parameters:
colourFrame Colour frame

Definition at line 75 of file SO3ColourGradient.h.

void SO3::SColourGradient::Clear (  )  [inline]

Clear colour gradient

Definition at line 97 of file SO3ColourGradient.h.

const Ogre::ColourValue SO3::SColourGradient::GetColour ( float  gradientPosition  )  const

Get colour value

Parameters:
gradientPosition The gradient point in [0,1] range
Returns:
Colour at the given gradient position

Definition at line 49 of file SO3ColourGradient.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Oct 31 14:42:39 2011 for SO3Engine by  doxygen 1.6.3