Changeset 4395 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- May 30, 2005, 2:19:41 PM (19 years ago)
- 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 243 243 // applying force to the System. 244 244 if (likely (tickPart->mass > 0.0)) 245 tickPart->velocity += tickPart->extForce / tickPart->mass ;245 tickPart->velocity += tickPart->extForce / tickPart->mass * dt; 246 246 247 247 // rendering new position. … … 305 305 \param dt The time over which the field gets applied 306 306 */ 307 void ParticleSystem::applyField(Field* field , float dt)307 void ParticleSystem::applyField(Field* field) 308 308 { 309 309 Particle* tickPart = particles; 310 310 while (tickPart) 311 311 { 312 tickPart->extForce += field->calcForce( dt,tickPart->position);312 tickPart->extForce += field->calcForce(tickPart->position); 313 313 tickPart = tickPart->next; 314 314 } -
orxonox/trunk/src/lib/graphics/particles/particle_system.h
r4394 r4395 59 59 //! A class to handle ParticleSystems 60 60 class ParticleSystem : public PhysicsInterface { 61 61 friend class ParticleEmitter; 62 62 63 public: 63 64 ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT, … … 97 98 inline float getMass(void) const { return this->initialMass; }; 98 99 99 virtual void applyField(Field* field , float dt);100 virtual void applyField(Field* field); 100 101 101 102 void addParticle(const Vector& position, const Vector& velocity, unsigned int data = 0);
Note: See TracChangeset
for help on using the changeset viewer.