This commit is contained in:
Jeffrey Ventrella 2013-07-24 17:03:35 -07:00
parent 5e2dcfee53
commit 1d5bf20b80

View file

@ -24,18 +24,20 @@ ParticleSystem::ParticleSystem() {
_upDirection = glm::vec3(0.0f, 1.0f, 0.0f); // default _upDirection = glm::vec3(0.0f, 1.0f, 0.0f); // default
for (unsigned int emitterIndex = 0; emitterIndex < MAX_EMITTERS; emitterIndex++) { for (unsigned int emitterIndex = 0; emitterIndex < MAX_EMITTERS; emitterIndex++) {
_emitter[emitterIndex].position = glm::vec3(0.0f, 0.0f, 0.0f); Emitter e = _emitter[emitterIndex];
_emitter[emitterIndex].direction = glm::vec3(0.0f, 1.0f, 0.0f);
_emitter[emitterIndex].visible = false; e.position = glm::vec3(0.0f, 0.0f, 0.0f);
_emitter[emitterIndex].particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION; e.direction = glm::vec3(0.0f, 1.0f, 0.0f);
_emitter[emitterIndex].particleLifespan = DEFAULT_PARTICLE_LIFESPAN; e.visible = false;
_emitter[emitterIndex].showingBaseParticle = false; e.particleResolution = DEFAULT_PARTICLE_SPHERE_RESOLUTION;
_emitter[emitterIndex].emitReserve = 0.0; e.particleLifespan = DEFAULT_PARTICLE_LIFESPAN;
_emitter[emitterIndex].thrust = 0.0f; e.showingBaseParticle = false;
_emitter[emitterIndex].rate = 0.0f; e.emitReserve = 0.0;
_emitter[emitterIndex].currentParticle = 0; e.thrust = 0.0f;
_emitter[emitterIndex].particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE; e.rate = 0.0f;
e.currentParticle = 0;
e.particleRenderStyle = PARTICLE_RENDER_STYLE_SPHERE;
for (int lifeStage = 0; lifeStage<NUM_PARTICLE_LIFE_STAGES; lifeStage++) { for (int lifeStage = 0; lifeStage<NUM_PARTICLE_LIFE_STAGES; lifeStage++) {