From 77be9651f3e4d3b99582ffdf2561608c50b6208c Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 15 Dec 2007 19:08:52 -0800 Subject: [PATCH 1/1] checkpoint darcs-hash:20071216030852-5007d-38514befdb4a3f3019f1b8537e4804e8cb158cec.gz --- src/edu/berkeley/qfat/Mesh.java | 14 -------------- src/edu/berkeley/qfat/geom/HasQuadric.java | 13 ++++++++++++- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/edu/berkeley/qfat/Mesh.java b/src/edu/berkeley/qfat/Mesh.java index 8a46c73..1a210cd 100644 --- a/src/edu/berkeley/qfat/Mesh.java +++ b/src/edu/berkeley/qfat/Mesh.java @@ -81,8 +81,6 @@ public class Mesh implements Iterable { Matrix binding = Matrix.ONE; Vertex bound_to = this; - public float oldscore = 0; - public Point getPoint() { return p; } public float score() { return oldscore; } @@ -114,18 +112,6 @@ public class Mesh implements Iterable { applyQuadricToNeighbor(); } - public void unApplyQuadricToNeighbor() { - if (nearest_in_other_mesh == null) return; - if (fundamentalQuadric == null) return; - nearest_in_other_mesh.unComputeError(); - nearest_in_other_mesh.quadric = nearest_in_other_mesh.quadric.minus(fundamentalQuadric); - nearest_in_other_mesh.quadric_count--; - if (nearest_in_other_mesh.quadric_count==0) - nearest_in_other_mesh.quadric = Matrix.ZERO; - nearest_in_other_mesh.computeError(); - nearest_in_other_mesh = null; - } - public void applyQuadricToNeighbor() { if (score_against == null) return; diff --git a/src/edu/berkeley/qfat/geom/HasQuadric.java b/src/edu/berkeley/qfat/geom/HasQuadric.java index 825bda9..dda3930 100644 --- a/src/edu/berkeley/qfat/geom/HasQuadric.java +++ b/src/edu/berkeley/qfat/geom/HasQuadric.java @@ -4,6 +4,7 @@ import javax.media.opengl.*; /** any object associated with a specific point in 3D space */ public abstract class HasQuadric extends HasPoint { + public float oldscore = 0; public Matrix errorQuadric() { return quadric; } public boolean quadricStale = false; /** the nearest vertex in the "score_against" mesh */ @@ -31,7 +32,6 @@ public abstract class HasQuadric extends HasPoint { recomputeFundamentalQuadric(); } public abstract void recomputeFundamentalQuadric(); - public abstract void unApplyQuadricToNeighbor(); public abstract void applyQuadricToNeighbor(); public abstract void reComputeErrorAround(); public abstract void reComputeError(); @@ -42,4 +42,15 @@ public abstract class HasQuadric extends HasPoint { if (fundamentalQuadric == null) recomputeFundamentalQuadric(); return fundamentalQuadric; } + public void unApplyQuadricToNeighbor() { + if (nearest_in_other_mesh == null) return; + if (fundamentalQuadric == null) return; + nearest_in_other_mesh.unComputeError(); + nearest_in_other_mesh.quadric = nearest_in_other_mesh.quadric.minus(fundamentalQuadric); + nearest_in_other_mesh.quadric_count--; + if (nearest_in_other_mesh.quadric_count==0) + nearest_in_other_mesh.quadric = Matrix.ZERO; + nearest_in_other_mesh.computeError(); + nearest_in_other_mesh = null; + } } -- 1.7.10.4