lbm_reference
Public Member Functions | Protected Attributes | Friends | List of all members
particles::Emitter Class Reference

Adds new particles to the particle system. More...

#include <particles/Emitter.h>

+ Collaboration diagram for particles::Emitter:

Public Member Functions

 Emitter (core::vector3df pos, core::vector3df size, float temp, int fuel, int emitThreshold, float fuelConsumption, float lifetimeCoeff)
 Constructor. More...
 
virtual ~Emitter ()
 Destructor. More...
 

Protected Attributes

int emitThreshold_
 Determines particle emission probability. More...
 
int fuel_
 Current fuel value of the emitter. More...
 
float fuelConsumption_
 Factor by which fuel value is reduced every time a particle is emitted. More...
 
float lifetimeCoeff_
 Coefficient to determine particle lifetime based on emitters current fuel value. More...
 
std::list< Particleparticles_
 List of particles the emitter has already emitted. More...
 
core::vector3df pos_
 Position of the emitter (x,y,z) More...
 
core::vector3df size_
 
float temp_
 Initial temperature of emitted particles. More...
 

Friends

class ParticleSystem
 Fried declaration to allow ParticleSystem class access to protected members. More...
 

Detailed Description

Adds new particles to the particle system.

Particles are inserted at the emitter's position having a fixed initial temperature and a lifetime depending on the emitter's current fuel value.

Definition at line 23 of file Emitter.h.

Constructor & Destructor Documentation

particles::Emitter::Emitter ( core::vector3df  pos,
core::vector3df  size,
float  temp,
int  fuel,
int  emitThreshold,
float  fuelConsumption,
float  lifetimeCoeff 
)

Constructor.

Parameters
[in]posPosition of the emitter (x,y,z)
[in]tempInitial temperature of emitted particles
[in]fuelInitial fuel value of the emitter
[in]emitThresholdDetermines particle emission probability, the higher the threshold the smaller
[in]fuelConsumptionFactor by which fuel value is reduced every time a particle is emitted
[in]lifetimeCoeffCoefficient to determine particle lifetime based on emitters current fuel value

Definition at line 9 of file Emitter.cpp.

virtual particles::Emitter::~Emitter ( )
inlinevirtual

Destructor.

Does nothing.

Definition at line 60 of file Emitter.h.

Friends And Related Function Documentation

friend class ParticleSystem
friend

Fried declaration to allow ParticleSystem class access to protected members.

Definition at line 28 of file Emitter.h.

Member Data Documentation

int particles::Emitter::emitThreshold_
protected

Determines particle emission probability.

The higher the threshold the smaller the emission probability for each time step

Definition at line 89 of file Emitter.h.

int particles::Emitter::fuel_
protected

Current fuel value of the emitter.

Definition at line 84 of file Emitter.h.

float particles::Emitter::fuelConsumption_
protected

Factor by which fuel value is reduced every time a particle is emitted.

Definition at line 93 of file Emitter.h.

float particles::Emitter::lifetimeCoeff_
protected

Coefficient to determine particle lifetime based on emitters current fuel value.

Definition at line 98 of file Emitter.h.

std::list< Particle > particles::Emitter::particles_
protected

List of particles the emitter has already emitted.

Definition at line 70 of file Emitter.h.

core::vector3df particles::Emitter::pos_
protected

Position of the emitter (x,y,z)

Definition at line 74 of file Emitter.h.

core::vector3df particles::Emitter::size_
protected

Definition at line 76 of file Emitter.h.

float particles::Emitter::temp_
protected

Initial temperature of emitted particles.

Definition at line 80 of file Emitter.h.


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