X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fedu%2Fberkeley%2Fqfat%2FMesh.java;h=12b3503f1f16a21d485b8d202076b7475cbe22dc;hb=45c3a6655f1b5e83362f9d3b0ed3e8dda3c89ed1;hp=8a697dc1ec39f6c9d47d4b7bb6d8b57395c01fa1;hpb=982c27e513b15799973ab26d5dc143aa4606800a;p=anneal.git diff --git a/src/edu/berkeley/qfat/Mesh.java b/src/edu/berkeley/qfat/Mesh.java index 8a697dc..12b3503 100644 --- a/src/edu/berkeley/qfat/Mesh.java +++ b/src/edu/berkeley/qfat/Mesh.java @@ -322,12 +322,10 @@ public class Mesh implements Iterable { private HashSet left = new HashSet(); private HashSet right = new HashSet(); 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) { - 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); @@ -342,7 +340,6 @@ public class Mesh implements Iterable { } } 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; } @@ -362,9 +359,11 @@ public class Mesh implements Iterable { for(E e : left) { e.shatter(e.midpoint(), bg1, bg2); } + /* for(E e : right) { - e.shatter(e.midpoint(), bg2, bg1); /* swap correct? */ + e.shatter(e.midpoint(), bg1, bg2); // swap correct? } + */ } }