Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4691 in orxonox.OLD for orxonox/trunk/src/lib/particles


Ignore:
Timestamp:
Jun 24, 2005, 3:44:37 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: momentum works correct now (i think)

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

Legend:

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

    r4690 r4691  
    149149  else
    150150    return "EMITTER_DOT";
    151 
    152 
    153151}
    154152
  • orxonox/trunk/src/lib/particles/particle_system.cc

    r4690 r4691  
    271271      if (likely (tickPart->mass > 0.0))
    272272        tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
    273 
    274273      // rendering new position.
    275274      tickPart->position += tickPart->velocity * dt;
     
    293292
    294293      if (this->conserve < 1.0)
    295         tickPart->velocity = tickPart->velocity * this->conserve;
     294      {
     295        tickPart->velocity *= this->conserve;
     296        tickPart->momentum *= this->conserve;
     297      }
    296298      // find out if we have to delete tickPart
    297299      if (unlikely((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0))
     
    550552   \brief outputs some nice debug information
    551553*/
    552 void ParticleSystem::debug(void)
     554void ParticleSystem::debug(void) const
    553555{
    554556  PRINT(0)("  ParticleSystem %s\n", this->getName());
  • orxonox/trunk/src/lib/particles/particle_system.h

    r4690 r4691  
    114114  virtual void draw(void) const;
    115115
    116   void debug(void);
     116  void debug(void) const;
    117117
    118118 private:
Note: See TracChangeset for help on using the changeset viewer.