Ejemplo n.º 1
0
    private void aggregateForces() {
      // tell all of the springs to apply their forces
      for (Spring s : springs) {
        s.applyForce();
      }

      // tell all the dampers to apply their forces
      for (Damper d : dampers) {
        d.applyForce();
      }

      // tell all the zaps to apply their forces
      for (Zap z : zaps) {
        z.applyForce();
      }
    }