Bromeon
Public Types | Static Public Member Functions | Public Member Functions
thor::ColorAffector Class Reference

Applies a color gradient to particles. More...

Inheritance diagram for thor::ColorAffector:
Inheritance graph

List of all members.

Public Types

typedef std::tr1::shared_ptr
< ColorAffector
Ptr
 Shared pointer type referring to ColorAffector objects.

Static Public Member Functions

static Ptr Create (const ColorGradient &gradient)
 Creates an affector that colorizes particles according to a given gradient.

Public Member Functions

 ColorAffector (const ColorGradient &gradient)
 Constructor.
virtual void Affect (Particle &particle, sf::Time dt)
 Affects particles.
void SetGradient (const ColorGradient &gradient)
 Sets the color gradient used to colorize the particles.
const ColorGradientGetGradient () const
 Returns the color gradient used to colorize the particles.

Detailed Description

Applies a color gradient to particles.

Affector class that changes the color of a particle smoothly from one to another.


Constructor & Destructor Documentation

thor::ColorAffector::ColorAffector ( const ColorGradient gradient) [explicit]

Constructor.

Creates a color gradient over the whole lifetime of the particles.

Parameters:
gradientThe color gradient affecting the particles. Can also be a single sf::Color.

Member Function Documentation

virtual void thor::ColorAffector::Affect ( Particle particle,
sf::Time  dt 
) [virtual]

Affects particles.

Parameters:
particleThe particle currently being affected.
dtTime interval during which particles are affected.

Implements thor::Affector.

static Ptr thor::ColorAffector::Create ( const ColorGradient gradient) [static]

Creates an affector that colorizes particles according to a given gradient.

Creates a color gradient over the whole lifetime of the particles.

Parameters:
gradientThe color gradient affecting the particles. Can also be a single sf::Color.


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