/** does NOT update bound pairs! */
public boolean transform(Matrix m) {
if (immutableVertices) throw new Error();
+
unApplyQuadricToNeighbor();
Point oldp = this.p;
- try {
- if (vertices.get(this.p)==null) throw new Error();
- vertices.remove(this);
- removeTrianglesFromRTree();
- float newx = m.a*p.x + m.b*p.y + m.c*p.z + m.d;
- float newy = m.e*p.x + m.f*p.y + m.g*p.z + m.h;
- float newz = m.i*p.x + m.j*p.y + m.k*p.z + m.l;
- this.p = new Point(newx, newy, newz);
- addTrianglesToRTree();
- vertices.add(this);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
+
+ if (vertices.get(this.p)==null) throw new Error();
+ vertices.remove(this);
+ removeTrianglesFromRTree();
+ float newx = m.a*p.x + m.b*p.y + m.c*p.z + m.d;
+ float newy = m.e*p.x + m.f*p.y + m.g*p.z + m.h;
+ float newz = m.i*p.x + m.j*p.y + m.k*p.z + m.l;
+ this.p = new Point(newx, newy, newz);
+ addTrianglesToRTree();
+ vertices.add(this);
+
applyQuadricToNeighbor();
- // FIXME: intersection test needed?
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;
- }
- */
+ 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;
+ // should recompute fundamental quadrics of all vertices sharing a face, but we defer...
e.p2.quadricStale = true;
e = e.pair.next;
} while(e != this.e);