Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4395 in orxonox.OLD for orxonox/trunk/src/lib/graphics


Ignore:
Timestamp:
May 30, 2005, 2:19:41 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: fields are now time-independant

Location:
orxonox/trunk/src/lib/graphics/particles
Files:
2 edited

Legend:

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

    r4385 r4395  
    243243      // applying force to the System.
    244244      if (likely (tickPart->mass > 0.0))
    245         tickPart->velocity += tickPart->extForce / tickPart->mass;
     245        tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
    246246
    247247      // rendering new position.
     
    305305    \param dt The time over which the field gets applied
    306306 */
    307 void ParticleSystem::applyField(Field* field, float dt)
     307void ParticleSystem::applyField(Field* field)
    308308{
    309309  Particle* tickPart = particles;
    310310  while (tickPart)
    311311    {
    312       tickPart->extForce += field->calcForce(dt, tickPart->position);
     312      tickPart->extForce += field->calcForce(tickPart->position);
    313313      tickPart = tickPart->next;
    314314    }
  • orxonox/trunk/src/lib/graphics/particles/particle_system.h

    r4394 r4395  
    5959//! A class to handle ParticleSystems
    6060class ParticleSystem : public PhysicsInterface {
    61 
     61  friend class ParticleEmitter;
     62 
    6263 public:
    6364  ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT,
     
    9798  inline float getMass(void) const { return this->initialMass; };
    9899
    99   virtual void applyField(Field* field, float dt);
     100  virtual void applyField(Field* field);
    100101
    101102  void addParticle(const Vector& position, const Vector& velocity, unsigned int data = 0);
Note: See TracChangeset for help on using the changeset viewer.