checkpoint
authoradam <adam@megacz.com>
Wed, 5 Dec 2007 04:49:57 +0000 (20:49 -0800)
committeradam <adam@megacz.com>
Wed, 5 Dec 2007 04:49:57 +0000 (20:49 -0800)
darcs-hash:20071205044957-5007d-dba4a5ab1168b683fbec31c38e214cfbf2a77497.gz

src/edu/berkeley/qfat/Mesh.java

index 5b98a31..fc1f8de 100644 (file)
@@ -18,7 +18,6 @@ public class Mesh implements Iterable<Mesh.T> {
 
     private HashMap<Point,Vert>  ps = new HashMap<Point,Vert>();
     public  HashSet<E>           es = new HashSet<E>();
-    public  ArrayList<T>         ts = new ArrayList<T>();
 
     public Iterator<T> iterator() {
         if (es.size() == 0) return new FaceIterator();
@@ -237,7 +236,7 @@ public class Mesh implements Iterable<Mesh.T> {
             rescore();
             boolean good = true;
             /*
-            for(T t : ts) {
+            for(T t : this) {
                 for(E e = this.e; ;) {
                     if (e.intersects(t)) { good = false; break; }
                     e = e.pair.next;
@@ -470,8 +469,6 @@ public class Mesh implements Iterable<Mesh.T> {
             pair.destroyed = true;
             if (next.t != null) next.t.destroy();
             if (prev.t != null) prev.t.destroy();
-            if (pair.next.t != null) ts.remove(pair.next.t);
-            if (pair.prev.t != null) ts.remove(pair.prev.t);
             next.t = null;
             prev.t = null;
             pair.next.t = null;
@@ -630,7 +627,6 @@ public class Mesh implements Iterable<Mesh.T> {
         public final int color;
 
         public void destroy() {
-            ts.remove(this);
         }
 
         T(E e1) {
@@ -656,8 +652,6 @@ public class Mesh implements Iterable<Mesh.T> {
             }
             this.color = color;
 
-            // FIXME unnecssary?
-            ts.add(this);
             v1().kdinsert();
             v2().kdinsert();
             v3().kdinsert();