X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fedu%2Fberkeley%2Fqfat%2FMesh.java;h=b0518165e5c6b2143a39417ec8d27b41783bad98;hb=9a4c0a63db24cfe1787dbe798c2456271775fa88;hp=9d98783c4611f6079094d4a2e52da47c91c7105e;hpb=f9488635746daea6f8ccbb4680ff7f169dc5b2e5;p=anneal.git diff --git a/src/edu/berkeley/qfat/Mesh.java b/src/edu/berkeley/qfat/Mesh.java index 9d98783..b051816 100644 --- a/src/edu/berkeley/qfat/Mesh.java +++ b/src/edu/berkeley/qfat/Mesh.java @@ -122,7 +122,7 @@ public class Mesh implements Iterable { return (float)total; } - public void rebuildPointSet() { pointset.rebuild(); } + public void rebuildPointSet() { /*pointset.rebuild();*/ } public Vec diagonal() { return pointset.diagonal(); } public Point centroid() { return pointset.centroid(); } public Vert nearest(Point p) { return pointset.nearest(p); } @@ -140,7 +140,7 @@ public class Mesh implements Iterable { Matrix quadric = Matrix.ZERO; Vert bound_to = this; - Matrix binding = new Matrix(); + Matrix binding = Matrix.ONE; float oldscore = 0; boolean quadricStale = false; @@ -378,7 +378,7 @@ public class Mesh implements Iterable { private boolean good; public boolean move(Vec v) { - Matrix m = new Matrix(v); + Matrix m = Matrix.translate(v); Vert p = this; boolean good = true; do { @@ -445,8 +445,8 @@ public class Mesh implements Iterable { } while(px != p); return false; } - public void unbind() { bound_to = this; binding = new Matrix(); } - public void bind(Vert p) { bind(p, new Matrix()); } + public void unbind() { bound_to = this; binding = Matrix.ONE; } + public void bind(Vert p) { bind(p, Matrix.ONE); } public void bind(Vert p, Matrix binding) { if (isBoundTo(p)) return; Vert temp_bound_to = p.bound_to;