History

clean up of particle system

Jeffrey Ventrella committed 13 years ago

Commit be561271 parent 43893893 files · +15 −27Browse files

Showing the changes to interface/src/ParticleSystem.cpp (1 of 3 files). Show all

Unified · Split

interface/src/ParticleSystem.cpp+5−8
@@ -147,7 +147,7 @@ void ParticleSystem::killParticle(int p) { · 146 unmodified lines
147147 _numParticles --;
148148 }
149149
150−
150+/*
151151 void ParticleSystem::setOrangeBlueColorPalette() {
152152
153153 for (unsigned int p = 0; p < _numParticles; p++) {
@@ -163,6 +163,7 @@ void ParticleSystem::setOrangeBlueColorPalette() { · 9 unmodified lines
163163 _particle[p].color = glm::vec4(red, green, blue, alpha);
164164 }
165165 }
166+*/
166167
167168
168169 void ParticleSystem::setParticleAttributes(int emitterIndex, ParticleAttributes attributes) {
@@ -201,13 +202,7 @@ void ParticleSystem::updateParticle(int p, float deltaTime) { · 32 unmodified lines
201202 int lifeStage = (int)( ageFraction * (NUM_PARTICLE_LIFE_STAGES-1) );
202203
203204 float lifeStageFraction = ageFraction * ( NUM_PARTICLE_LIFE_STAGES - 1 ) - lifeStage;
204−
205− /*
206− if ( p == 0 ) {
207− printf( "lifespan = %f ageFraction = %f lifeStage = %d lifeStageFraction = %f\n", _particle[p].lifespan, ageFraction, lifeStage, lifeStageFraction );
208− }
209− */
210−
205+
211206 _particle[p].radius
212207 = _emitter[_particle[p].emitterIndex].particleAttributes[lifeStage ].radius * (1.0f - lifeStageFraction)
213208 + _emitter[_particle[p].emitterIndex].particleAttributes[lifeStage+1].radius * lifeStageFraction;
@@ -294,6 +289,7 @@ void ParticleSystem::updateParticle(int p, float deltaTime) { · 80 unmodified lines
294289 _particle[p].age += deltaTime;
295290 }
296291
292+/*
297293 void ParticleSystem::setCollisionSphere(int e, glm::vec3 position, float radius) {
298294
299295 int lifeStage = 0;
@@ -302,6 +298,7 @@ void ParticleSystem::setCollisionSphere(int e, glm::vec3 position, float radius) · 2 unmodified lines
302298 _emitter[e].particleAttributes[lifeStage].collisionSpherePosition = position;
303299 _emitter[e].particleAttributes[lifeStage].collisionSphereRadius = radius;
304300 }
301+*/
305302
306303 void ParticleSystem::setEmitterBaseParticle(int emitterIndex, bool showing ) {
307304