Esempio n. 1
0
 public void Execute(List <Particle> particles, float dt)
 {
     particles.ForEach(x => x.ForceAccumulator = new HyperPoint <float>(0f, 0f));
     Forces.ForEach(x => x.CalculateForce(particles));
     DoConstraints(Constraints, particles, dt, SpringConstant, SpringDemping);
     particles.ForEach(x => x.Velocity += (x.ForceAccumulator + x.ForceConstraint) / x.Massa * dt);
 }