use of org.twak.viewTrace.facades.LineHeight in project chordatlas by twak.
the class SkelFootprint method findOcclusions.
private static void findOcclusions(HalfMesh2 mesh) {
int count = 0;
for (HalfFace hf : mesh.faces) for (HalfEdge e1 : hf.edges()) {
Line el1 = e1.line();
for (HalfFace hf2 : mesh.faces) {
for (HalfEdge e2 : hf2.edges()) if (e1 != e2) {
Line e2l = e2.line();
if (el1.distance(e2l) < 1 && e2l.absAngle(el1) > Math.PI * 0.7) // !el1.isOnLeft( e2l.fromPPram( 0.5 ) )
{
((SuperEdge) e1).occlusions.add(new LineHeight(el1.project(e2l.start, true), el1.project(e2l.end, true), 0, ((SuperFace) hf2).height));
count++;
}
}
}
}
System.out.println("found " + count + " occluding surfaces");
}