|
lbm_reference
|
Particle system that handles creation, movement and visualization of particles. More...
#include <particles/ParticleSystem.h>
Collaboration diagram for particles::ParticleSystem:Public Member Functions | |
| ParticleSystem () | |
| Default constructor. More... | |
| ParticleSystem (std::string configFileName) | |
| Constructor that initializes the particle system according to given configuration file. More... | |
| void | run () |
| Main simulation loop. More... | |
| void | setup (ConfBlock &base) |
| Set up the particle system according to configuration options. More... | |
| virtual | ~ParticleSystem () |
| Destructor. More... | |
Protected Member Functions | |
| void | emitParticles () |
| Go over all emitters and emit new particles. More... | |
| void | generateBlackBodyColorTable (float maxTemp) |
| Generate a black body color table. More... | |
| float | getTime (timeval &start, timeval &end) |
| void | updateParticles () |
| Go over all particles and update position, color and size. More... | |
Protected Attributes | |
| float | alpha_ |
| Thermal conservation coefficient. More... | |
| float | ambTemp_ |
| Ambient temperature. More... | |
| std::vector< video::SColor > | bbColorTable_ |
| Black body color table. More... | |
| float | beta_ |
| Thermal transferability coefficient. More... | |
| IrrlichtDevice * | device_ |
| Irrlicht OpenGL device. More... | |
| video::IVideoDriver * | drvr_ |
| Irrlicht OpenGL video driver. More... | |
| bool | dynamicLights_ |
| std::vector< Emitter > | emitters_ |
| Vector containing all emitters of the particle system. More... | |
| std::vector< float > | gaussTable_ |
| Table of a precomputed Gaussian distribution. More... | |
| core::vector3df | gravity_ |
| Vector of inversed gravity. More... | |
| std::string | irrFileName_ |
| float | k_ |
| Thermal expansion coefficient. More... | |
| int | maxSteps_ |
| Total simulation timesteps. More... | |
| int | numParticles_ |
| Total number of generated particles. More... | |
| int | numSprites_ |
| Number of sprites assigned to each particle. More... | |
| std::vector< core::aabbox3df > | obstacles_ |
| Vector of axis-aligned cuboid obstacles. More... | |
| std::string | screenshots_ |
| int | screenStep_ |
| float | sizeBase_ |
| Basic particle size. More... | |
| float | sizeVar_ |
| Variable particle size, multiplied with a factor depending on lifetime. More... | |
| int | sizeX_ |
| Domain size in x-direction. More... | |
| int | sizeY_ |
| Domain size in y-direction. More... | |
| int | sizeZ_ |
| Domain size in z-direction. More... | |
| scene::ISceneManager * | smgr_ |
| Irrlicht scene manager. More... | |
| float | smokeTemp_ |
| Temperature threshold for a fire particle to turn into a smoke particle. More... | |
| lbm::LBM< float > | solver_ |
| Lattice Boltzmann fluid solver. More... | |
| std::vector< Sphere > | spheres_ |
| std::vector< video::ITexture * > | textures_ |
| Vector of particle textures. More... | |
| std::string | updFileName_ |
Particle system that handles creation, movement and visualization of particles.
Irrlicht 3D engine is used for OpenGL visualization.
Definition at line 58 of file ParticleSystem.h.
|
inline |
| particles::ParticleSystem::ParticleSystem | ( | std::string | configFileName | ) |
Constructor that initializes the particle system according to given configuration file.
| [in] | configFileName | Path to configuration file to parse |
Definition at line 11 of file ParticleSystem.cpp.
References confparser::ConfParser::parse(), setup(), lbm::LBM< T >::setup(), and solver_.
|
inlinevirtual |
|
inlineprotected |
Go over all emitters and emit new particles.
Definition at line 651 of file ParticleSystem.cpp.
References bbColorTable_, device_, dynamicLights_, emitters_, numParticles_, numSprites_, sizeBase_, sizeVar_, smgr_, smokeTemp_, and textures_.
Referenced by run().
|
protected |
Generate a black body color table.
| [in] | maxTemp | Maximum emitted particle temperature |
Definition at line 688 of file ParticleSystem.cpp.
References bbColorTable_, smokeTemp_, and lbm::w.
Referenced by setup().
|
inlineprotected |
Definition at line 115 of file ParticleSystem.h.
Referenced by run().
| void particles::ParticleSystem::run | ( | ) |
Main simulation loop.
Definition at line 414 of file ParticleSystem.cpp.
References device_, drvr_, emitParticles(), getTime(), irrFileName_, maxSteps_, numParticles_, numSprites_, lbm::LBM< T >::runStep(), screenshots_, screenStep_, smgr_, solver_, updateParticles(), and updFileName_.
Referenced by main().
| void particles::ParticleSystem::setup | ( | ConfBlock & | base | ) |
Set up the particle system according to configuration options.
| [in] | base | Root block of the parsed configuration file |
Definition at line 39 of file ParticleSystem.cpp.
References alpha_, ambTemp_, beta_, device_, drvr_, dynamicLights_, emitters_, confparser::ConfBlock::find(), confparser::ConfBlock::findAll(), gaussTable_, generateBlackBodyColorTable(), confparser::ConfBlock::getParam(), gravity_, irrFileName_, k_, maxSteps_, numSprites_, obstacles_, screenshots_, screenStep_, sizeBase_, sizeVar_, sizeX_, sizeY_, sizeZ_, smgr_, smokeTemp_, spheres_, textures_, and updFileName_.
Referenced by ParticleSystem().
|
inlineprotected |
Go over all particles and update position, color and size.
Definition at line 558 of file ParticleSystem.cpp.
References alpha_, ambTemp_, bbColorTable_, beta_, device_, emitters_, particles::FIRE, gaussTable_, lbm::LBM< T >::getVelocity(), gravity_, k_, numParticles_, obstacles_, sizeBase_, sizeVar_, sizeX_, sizeY_, sizeZ_, smokeTemp_, solver_, and spheres_.
Referenced by run().
|
protected |
Thermal conservation coefficient.
Definition at line 146 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Ambient temperature.
Definition at line 155 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Black body color table.
Definition at line 176 of file ParticleSystem.h.
Referenced by emitParticles(), generateBlackBodyColorTable(), and updateParticles().
|
protected |
Thermal transferability coefficient.
Definition at line 149 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Irrlicht OpenGL device.
Definition at line 179 of file ParticleSystem.h.
Referenced by emitParticles(), run(), setup(), and updateParticles().
|
protected |
Irrlicht OpenGL video driver.
Definition at line 185 of file ParticleSystem.h.
|
protected |
Definition at line 201 of file ParticleSystem.h.
Referenced by emitParticles(), and setup().
|
protected |
Vector containing all emitters of the particle system.
Definition at line 128 of file ParticleSystem.h.
Referenced by emitParticles(), setup(), and updateParticles().
|
protected |
Table of a precomputed Gaussian distribution.
Definition at line 173 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Vector of inversed gravity.
Definition at line 161 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Definition at line 196 of file ParticleSystem.h.
|
protected |
Thermal expansion coefficient.
Definition at line 158 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Total simulation timesteps.
Definition at line 140 of file ParticleSystem.h.
|
protected |
Total number of generated particles.
Definition at line 143 of file ParticleSystem.h.
Referenced by emitParticles(), run(), and updateParticles().
|
protected |
Number of sprites assigned to each particle.
Definition at line 170 of file ParticleSystem.h.
Referenced by emitParticles(), run(), and setup().
|
protected |
Vector of axis-aligned cuboid obstacles.
Definition at line 191 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Definition at line 198 of file ParticleSystem.h.
|
protected |
Definition at line 199 of file ParticleSystem.h.
|
protected |
Basic particle size.
Definition at line 164 of file ParticleSystem.h.
Referenced by emitParticles(), setup(), and updateParticles().
|
protected |
Variable particle size, multiplied with a factor depending on lifetime.
Definition at line 167 of file ParticleSystem.h.
Referenced by emitParticles(), setup(), and updateParticles().
|
protected |
Domain size in x-direction.
Definition at line 131 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Domain size in y-direction.
Definition at line 134 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Domain size in z-direction.
Definition at line 137 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Irrlicht scene manager.
Definition at line 182 of file ParticleSystem.h.
Referenced by emitParticles(), run(), and setup().
|
protected |
Temperature threshold for a fire particle to turn into a smoke particle.
Definition at line 152 of file ParticleSystem.h.
Referenced by emitParticles(), generateBlackBodyColorTable(), setup(), and updateParticles().
|
protected |
Lattice Boltzmann fluid solver.
Definition at line 125 of file ParticleSystem.h.
Referenced by ParticleSystem(), run(), and updateParticles().
|
protected |
Definition at line 193 of file ParticleSystem.h.
Referenced by setup(), and updateParticles().
|
protected |
Vector of particle textures.
Definition at line 188 of file ParticleSystem.h.
Referenced by emitParticles(), and setup().
|
protected |
Definition at line 195 of file ParticleSystem.h.
1.8.3.1