CrystalSpace

Public API Reference

iParticleEmitter Struct Reference
[Mesh plugins]

A particle emitter. More...

#include <imesh/particles.h>

Inheritance diagram for iParticleEmitter:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual csPtr< iParticleEmitterClone () const =0
 Clone this emitter.
virtual void EmitParticles (iParticleSystemBase *system, const csParticleBuffer &particleBuffer, float dt, float totalTime, const csReversibleTransform *const emitterToParticle=0)=0
 Spawn new particles.
virtual float GetDuration () const =0
 Get duration (in seconds) for this emitter.
virtual float GetEmissionRate () const =0
 Get emission rate in particles per second.
virtual bool GetEnabled () const =0
 Get emitters enabled state.
virtual void GetInitialMass (float &min, float &max) const =0
 Get initial mass for new particles.
virtual void GetInitialTTL (float &min, float &max) const =0
 Get initial time-to-live span.
virtual float GetStartTime () const =0
 Get the start time (in seconds).
virtual size_t ParticlesToEmit (iParticleSystemBase *system, float dt, float totalTime)=0
 Get number of particles this emitter wants to emit.
virtual void SetDuration (float time)=0
 Set duration (in seconds) for this emitter.
virtual void SetEmissionRate (float particlesPerSecond)=0
 Set emission rate in particles per second.
virtual void SetEnabled (bool enabled)=0
 Set emitters enabled state.
virtual void SetInitialMass (float min, float max)=0
 Set initial mass for new particles.
virtual void SetInitialTTL (float min, float max)=0
 Set initial time-to-live span.
virtual void SetStartTime (float time)=0
 Set the start time (in seconds) for this emitter.

Detailed Description

A particle emitter.

The particle emitters are responsible for adding new particles

Definition at line 251 of file particles.h.


Member Function Documentation

virtual csPtr<iParticleEmitter> iParticleEmitter::Clone (  )  const [pure virtual]

Clone this emitter.

virtual void iParticleEmitter::EmitParticles ( iParticleSystemBase system,
const csParticleBuffer particleBuffer,
float  dt,
float  totalTime,
const csReversibleTransform *const   emitterToParticle = 0 
) [pure virtual]

Spawn new particles.

virtual float iParticleEmitter::GetDuration (  )  const [pure virtual]

Get duration (in seconds) for this emitter.

virtual float iParticleEmitter::GetEmissionRate (  )  const [pure virtual]

Get emission rate in particles per second.

virtual bool iParticleEmitter::GetEnabled (  )  const [pure virtual]

Get emitters enabled state.

virtual void iParticleEmitter::GetInitialMass ( float &  min,
float &  max 
) const [pure virtual]

Get initial mass for new particles.

virtual void iParticleEmitter::GetInitialTTL ( float &  min,
float &  max 
) const [pure virtual]

Get initial time-to-live span.

virtual float iParticleEmitter::GetStartTime (  )  const [pure virtual]

Get the start time (in seconds).

virtual size_t iParticleEmitter::ParticlesToEmit ( iParticleSystemBase system,
float  dt,
float  totalTime 
) [pure virtual]

Get number of particles this emitter wants to emit.

virtual void iParticleEmitter::SetDuration ( float  time  )  [pure virtual]

Set duration (in seconds) for this emitter.

By default emitters will emit particles infinitely, but by setting this you can make them stop a given number of seconds after they initiated emission. A negative duration is the same as infinite duration.

virtual void iParticleEmitter::SetEmissionRate ( float  particlesPerSecond  )  [pure virtual]

Set emission rate in particles per second.

virtual void iParticleEmitter::SetEnabled ( bool  enabled  )  [pure virtual]

Set emitters enabled state.

The emitter will only emit particles if enabled.

virtual void iParticleEmitter::SetInitialMass ( float  min,
float  max 
) [pure virtual]

Set initial mass for new particles.

The emitter will assign a mass in the range specified.

virtual void iParticleEmitter::SetInitialTTL ( float  min,
float  max 
) [pure virtual]

Set initial time-to-live span.

The emitter will assign a time-to-live in the range specified.

virtual void iParticleEmitter::SetStartTime ( float  time  )  [pure virtual]

Set the start time (in seconds) for this emitter.

By default emitters will start emitting particles as soon as the particle system is activated (comes into view), but with this setting this can be delayed.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7