コード例 #1
0
ファイル: fdg.java プロジェクト: ilangray/braun-and-blew
    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();
      }
    }
コード例 #2
0
 void add_spring(int start, int end) {
   Spring s = new Spring();
   s.start = start;
   s.end = end;
   springs.add(s);
 }