iParticleEmitter Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iParticleEmitter Struct Reference
Mesh plugins

A particle emitter. More...

`#include <imesh/particles.h>`

Inheritance diagram for iParticleEmitter:

List of all members.

## Public Member Functions
virtual csPtr< iParticleEmitter > | Clone () const =0
| Clone this emitter.
virtual void | EmitParticles (iParticleSystemBase *system, const csParticleBuffer &particleBuffer, float dt, float totalTime, const csReversibleTransform *const emitterToParticle=0)=0
| Spawn some new particles.
virtual float | GetDuration () const =0
| Get the duration (in seconds) for this emitter.
virtual float | GetEmissionRate () const =0
| Get the emission rate, in particles per second.
virtual bool | GetEnabled () const =0
| Get whether or not this emitter is enabled.
virtual void | GetInitialMass (float &min, float &max) const =0
| Get the initial mass of the new particles.
virtual void | GetInitialTTL (float &min, float &max) const =0
| Get the initial time-to-live span of the particles emitted.
virtual float | GetStartTime () const =0
| Get the start time (in seconds)
virtual size_t | ParticlesToEmit (iParticleSystemBase *system, float dt, float totalTime)=0
| Get the number of particles this emitter wants to emit.
virtual void | SetDuration (float time)=0
| Set the duration (in seconds) for this emitter.
virtual void | SetEmissionRate (float particlesPerSecond)=0
| Set the emission rate, in particles per second.
virtual void | SetEnabled (bool enabled)=0
| Set whether or not this emitter is enabled.
virtual void | SetInitialMass (float min, float max)=0
| Set the initial mass of the new particles.
virtual void | SetInitialTTL (float min, float max)=0
| Set the initial time-to-live span of the particles emitted.
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 and setting up their initial state.

Definition at line 255 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 some new particles.

The number of particles to be emitted has be defined through the last call to ParticlesToEmit().

Parameters:

  system | The particle system for which particles may be emitted
  particleBuffer | The storage place for the data of the new particles to be emitted
  dt | The time step during which some particles may be emitted, in seconds (the number of particles emitted should be equal to this, times the emission rate).
  totalTime | The total time since the particle system has started emitting, in seconds and including dt.
  emitterToParticle | A local transform to apply on the position of the new particles emitted

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

Get the duration (in seconds) for this emitter.

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

Get the emission rate, in particles per second.

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

Get whether or not this emitter is enabled.

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

Get the initial mass of the new particles.

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

Get the initial time-to-live span of the particles emitted.

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 the number of particles this emitter wants to emit.

Parameters:

  system | The particle system for which particles may be emitted
  dt | The time step during which some particles may be emitted, in seconds (the number of particles emitted should be equal to this, times the emission rate).
  totalTime | The total time since the particle system has started emitting, in seconds and including dt.

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

Set the 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 the emission rate, in particles per second.

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

Set whether or not this emitter is enabled.

The emitter will emit particles only if it is enabled.

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

Set the initial mass of the new particles.

The emitter will assign a mass in the range specified.

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

Set the initial time-to-live span of the particles emitted.

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:

- imesh/particles.h