示例#1
0
 // redraw all particles
 private void redraw(double limit) {
     StdDraw.clear();
     for (int i = 0; i < particles.length; i++) {
         particles[i].draw();
     }
     StdDraw.show();
     StdDraw.pause(20);
     if (t < limit) {
         pq.insert(new Event(t + 1.0 / HZ, null, null));
     }
 }
示例#2
0
 private void redraw(double num)
 {
     StdDraw.clear();
     for (int i = 0; i < this.particles.Length; i++)
     {
         this.particles[i].draw();
     }
     StdDraw.show(20);
     if (this.t < num)
     {
         this.pq.insert(new CollisionSystem.Event(this.t + (double)1f / this.hz, null, null));
     }
 }