Example #1
0
  // here only the strongly visible nodes repell the others ...
  private void layoutRepVisible(float abstand, float strength) {
    Vector3D dist = new Vector3D();
    net.repNodes.clear();
    for (Node tmp : net.fNodes) {
      if (tmp.getColor()[3] > 0.2) net.repNodes.add(tmp);
    }

    for (Node a : net.fNodes) {
      for (Node b : net.fNodes) {
        if ((a != b) && (a.getColor()[3] > 0.2 && b.getColor()[3] > 0.2)) {
          repFrucht(abstand, strength, dist, a, b, app.getRepellMax());
        }
      }
    }
  }