public static final Random random = new Random();
private PointSet<Vert> pointset = new PointSet<Vert>();
-
+ public int size() { return pointset.size(); }
public Iterable<Vert> vertices() { return pointset; }
public Iterable<E> edges() {
aspects += e.t.aspect()*e.t.aspect();
}
*/
- /*
- float minangle = (float)(Math.PI * 0.9);
+
+ 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);
}
applyQuadricToNeighbor();
+ // FIXME: intersection test needed?
+ boolean good = true;
+
// should recompute fundamental quadrics of all vertices sharing a face, but we defer...
E e = this.e;
do {
+ /*
+ if (Math.abs(e.crossAngle()) > (Math.PI * 0.9) ||
+ Math.abs(e.next.crossAngle()) > (Math.PI * 0.9)) {
+ good = false;
+ }
+ if (e.t.aspect() < 0.1) {
+ good = false;
+ }
+ */
e.p2.quadricStale = true;
e = e.pair.next;
} while(e != this.e);
- // FIXME: intersection test needed?
- boolean good = true;
-
if (!ignorecollision)
for(T t : Mesh.this) {
if (!good) break;
return length()*t.area();
*/
return (float)Math.max(length(), midpoint().distance(nearest.p));
+ //return length();
}
public int compareTo(E e) {
return e.comparator() > comparator() ? 1 : -1;