Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ParticleSystems::ParticleSystem Class Reference

The ParticleSystem Class. More...

#include <ParticleSystem.h>

List of all members.

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.
Emitterem
 A public Variable.
DataStructuredata
 A private Variable.
std::vector< Solver * > sList
 A public Variable.
std::vector< Solver * >::iterator sListItt
 A public Variable.
bool paused
 A public Variable.


Detailed Description

The ParticleSystem Class.

The ParticleSystem enables ParticleSystems to be created. It incooperates all the elements that enable ParticleSystems to emitt, store and evolve/update Particles.

Author:
Hannes Ricklefs

Definition at line 44 of file ParticleSystem.h.


Constructor & Destructor Documentation

ParticleSystem::ParticleSystem int  ident,
Emitter emit,
DataStructure dataStruc,
Solver s,
int  num,
int  var
 

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.

Parameters:
ident the ParticleSystems ID
emit a Pointer to an Emitter to emit new Particles
dataStruc a Pointer to a DataStructure to store all the Particles
s a Pointer to a Solver to evolve the Particles
num the number of inital Particles
var the variance of new Particles 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.

ParticleSystem::~ParticleSystem  ) 
 

The Destructor.

Destructs the ParticleSystem

Definition at line 30 of file ParticleSystem.cpp.

References data, and em.


Member Function Documentation

void ParticleSystem::addSolver Solver s  ) 
 

A member Function.

Adds a Solver to the ParticleSystem

Parameters:
s a Pointer to the Solver to be added

Definition at line 114 of file ParticleSystem.cpp.

References sList.

Referenced by ParticleSystem().

void ParticleSystem::createNewParticles int  number  ) 
 

A member Function.

Creates new Particles according to the passed number

Parameters:
number the number of new Particles

Definition at line 106 of file ParticleSystem.cpp.

References newParticle().

Referenced by ParticleSystem().

void ParticleSystem::die  ) 
 

A member Function.

Stops the ParticleSystem and kills all Particles

Definition at line 38 of file ParticleSystem.cpp.

References alive, and killParticles().

void ParticleSystem::draw  ) 
 

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.

void ParticleSystem::evolve  ) 
 

A member Function.

Evolves the ParticleSystem

Definition at line 89 of file ParticleSystem.cpp.

References alive, data, ParticleSystems::DataStructure::evolve(), newParticle(), paused, and varNewParticles.

void ParticleSystem::killParticles void   ) 
 

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().

void ParticleSystem::newParticle void   ) 
 

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().

void ParticleSystem::pause  ) 
 

A member Function.

Pauses the ParticleSystem

Definition at line 47 of file ParticleSystem.cpp.

References paused.

void ParticleSystem::restart  ) 
 

A member Function.

Restarts the ParticleSystem

Definition at line 43 of file ParticleSystem.cpp.

References alive.

bool ParticleSystem::stillAlive void   ) 
 

A member Function.

Returns if the ParticleSystem is still alive

Returns:
true if the ParticleSystem is still alive

Definition at line 54 of file ParticleSystem.cpp.

References alive.


Member Data Documentation

bool ParticleSystems::ParticleSystem::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().

DataStructure* ParticleSystems::ParticleSystem::data
 

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().

Emitter* ParticleSystems::ParticleSystem::em
 

A public Variable.

The Emitter for all Particles

Definition at line 172 of file ParticleSystem.h.

Referenced by draw(), newParticle(), ParticleSystem(), and ~ParticleSystem().

SYSTEMID ParticleSystems::ParticleSystem::identify
 

A public Variable.

The identifier of this ParticleSystem

Definition at line 142 of file ParticleSystem.h.

Referenced by ParticleSystem().

int ParticleSystems::ParticleSystem::numInitParticles
 

A public Variable.

The number of initial particles

Definition at line 154 of file ParticleSystem.h.

Referenced by ParticleSystem().

bool ParticleSystems::ParticleSystem::paused
 

A public Variable.

Stores if the ParticleSystem is currently paused

Definition at line 196 of file ParticleSystem.h.

Referenced by evolve(), ParticleSystem(), and pause().

GraphicsLib::Point3 ParticleSystems::ParticleSystem::position
 

A public Variable.

The position of the particle system

Definition at line 166 of file ParticleSystem.h.

Referenced by ParticleSystem().

std::vector<Solver *> ParticleSystems::ParticleSystem::sList
 

A public Variable.

All the Solvers for this ParticleSystem

Definition at line 184 of file ParticleSystem.h.

Referenced by addSolver().

std::vector<Solver *>::iterator ParticleSystems::ParticleSystem::sListItt
 

A public Variable.

The iterator to go through all the Solvers

Definition at line 190 of file ParticleSystem.h.

GraphicsLib::Material ParticleSystems::ParticleSystem::texture
 

A public Variable.

The texture for all ImgParticles

Definition at line 136 of file ParticleSystem.h.

int ParticleSystems::ParticleSystem::varNewParticles
 

A public Variable.

The maximum number of new Particles per evolution.

Definition at line 160 of file ParticleSystem.h.

Referenced by evolve(), and ParticleSystem().


The documentation for this class was generated from the following files:
Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1