#include <ParticleSystem.h>
Public Member Functions | |
ParticleSystem (int ident, Emitter *emit, DataStructure *dataStruc, Solver *s, int num, int var) | |
The Constructor. | |
~ParticleSystem () | |
The Destructor. | |
void | die () |
A member Function. | |
void | restart () |
A member Function. | |
void | pause () |
A member Function. | |
void | evolve () |
A member Function. | |
void | createNewParticles (int number) |
A member Function. | |
void | newParticle (void) |
A member Function. | |
void | killParticles (void) |
A member Function. | |
void | addSolver (Solver *s) |
A member Function. | |
void | draw () |
A member Function. | |
bool | stillAlive (void) |
A member Function. | |
Public Attributes | |
GraphicsLib::Material | texture |
A public Variable. | |
SYSTEMID | identify |
A public Variable. | |
bool | alive |
A public Variable. | |
int | numInitParticles |
A public Variable. | |
int | varNewParticles |
A public Variable. | |
GraphicsLib::Point3 | position |
A public Variable. | |
Emitter * | em |
A public Variable. | |
DataStructure * | data |
A private Variable. | |
std::vector< Solver * > | sList |
A public Variable. | |
std::vector< Solver * >::iterator | sListItt |
A public Variable. | |
bool | paused |
A public Variable. |
The ParticleSystem enables ParticleSystems to be created. It incooperates all the elements that enable ParticleSystems to emitt, store and evolve/update Particles.
Definition at line 44 of file ParticleSystem.h.
|
The Constructor. Creates a new ParticleSystem by passing an Ident, Emitter, DataStructure, Solver, the inital number of Particles, and the number of Particles to be created per Frame.
Definition at line 13 of file ParticleSystem.cpp. References addSolver(), alive, createNewParticles(), data, em, emit, identify, numInitParticles, paused, position, ParticleSystems::DataStructure::storageCapacity, and varNewParticles. |
|
The Destructor. Destructs the ParticleSystem Definition at line 30 of file ParticleSystem.cpp. |
|
A member Function. Adds a Solver to the ParticleSystem
Definition at line 114 of file ParticleSystem.cpp. References sList. Referenced by ParticleSystem(). |
|
A member Function. Creates new Particles according to the passed number
Definition at line 106 of file ParticleSystem.cpp. References newParticle(). Referenced by ParticleSystem(). |
|
A member Function. Stops the ParticleSystem and kills all Particles Definition at line 38 of file ParticleSystem.cpp. References alive, and killParticles(). |
|
A member Function. Draws the ParticleSystem Definition at line 119 of file ParticleSystem.cpp. References data, ParticleSystems::DataStructure::draw(), em, ParticleSystems::Emitter::texture, and ParticleSystems::Emitter::type. |
|
A member Function. Evolves the ParticleSystem Definition at line 89 of file ParticleSystem.cpp. References alive, data, ParticleSystems::DataStructure::evolve(), newParticle(), paused, and varNewParticles. |
|
A member Function. Kills all Particles in the DataStructure Definition at line 82 of file ParticleSystem.cpp. References data, and ParticleSystems::DataStructure::killParticles(). Referenced by die(). |
|
A member Function. Creates one new Particle and adds it to the DataStructure It checks if a new Particle needs to be created or if a dead Particle can be reborne Definition at line 61 of file ParticleSystem.cpp. References ParticleSystems::DataStructure::addParticles(), data, em, ParticleSystems::Emitter::emittParticles(), ParticleSystems::DataStructure::getDead(), ParticleSystems::DataStructure::hasDead(), and ParticleSystems::Emitter::reBirth(). Referenced by createNewParticles(), and evolve(). |
|
A member Function. Pauses the ParticleSystem Definition at line 47 of file ParticleSystem.cpp. References paused. |
|
A member Function. Restarts the ParticleSystem Definition at line 43 of file ParticleSystem.cpp. References alive. |
|
A member Function. Returns if the ParticleSystem is still alive
Definition at line 54 of file ParticleSystem.cpp. References alive. |
|
A public Variable. Stores if the ParticleSystem is still alive Definition at line 148 of file ParticleSystem.h. Referenced by die(), evolve(), ParticleSystem(), restart(), and stillAlive(). |
|
A private Variable. The DataStructure to store all the Particles Definition at line 178 of file ParticleSystem.h. Referenced by draw(), evolve(), killParticles(), newParticle(), ParticleSystem(), and ~ParticleSystem(). |
|
A public Variable. The Emitter for all Particles Definition at line 172 of file ParticleSystem.h. Referenced by draw(), newParticle(), ParticleSystem(), and ~ParticleSystem(). |
|
A public Variable. The identifier of this ParticleSystem Definition at line 142 of file ParticleSystem.h. Referenced by ParticleSystem(). |
|
A public Variable. The number of initial particles Definition at line 154 of file ParticleSystem.h. Referenced by ParticleSystem(). |
|
A public Variable. Stores if the ParticleSystem is currently paused Definition at line 196 of file ParticleSystem.h. Referenced by evolve(), ParticleSystem(), and pause(). |
|
A public Variable. The position of the particle system Definition at line 166 of file ParticleSystem.h. Referenced by ParticleSystem(). |
|
A public Variable. All the Solvers for this ParticleSystem Definition at line 184 of file ParticleSystem.h. Referenced by addSolver(). |
|
A public Variable. The iterator to go through all the Solvers Definition at line 190 of file ParticleSystem.h. |
|
A public Variable. The texture for all ImgParticles Definition at line 136 of file ParticleSystem.h. |
|
A public Variable. The maximum number of new Particles per evolution. Definition at line 160 of file ParticleSystem.h. Referenced by evolve(), and ParticleSystem(). |