public void bindEdge(E e) { bind_to.add(e); }
public void dobind() { bind_to.dobind(this); }
- public Point shatter() { return shatter(midpoint(), null, null, true); }
+ public Point shatter() { return shatter(true); }
+ public Point shatter(boolean triangles) { return shatter(midpoint(), null, null, triangles); }
public Point shatter(Point mid, BindingGroup bg1, BindingGroup bg2, boolean triangles) {
+ return shatter(mid, bg1, bg2, triangles, false);
+ }
+ public Point shatter(Point mid, BindingGroup bg1, BindingGroup bg2, boolean triangles, boolean leader) {
if (shattered || destroyed) return mid;
shattered = true;
BindingGroup old_bind_to = bind_to;
bind_peers.shatter(bg1, bg2, triangles);
old_bind_to.shatter(bg2.other(), bg1.other(), triangles);
+ if (!triangles) {
+ next.shatter(false);
+ prev.shatter(false);
+ }
pair.shatter();
destroy();
newT(r.p, mid, p2.p, null, old_colorclass);
bg1.add(p1.getE(mid));
bg2.add(p2.getE(mid).pair);
+ if (leader) p1.getE(mid).shatter();
}
return mid;
}