checkpoint
authoradam <adam@megacz.com>
Wed, 5 Dec 2007 08:58:30 +0000 (00:58 -0800)
committeradam <adam@megacz.com>
Wed, 5 Dec 2007 08:58:30 +0000 (00:58 -0800)
darcs-hash:20071205085830-5007d-e1e973b2e7409ca2736bd5e2f841dfbf34899b8f.gz

src/edu/berkeley/qfat/Mesh.java

index 8a697dc..12b3503 100644 (file)
@@ -322,12 +322,10 @@ public class Mesh implements Iterable<Mesh.T> {
         private HashSet<E> left = new HashSet<E>();
         private HashSet<E> right = new HashSet<E>();
         public BindingGroup() { }
         private HashSet<E> left = new HashSet<E>();
         private HashSet<E> right = new HashSet<E>();
         public BindingGroup() { }
-        public BindingGroup(E e) {
-            left.add(e);
-        }
+        public BindingGroup(E e) { add(e, false); }
         public void add(E e, boolean swap) {
             if (e.bg != null) {
         public void add(E e, boolean swap) {
             if (e.bg != null) {
-                if (e.bg == this) return;
+                if (e.bg == this) return; /* fixme what if it is in the "other" set? */
                 for(E ex : (!swap ? e.bg.left : e.bg.right)) {
                     ex.bg = this;
                     left.add(ex);
                 for(E ex : (!swap ? e.bg.left : e.bg.right)) {
                     ex.bg = this;
                     left.add(ex);
@@ -342,7 +340,6 @@ public class Mesh implements Iterable<Mesh.T> {
             }
         }
         public void dobind(E e) {
             }
         }
         public void dobind(E e) {
-            // assumes e is part of the "left" set
             Vert v1 = null;
             Vert v2 = null;
             if (left.contains(e)) { v1 = e.p1; v2 = e.p2; }
             Vert v1 = null;
             Vert v2 = null;
             if (left.contains(e)) { v1 = e.p1; v2 = e.p2; }
@@ -362,9 +359,11 @@ public class Mesh implements Iterable<Mesh.T> {
             for(E e : left) {
                 e.shatter(e.midpoint(), bg1, bg2);
             }
             for(E e : left) {
                 e.shatter(e.midpoint(), bg1, bg2);
             }
+            /*
             for(E e : right) {
             for(E e : right) {
-                e.shatter(e.midpoint(), bg2, bg1);  /* swap correct? */
+                e.shatter(e.midpoint(), bg1, bg2);  // swap correct? 
             }
             }
+            */
         }
     }
 
         }
     }