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

ParticleManager Class Reference

Inheritance diagram for ParticleManager:

Inheritance graph
[legend]
List of all members.

Detailed Description

used to manually emit particles in case of collisions etc.

This class can handle a number of different emitters which can be registered for a key string. It provides a function (ParticleManager::emit) which allows for convenient particle emission.

Author:
Daniel Seibert


Public Types

typedef DustEmitter<
5000, ManualEmission, DustInit,
DustAction > 
Emitter

Public Member Functions

void emit (const std::string &name, const G3D::Vector3 &pos, const float &dt)
 emits a number of particles at the given position
EmittergetEmitter (const std::string &)
 retrieves the emitter for the given key
void process (const float &)
void render (G3D::RenderDevice *)
void sort ()

Static Public Member Functions

static ParticleManagergetInstance ()
static bool isActive ()
static bool isDestroyed ()
static bool isVirgin ()

Protected Member Functions

 Singleton ()

Classes

struct  DustAction
struct  DustInit
class  DustMotionInit
class  ManualEmission
 manual particle emission policy


Member Typedef Documentation

typedef DustEmitter<5000,ManualEmission,DustInit,DustAction> ParticleManager::Emitter
 


Member Function Documentation

void ParticleManager::emit const std::string &  name,
const G3D::Vector3 &  pos,
const float dt
 

emits a number of particles at the given position

This function accesses the emitter registered for name, places it at pos and calls its emit function with the appropriate number of particles. That number is calculated from the emitter's particle emission rate (see Emitter::setEmissionCount) and the frame time dt.

This function fails silently if no emitter is found for name.

Parameters:
name the requested emitter's key. See ParticleManager::getEmitter
pos the emission center position. Note that particles will be emitted in a certain area around pos
dt the frame step time

ParticleManager::Emitter * ParticleManager::getEmitter const std::string &   ) 
 

retrieves the emitter for the given key

If the key is unknown, a new emitter is created, registered and returned. Note that new emitters are initialized to their default values, particularly, no particle texture is set. See the ParticleSystem documentation and ParticleManager::sort for details.

static ParticleManager * ONE::util::Singleton< ParticleManager , Lifetime >::getInstance  )  [static, inherited]
 

static bool ONE::util::Singleton< ParticleManager , Lifetime >::isActive  )  [static, inherited]
 

static bool ONE::util::Singleton< ParticleManager , Lifetime >::isDestroyed  )  [static, inherited]
 

static bool ONE::util::Singleton< ParticleManager , Lifetime >::isVirgin  )  [static, inherited]
 

void ParticleManager::process const float  ) 
 

see ParticleSystem::process

void ParticleManager::render G3D::RenderDevice *   ) 
 

see ParticleSystem::render

ONE::util::Singleton< ParticleManager , Lifetime >::Singleton  )  [protected, inherited]
 

void ParticleManager::sort  ) 
 

see ParticleSystem::sort


Generated on Wed Sep 7 19:03:46 2005 for AnimalRace by  doxygen 1.4.3