public Iterable<Vertex> vertices() { return vertices; }
public Iterator<T> iterator() { return triangles.iterator(); }
public Iterable<Vertex> vertices() { return vertices; }
public Iterator<T> iterator() { return triangles.iterator(); }
for(E e_ : (Iterable<E>)e.getBoundPeers()) {
if (e.v1.getPoint().distance((e.getBindingMatrix(e_).times(e_.v1.getPoint()))) > 0.01f)
throw new RuntimeException("blah! " + e.v1.getPoint() + " " + e.getBindingMatrix(e_).times(e_.v1.getPoint()));
for(E e_ : (Iterable<E>)e.getBoundPeers()) {
if (e.v1.getPoint().distance((e.getBindingMatrix(e_).times(e_.v1.getPoint()))) > 0.01f)
throw new RuntimeException("blah! " + e.v1.getPoint() + " " + e.getBindingMatrix(e_).times(e_.v1.getPoint()));
if (v2.getPoint().distance(m.times(e.getBindingMatrix(e_).times(e_.v2.getPoint()))) > 0.01f)
throw new RuntimeException("blah! " + v2.getPoint() + " " + m.times(e_.v2.getPoint()));
}
if (v2.getPoint().distance(m.times(e.getBindingMatrix(e_).times(e_.v2.getPoint()))) > 0.01f)
throw new RuntimeException("blah! " + v2.getPoint() + " " + m.times(e_.v2.getPoint()));
}
this.bindTo(m, e, EPSILON);
this.pair.bindTo(m, e.pair, EPSILON);
}
this.bindTo(m, e, EPSILON);
this.pair.bindTo(m, e.pair, EPSILON);
}
public E(Point v1, Point v2) {
if (vertices.get(v1) != null) throw new Error();
if (vertices.get(v2) != null) throw new Error();
public E(Point v1, Point v2) {
if (vertices.get(v1) != null) throw new Error();
if (vertices.get(v2) != null) throw new Error();
this.v1 = new Vertex(v1);
this.v2 = new Vertex(v2);
this.prev = this.next = this.pair = new E(this, this, this);
this.v1 = new Vertex(v1);
this.v2 = new Vertex(v2);
this.prev = this.next = this.pair = new E(this, this, this);