private void calculateHorizon(point3d eyePnt, HalfEdge edge0, Face face, List <HalfEdge> horizon) { // oldFaces.add (face); deleteFacePoints(face, null); face.mark = Face.DELETED; if (debug) { Print(" visiting face " + face.getVertexString()); } HalfEdge edge; if (edge0 == null) { edge0 = face.getEdge(0); edge = edge0; } else { edge = edge0.getNext(); } do { Face oppFace = edge.oppositeFace(); if (oppFace.mark == Face.VISIBLE) { if (oppFace.distanceToPlane(eyePnt) > tolerance) { calculateHorizon(eyePnt, edge.getOpposite(), oppFace, horizon); } else { horizon.Add(edge); if (debug) { Print(" adding horizon edge " + edge.getVertexString()); } } } edge = edge.getNext(); }while (edge != edge0); }