wendy::render::ParticleSystem Class Reference
[3D rendering pipeline]

Inheritance diagram for wendy::render::ParticleSystem:

Inheritance graph
[legend]

List of all members.


Detailed Description

Central particle system base class.

This is the central class of a particle system.

It contains all functionality necessary for particle systems rendered with billboards. If you wish to render particles using another method, inherit from this class.

Public Types

enum  PeriodType { FIXED_PERIOD, VARIABLE_PERIOD }

Public Member Functions

 ParticleSystem (const String &name="")
 ~ParticleSystem (void)
void enqueue (Queue &queue, const Transform3 &transform) const
void addEmitter (ParticleEmitter &emitter)
void removeEmitter (ParticleEmitter &emitter)
void addAffector (ParticleAffector &affector)
void removeAffector (ParticleAffector &affector)
bool isUpdatingBounds (void) const
void setUpdatesBounds (bool newState)
const SpheregetBounds (void) const
unsigned int getParticleCount (void) const
void setParticleCount (unsigned int newCount)
Time getTimeElapsed (void) const
void setTimeElapsed (Time newTime)
PeriodType getPeriodType (void) const
void setPeriodType (PeriodType newType)
StylegetStyle (void) const
void setStyle (Style *newStyle)
const Transform3getTransform (void) const
void setTransform (const Transform3 &newTransform)

Protected Types

typedef std::vector< ParticleParticleList
typedef std::list< unsigned int > ParticlePool
typedef std::list
< ParticleEmitter * > 
EmitterList
typedef std::list
< ParticleAffector * > 
AffectorList

Protected Member Functions

virtual void addedParticle (Particle &particle, unsigned int particleIndex)
virtual void removedParticle (Particle &particle, unsigned int particleIndex)
virtual void restart (void)

Protected Attributes

ParticleList particles
ParticlePool activeParticles
ParticlePool passiveParticles
EmitterList emitters
AffectorList affectors


Member Typedef Documentation

typedef std::vector<Particle> wendy::render::ParticleSystem::ParticleList [protected]

typedef std::list<unsigned int> wendy::render::ParticleSystem::ParticlePool [protected]


Member Enumeration Documentation

Enumerator:
FIXED_PERIOD 
VARIABLE_PERIOD 


Constructor & Destructor Documentation

wendy::render::ParticleSystem::ParticleSystem ( const String name = ""  ) 

Constructor.

wendy::render::ParticleSystem::~ParticleSystem ( void   ) 

Destructor.


Member Function Documentation

void wendy::render::ParticleSystem::enqueue ( Queue queue,
const Transform3 transform 
) const [virtual]

Queries the renderable for render operations.

Parameters:
[in,out] queue The render queue where the operations are to be created.
[in] transform The local-to-world transform.

Implements wendy::render::Renderable.

void wendy::render::ParticleSystem::addEmitter ( ParticleEmitter emitter  ) 

Adds the specified emitter to this particle system.

Parameters:
[in] emitter The emitter to add.

void wendy::render::ParticleSystem::removeEmitter ( ParticleEmitter emitter  ) 

Removes the specified emitter from this particle system.

Parameters:
[in] emitter The emitter to remove.

void wendy::render::ParticleSystem::addAffector ( ParticleAffector affector  ) 

Adds the specified affector to this particle system.

Parameters:
[in] affector The affector to add.

void wendy::render::ParticleSystem::removeAffector ( ParticleAffector affector  ) 

Removes the specified affector from this particle system.

Parameters:
[in] affector The affector to remove.

bool wendy::render::ParticleSystem::isUpdatingBounds ( void   )  const

Returns:
true if this system ensures its bounds contain all active particles on each update.

void wendy::render::ParticleSystem::setUpdatesBounds ( bool  newState  ) 

Sets whether this system ensures its bounds contain all active particles on each update.

Parameters:
[in] newState true to activate bounds updating, or false to deactivate it.

const Sphere& wendy::render::ParticleSystem::getBounds ( void   )  const

Returns:
The bounds of this particle system.

unsigned int wendy::render::ParticleSystem::getParticleCount ( void   )  const

Returns:
The number of particles in this particle system.

void wendy::render::ParticleSystem::setParticleCount ( unsigned int  newCount  ) 

Sets the specified number of particles in this particle system.

Parameters:
[in] newCount The desired number of particles.

Time wendy::render::ParticleSystem::getTimeElapsed ( void   )  const

Returns:
The time elapsed, in seconds, since this particle system was started.

void wendy::render::ParticleSystem::setTimeElapsed ( Time  newTime  ) 

Sets the total time elapsed, in seconds, for this particle system.

PeriodType wendy::render::ParticleSystem::getPeriodType ( void   )  const

Returns:
The update period type of this particle system.

void wendy::render::ParticleSystem::setPeriodType ( PeriodType  newType  ) 

Sets the update period type of this particle system.

Parameters:
[in] newType The desired update period type.

Style* wendy::render::ParticleSystem::getStyle ( void   )  const

Returns:
The render style of this particle system.

void wendy::render::ParticleSystem::setStyle ( Style newStyle  ) 

Sets the render style of this particle system.

Parameters:
[in] newStyle The desired render style.

const Transform3& wendy::render::ParticleSystem::getTransform ( void   )  const

Returns:
The local-to-world transform of this particle system.

void wendy::render::ParticleSystem::setTransform ( const Transform3 newTransform  ) 

Sets the local-to-world transform of this particle system.

Parameters:
[in] newTransform The desired local-to-world transform.

virtual void wendy::render::ParticleSystem::addedParticle ( Particle particle,
unsigned int  particleIndex 
) [protected, virtual]

Called for each particle added to this particle system.

virtual void wendy::render::ParticleSystem::removedParticle ( Particle particle,
unsigned int  particleIndex 
) [protected, virtual]

Called for each particle remove from this particle system.

virtual void wendy::render::ParticleSystem::restart ( void   )  [protected, virtual]

Called when the elapsed time for this particle system is reset.


Member Data Documentation


Generated on Thu Sep 11 20:42:41 2008 for Wendy by  doxygen 1.5.6