projects
/
anneal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[anneal.git]
/
src
/
edu
/
berkeley
/
qfat
/
Mesh.java
diff --git
a/src/edu/berkeley/qfat/Mesh.java
b/src/edu/berkeley/qfat/Mesh.java
index
5ba7404
..
dfdc1a0
100644
(file)
--- a/
src/edu/berkeley/qfat/Mesh.java
+++ b/
src/edu/berkeley/qfat/Mesh.java
@@
-65,7
+65,7
@@
public class Mesh implements Iterable<Mesh.T> {
}
}
}
}
- public void unscore() {
+ public void unscoreAll() {
HashSet<Vert> done = new HashSet<Vert>();
for(T t : this)
for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {
HashSet<Vert> done = new HashSet<Vert>();
for(T t : this)
for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {
@@
-83,7
+83,7
@@
public class Mesh implements Iterable<Mesh.T> {
p.recomputeFundamentalQuadric();
}
}
p.recomputeFundamentalQuadric();
}
}
- public float rescore() {
+ public float rescoreAll() {
int num = 0;
double dist = 0;
HashSet<Vert> done = new HashSet<Vert>();
int num = 0;
double dist = 0;
HashSet<Vert> done = new HashSet<Vert>();
@@
-193,11
+193,14
@@
public class Mesh implements Iterable<Mesh.T> {
nearest_in_other_mesh = null;
}
nearest_in_other_mesh = null;
}
+ public void unsc() {
+ score -= oldscore;
+ oldscore = 0;
+ }
public void rescore() {
if (score_against == null) return;
public void rescore() {
if (score_against == null) return;
- score -= oldscore;
- oldscore = 0;
+ unsc();
if (nearest_in_other_mesh != null) unscore();
if (nearest_in_other_mesh == null) {
if (nearest_in_other_mesh != null) unscore();
if (nearest_in_other_mesh == null) {
@@
-212,6
+215,9
@@
public class Mesh implements Iterable<Mesh.T> {
}
}
}
}
+ resc();
+ }
+ public void resc() {
oldscore = quadric_count == 0 ? 0 : (quadric.preAndPostMultiply(p) / quadric_count);
score += oldscore;
}
oldscore = quadric_count == 0 ? 0 : (quadric.preAndPostMultiply(p) / quadric_count);
score += oldscore;
}