error += olderror;
}
+ /*
+ public Vertex hack(GL gl, Point mouse) {
+ double dist = Double.MAX_VALUE;
+ Vertex cur = null;
+ for(E e = this.e; e!=null; e=e.pair.next==this.e?null:e.pair.next) {
+ Vertex v = e.getOther(this);
+ double dist2 = v.getPoint().glProject(gl).distance(mouse);
+ if ((cur==null || dist2 < dist) && v.visible) {
+ dist = dist2;
+ cur = v;
+ }
+ }
+ return cur;
+ }
+ */
+
public float averageTriangleArea() {
int count = 0;
float ret = 0;
return !illegal;
}
+ public E getEdge() { return e; }
public E getFreeIncident() {
E ret = getFreeIncident(e, e);
if (ret != null) return ret;
public boolean intersects(T t) { return t.intersects(p1.p, p2.p); }
+ public Segment getSegment() { return new Segment(p1.getPoint(), p2.getPoint()); }
+
public void bindingGroupChanged(edu.berkeley.qfat.geom.BindingGroup newBindingGroup_) {
edu.berkeley.qfat.geom.BindingGroup<E> newBindingGroup =
return Math.acos(v1.norm().dot(v2.norm()));
}
+ public Vertex getOther(Vertex v) {
+ if (this.p1 == v) return p2;
+ if (this.p2 == v) return p1;
+ throw new Error();
+ }
+
public void makeAdjacent(E e) {
if (this.next == e) return;
if (p2 != e.p1) throw new Error("cannot make adjacent -- no shared vertex");