#include <ParticleEmitter.h>
Public Member Functions | |
| ParticleEmitter () | |
| virtual | ~ParticleEmitter () |
| void | createDefaultParticle (Particle &particle) |
| void | setAttributes (float life1, float life2, float mass1, float mass2, float friction1, float friction2, Vector velocity1, Vector velocity2, Vector startColor1, float startAlpha1, Vector startColor2, float startAlpha2, Vector endColor1, float endAlpha1, Vector endColor2, float endAlpha2, float startX1, float startY1, float startX2, float startY2, float endX1, float endY1, float endX2, float endY2, Vector gravity, bool additiveTexture, bool windAffect) |
| void | setLife (float life1, float life2) |
| void | setMass (float mass1, float mass2) |
| void | setFriction (float friction1, float friction2) |
| void | setVelocity (Vector velocity1, Vector velocity2) |
| void | setStartColor (Vector startColor1, float startAlpha1, Vector startColor2, float startAlpha2) |
| void | setEndColor (Vector endColor1, float endAlpha1, Vector endColor2, float endAlpha2) |
| void | setStartSize (float startX1, float startY1, float startX2, float startY2) |
| void | setEndSize (float endX1, float endY1, float endX2, float endY2) |
| void | setGravity (Vector gravity) |
| void | setAdditiveTexture (bool additiveTexture) |
| void | setWindAffect (bool windAffect) |
| void | emitLinear (int number, Vector &position1, Vector &position2, ParticleEngine &engine, ParticleRenderer *renderer=0) |
| void | emitExplosionRing (int number, Vector &position, ParticleEngine &engine, ParticleRenderer *renderer=0) |
| void | emitDebris (int number, Vector &position, ParticleEngine &engine) |
| void | emitSmoke (int number, Vector &position, ParticleEngine &engine) |
| void | emitNapalm (Vector &position, ParticleEngine &engine, GLTextureSet *set) |
| void | emitSpray (Vector &position, ParticleEngine &engine, float width, GLTexture *texture) |
| void | emitTalk (Vector &position, ParticleEngine &engine) |
| void | emitWallHit (Vector &position, ParticleEngine &engine, OptionsTransient::WallSide type) |
| void | emitTransport (Vector &position, ParticleEngine &engine, GLTextureSet *set) |
| void | emitExplosion (Vector &position, ParticleEngine &engine, float width, GLTextureSet *set, bool animate) |
| void | emitMushroom (Vector &position, ParticleEngine &engine, int number, float width) |
| void | emitPrecipitation (Vector &position, ParticleEngine &engine, int number, bool rain) |
Public Attributes | |
| float | life1_ |
| float | life2_ |
| float | mass1_ |
| float | mass2_ |
| float | friction1_ |
| float | friction2_ |
| float | startAlpha1_ |
| float | startAlpha2_ |
| float | endAlpha1_ |
| float | endAlpha2_ |
| Vector | velocity1_ |
| Vector | velocity2_ |
| Vector | startColor1_ |
| Vector | startColor2_ |
| Vector | endColor1_ |
| Vector | endColor2_ |
| Vector | startSize1_ |
| Vector | startSize2_ |
| Vector | endSize1_ |
| Vector | endSize2_ |
| Vector | gravity_ |
| bool | additiveTexture_ |
| bool | windAffect_ |
Definition at line 28 of file ParticleEmitter.h.
| ParticleEmitter::ParticleEmitter | ( | ) |
Definition at line 64 of file ParticleEmitter.cpp.
| ParticleEmitter::~ParticleEmitter | ( | ) | [virtual] |
Definition at line 68 of file ParticleEmitter.cpp.
| void ParticleEmitter::createDefaultParticle | ( | Particle & | particle | ) |
Definition at line 175 of file ParticleEmitter.cpp.
References additiveTexture_, endAlpha1_, endAlpha2_, endColor1_, endColor2_, endSize1_, endSize2_, friction1_, friction2_, gravity_, life1_, life2_, mass1_, mass2_, randomCounterScalar(), randomCounterVector(), randomScalar(), randomVector(), Particle::setParticle(), startAlpha1_, startAlpha2_, startColor1_, startColor2_, startSize1_, startSize2_, velocity1_, velocity2_, and windAffect_.
Referenced by emitDebris(), emitExplosion(), emitExplosionRing(), emitLinear(), emitMushroom(), emitNapalm(), emitPrecipitation(), emitSmoke(), emitSpray(), emitTalk(), emitTransport(), and emitWallHit().
| void ParticleEmitter::setAttributes | ( | float | life1, | |
| float | life2, | |||
| float | mass1, | |||
| float | mass2, | |||
| float | friction1, | |||
| float | friction2, | |||
| Vector | velocity1, | |||
| Vector | velocity2, | |||
| Vector | startColor1, | |||
| float | startAlpha1, | |||
| Vector | startColor2, | |||
| float | startAlpha2, | |||
| Vector | endColor1, | |||
| float | endAlpha1, | |||
| Vector | endColor2, | |||
| float | endAlpha2, | |||
| float | startX1, | |||
| float | startY1, | |||
| float | startX2, | |||
| float | startY2, | |||
| float | endX1, | |||
| float | endY1, | |||
| float | endX2, | |||
| float | endY2, | |||
| Vector | gravity, | |||
| bool | additiveTexture, | |||
| bool | windAffect | |||
| ) |
Definition at line 141 of file ParticleEmitter.cpp.
References setAdditiveTexture(), setEndColor(), setEndSize(), setFriction(), setGravity(), setLife(), setMass(), setStartColor(), setStartSize(), setVelocity(), and setWindAffect().
Referenced by addWallCollisionParticle(), Water::explosion(), ExplosionNukeRenderer::ExplosionNukeRenderer(), Explosion::init(), ExplosionLaserBeamRenderer::init(), TeleportRenderer::simulate(), TalkRenderer::simulate(), MissileActionRenderer::simulate(), ExplosionRingRenderer::simulate(), Napalm::simulateAddEdge(), Smoke::Smoke(), and TargetCamera::TargetCamera().
| void ParticleEmitter::setLife | ( | float | life1, | |
| float | life2 | |||
| ) |
Definition at line 72 of file ParticleEmitter.cpp.
References life1_, and life2_.
Referenced by setAttributes().
| void ParticleEmitter::setMass | ( | float | mass1, | |
| float | mass2 | |||
| ) |
Definition at line 77 of file ParticleEmitter.cpp.
References mass1_, and mass2_.
Referenced by setAttributes().
| void ParticleEmitter::setFriction | ( | float | friction1, | |
| float | friction2 | |||
| ) |
Definition at line 82 of file ParticleEmitter.cpp.
References friction1_, and friction2_.
Referenced by setAttributes().
Definition at line 105 of file ParticleEmitter.cpp.
References velocity1_, and velocity2_.
Referenced by setAttributes(), and MissileActionRenderer::simulate().
| void ParticleEmitter::setStartColor | ( | Vector | startColor1, | |
| float | startAlpha1, | |||
| Vector | startColor2, | |||
| float | startAlpha2 | |||
| ) |
Definition at line 87 of file ParticleEmitter.cpp.
References endAlpha1_, endAlpha2_, endColor1_, endColor2_, startAlpha1_, startAlpha2_, startColor1_, and startColor2_.
Referenced by setAttributes().
| void ParticleEmitter::setEndColor | ( | Vector | endColor1, | |
| float | endAlpha1, | |||
| Vector | endColor2, | |||
| float | endAlpha2 | |||
| ) |
Definition at line 97 of file ParticleEmitter.cpp.
References endAlpha1_, endAlpha2_, endColor1_, and endColor2_.
Referenced by setAttributes().
| void ParticleEmitter::setStartSize | ( | float | startX1, | |
| float | startY1, | |||
| float | startX2, | |||
| float | startY2 | |||
| ) |
Definition at line 110 of file ParticleEmitter.cpp.
References startSize1_, and startSize2_.
Referenced by setAttributes().
| void ParticleEmitter::setEndSize | ( | float | endX1, | |
| float | endY1, | |||
| float | endX2, | |||
| float | endY2 | |||
| ) |
Definition at line 118 of file ParticleEmitter.cpp.
References endSize1_, and endSize2_.
Referenced by emitExplosion(), and setAttributes().
| void ParticleEmitter::setGravity | ( | Vector | gravity | ) |
Definition at line 126 of file ParticleEmitter.cpp.
References gravity_.
Referenced by setAttributes().
| void ParticleEmitter::setAdditiveTexture | ( | bool | additiveTexture | ) |
Definition at line 131 of file ParticleEmitter.cpp.
References additiveTexture_.
Referenced by setAttributes().
| void ParticleEmitter::setWindAffect | ( | bool | windAffect | ) |
Definition at line 136 of file ParticleEmitter.cpp.
References windAffect_.
Referenced by setAttributes().
| void ParticleEmitter::emitLinear | ( | int | number, | |
| Vector & | position1, | |||
| Vector & | position2, | |||
| ParticleEngine & | engine, | |||
| ParticleRenderer * | renderer = 0 | |||
| ) |
Definition at line 201 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), ExplosionTextures::particleTexture, Particle::position_, randomVector(), Particle::renderer_, and Particle::texture_.
Referenced by ExplosionLaserBeamRenderer::init(), and MissileActionRenderer::simulate().
| void ParticleEmitter::emitExplosionRing | ( | int | number, | |
| Vector & | position, | |||
| ParticleEngine & | engine, | |||
| ParticleRenderer * | renderer = 0 | |||
| ) |
Definition at line 221 of file ParticleEmitter.cpp.
References createDefaultParticle(), getFastCos(), getFastSin(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), ExplosionTextures::particleTexture, Particle::position_, RAND, Particle::renderer_, Particle::texture_, and Particle::velocity_.
Referenced by ExplosionRingRenderer::simulate().
| void ParticleEmitter::emitDebris | ( | int | number, | |
| Vector & | position, | |||
| ParticleEngine & | engine | |||
| ) |
Definition at line 247 of file ParticleEmitter.cpp.
References createDefaultParticle(), getFastCos(), getFastSin(), ParticleRendererSmoke::getInstance(), ParticleRendererDebris::getInstance(), ParticleEngine::getNextAliveParticle(), Particle::position_, RAND, Particle::renderer_, Particle::userData_, and Particle::velocity_.
Referenced by Explosion::init().
| void ParticleEmitter::emitSmoke | ( | int | number, | |
| Vector & | position, | |||
| ParticleEngine & | engine | |||
| ) |
Definition at line 283 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererQuads::getInstance(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), int(), Particle::position_, RAND, Particle::renderer_, Particle::shadow_, ExplosionTextures::smokeTexture, Particle::texture_, and Particle::textureCoord_.
Referenced by Smoke::addSmoke().
| void ParticleEmitter::emitNapalm | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| GLTextureSet * | set | |||
| ) |
Definition at line 302 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererNapalm::getInstance(), ParticleEngine::getNextAliveParticle(), Particle::position_, Particle::renderer_, Particle::textureCoord_, and Particle::userData_.
Referenced by Napalm::simulateAddEdge().
| void ParticleEmitter::emitSpray | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| float | width, | |||
| GLTexture * | texture | |||
| ) |
Definition at line 318 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererQuads::getInstance(), ParticleEngine::getNextAliveParticle(), int(), Particle::position_, RAND, Particle::renderer_, Particle::texture_, Particle::textureCoord_, and Particle::velocity_.
Referenced by Water::explosion(), and Explosion::init().
| void ParticleEmitter::emitTalk | ( | Vector & | position, | |
| ParticleEngine & | engine | |||
| ) |
Definition at line 350 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererQuads::getInstance(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), Particle::position_, Particle::renderer_, ExplosionTextures::talkTexture, Particle::texture_, and Particle::textureCoord_.
Referenced by TalkRenderer::simulate().
| void ParticleEmitter::emitWallHit | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| OptionsTransient::WallSide | type | |||
| ) |
Definition at line 365 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererWall::getInstance(), ParticleEngine::getNextAliveParticle(), Particle::position_, Particle::renderer_, and Particle::userData_.
Referenced by addWallCollisionParticle().
| void ParticleEmitter::emitTransport | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| GLTextureSet * | set | |||
| ) |
Definition at line 380 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererQuads::getInstance(), ParticleEngine::getNextAliveParticle(), Particle::position_, Particle::renderer_, Particle::textureCoord_, and Particle::textureSet_.
Referenced by TeleportRenderer::simulate().
| void ParticleEmitter::emitExplosion | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| float | width, | |||
| GLTextureSet * | set, | |||
| bool | animate | |||
| ) |
Definition at line 397 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererQuads::getInstance(), ParticleEngine::getNextAliveParticle(), GLTextureSet::getNoTextures(), int(), MIN, Particle::position_, RAND, Particle::renderer_, setEndSize(), Particle::texture_, Particle::textureCoord_, Particle::textureSet_, TWOPI, and Particle::velocity_.
Referenced by Explosion::init().
| void ParticleEmitter::emitMushroom | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| int | number, | |||
| float | width | |||
| ) |
Definition at line 440 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererMushroom::getInstance(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), int(), Particle::position_, RAND, Particle::renderer_, Particle::shadow_, ExplosionTextures::smokeTexture, Particle::texture_, Particle::textureCoord_, and Particle::userData_.
Referenced by ExplosionNukeRenderer::simulate().
| void ParticleEmitter::emitPrecipitation | ( | Vector & | position, | |
| ParticleEngine & | engine, | |||
| int | number, | |||
| bool | rain | |||
| ) |
Definition at line 462 of file ParticleEmitter.cpp.
References createDefaultParticle(), ParticleRendererSnow::getInstance(), ParticleRendererRain::getInstance(), ParticleEngine::getNextAliveParticle(), ExplosionTextures::instance(), Particle::position_, ExplosionTextures::rainTexture, RAND, Particle::renderer_, Particle::shadow_, ExplosionTextures::snowTexture, and Particle::texture_.
Referenced by TargetCamera::simulate().
| float ParticleEmitter::life1_ |
Definition at line 34 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setLife().
| float ParticleEmitter::life2_ |
Definition at line 34 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setLife().
| float ParticleEmitter::mass1_ |
Definition at line 35 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setMass().
| float ParticleEmitter::mass2_ |
Definition at line 35 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setMass().
Definition at line 36 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setFriction().
Definition at line 36 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setFriction().
Definition at line 38 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartColor().
Definition at line 38 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartColor().
Definition at line 39 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), setEndColor(), and setStartColor().
Definition at line 39 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), setEndColor(), and setStartColor().
Definition at line 40 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setVelocity().
Definition at line 40 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setVelocity().
Definition at line 41 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartColor().
Definition at line 41 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartColor().
Definition at line 42 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), setEndColor(), and setStartColor().
Definition at line 42 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), setEndColor(), and setStartColor().
Definition at line 43 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartSize().
Definition at line 43 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setStartSize().
Definition at line 44 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setEndSize().
Definition at line 44 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setEndSize().
Definition at line 45 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setGravity().
Definition at line 46 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setAdditiveTexture().
Definition at line 47 of file ParticleEmitter.h.
Referenced by createDefaultParticle(), and setWindAffect().
1.5.3