}
public void computeError() {
if (quadric_count == 0) {
- if (nearest_in_other_mesh == null) {
+ if (!tilemesh) {
+ }
+ else if (nearest_in_other_mesh == null) {
if (score_against != null) {
Vert ne = score_against.nearest(p);
- oldscore = ne.fundamentalQuadric().preAndPostMultiply(p) * 100 * 3;
+ oldscore = ne.fundamentalQuadric().preAndPostMultiply(p) * 100 * 10;
} else {
oldscore = 0;
}
} else {
- oldscore = nearest_in_other_mesh.fundamentalQuadric().preAndPostMultiply(p) * 100 * 3;
+ oldscore = nearest_in_other_mesh.fundamentalQuadric().preAndPostMultiply(p) * 100 * 10;
}
} else {
- oldscore = (quadric.preAndPostMultiply(p) * 100) / quadric_count;
+ oldscore = (quadric.preAndPostMultiply(p) * 100) /*/ quadric_count*/;
}
- oldscore = oldscore*oldscore;
+ oldscore = oldscore;
int numaspects = 0;
float aspects = 0;
do {
double ang = Math.abs(e.crossAngle());
if (ang > Math.PI) throw new Error();
+ /*
if (e.t != null) {
numaspects++;
aspects += e.t.aspect()*e.t.aspect();
}
-
- if (ang > Math.PI * 0.8)
- oldscore += (ang - (Math.PI*0.8)) * 10;
-
+ */
+ /*
+ float minangle = (float)(Math.PI * 0.8);
+ if (ang > minangle)
+ oldscore += (ang - minangle);
+ */
e = e.pair.next;
} while (e != this.e);
if (numaspects > 0) oldscore += (aspects / numaspects);
public boolean has(Vert v) { return v1()==v || v2()==v || v3()==v; }
public void glVertices(GL gl) {
-
+ /*
if (e1().bind_to.set.size() == 0) return;
if (e2().bind_to.set.size() == 0) return;
if (e3().bind_to.set.size() == 0) return;
-
+ */
norm().glNormal(gl);
p1().glVertex(gl);
p2().glVertex(gl);
p3().glVertex(gl);
}
}
-
+ public boolean tilemesh = false;
}