Changeset 3932 in orxonox.OLD for orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
- Timestamp:
- Apr 23, 2005, 12:42:09 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc
r3931 r3932 18 18 #include "particle_emitter.h" 19 19 20 #include "particle_system.h" 21 20 22 using namespace std; 21 23 … … 32 34 this->emissionRate = emissionRate; 33 35 this->velocity = velocity; 36 37 this->saveTime = 0.0; 34 38 } 35 39 … … 104 108 */ 105 109 110 void ParticleEmitter::tick(float dt, ParticleSystem* system) 111 { 112 // saving the time 113 float countF = (dt+this->saveTime) / emissionRate; 114 int count = (int)round(countF); 115 this->saveTime = countF - (float)count; 116 117 for (int i = 0; i <= count; i++) 118 // emmits from EMITTER_DOT, 119 system->addParticle(this->getAbsCoor(), direction * velocity ); 120 }
Note: See TracChangeset
for help on using the changeset viewer.