Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6620 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jan 19, 2006, 6:31:39 PM (19 years ago)
Author:
bensch
Message:

trunk: particle-optimisation

Location:
trunk/src/lib/particles
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/particle_emitter.cc

    r6619 r6620  
    268268   you may want to use the animation class
    269269*/
    270 void ParticleEmitter::tick(float dt, ParticleSystem* system)
    271 {
     270void ParticleEmitter::tick(float dt)
     271{
     272  assert (this->system != NULL);
    272273  if (likely(dt > 0.0 && this->emissionRate > 0.0))
    273274  {
     
    308309        Quaternion moment = Quaternion(this->momentum + this->momentumRandom, randDir);
    309310
    310         system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV, orient, moment);
     311        this->system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV, orient, moment);
    311312      }
    312313    }
  • trunk/src/lib/particles/particle_emitter.h

    r6619 r6620  
    4545  void start();
    4646  void stop();
    47   void tick(float dt, ParticleSystem* system);
     47  void tick(float dt);
    4848
    4949  void setSystem(ParticleSystem* system);
  • trunk/src/lib/particles/particle_system.cc

    r6619 r6620  
    382382    std::list<ParticleEmitter*>::iterator emitter;
    383383    for (emitter = this->emitters.begin(); emitter != this->emitters.end(); emitter++)
    384       (*emitter)->tick(dt, this);
     384      (*emitter)->tick(dt);
    385385}
    386386
Note: See TracChangeset for help on using the changeset viewer.