Showing the changes to interface/src/ParticleSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -24,18 +24,20 @@ ParticleSystem::ParticleSystem() { · 23 unmodified lines | |||
| 24 | _upDirection = glm::vec3(0.0f, 1.0f, 0.0f); // default | 24 | _upDirection = glm::vec3(0.0f, 1.0f, 0.0f); // default |
| 25 | 25 | ||
| 26 | for (unsigned int emitterIndex = 0; emitterIndex < MAX_EMITTERS; emitterIndex++) { | 26 | for (unsigned int emitterIndex = 0; emitterIndex < MAX_EMITTERS; emitterIndex++) { |
| 27 | 27 | ||
| 28 | _emitter[emitterIndex].position = glm::vec3(0.0f, 0.0f, 0.0f); | 28 | Emitter e = _emitter[emitterIndex]; |
| 29 | _emitter[emitterIndex].direction = glm::vec3(0.0f, 1.0f, 0.0f); | 29 | |
| 30 | _emitter[emitterIndex].visible = false; | 30 | e.position = glm::vec3(0.0f, 0.0f, 0.0f); |
| 31 | _emitter[emitterIndex].particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION; | 31 | e.direction = glm::vec3(0.0f, 1.0f, 0.0f); |
| 32 | _emitter[emitterIndex].particleLifespan = DEFAULT_PARTICLE_LIFESPAN; | 32 | e.visible = false; |
| 33 | _emitter[emitterIndex].showingBaseParticle = false; | 33 | e.particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION; |
| 34 | _emitter[emitterIndex].emitReserve = 0.0; | 34 | e.particleLifespan = DEFAULT_PARTICLE_LIFESPAN; |
| 35 | _emitter[emitterIndex].thrust = 0.0f; | 35 | e.showingBaseParticle = false; |
| 36 | _emitter[emitterIndex].rate = 0.0f; | 36 | e.emitReserve = 0.0; |
| 37 | _emitter[emitterIndex].currentParticle = 0; | 37 | e.thrust = 0.0f; |
| 38 | _emitter[emitterIndex].particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE; | 38 | e.rate = 0.0f; |
| 39 | e.currentParticle = 0; | ||
| 40 | e.particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE; | ||
| 39 | 41 | ||
| 40 | for (int lifeStage = 0; lifeStage<NUM_PARTICLE_LIFE_STAGES; lifeStage++) { | 42 | for (int lifeStage = 0; lifeStage<NUM_PARTICLE_LIFE_STAGES; lifeStage++) { |
| 41 | 43 | ||