protected void calculateHorizon(Point3d eyePnt, HalfEdge edge0, Face face, ArrayList horizon) { // oldFaces.add (face); deleteFacePoints(face, null); face.mark = Face.DELETED; if (debug) { Console.WriteLine(" 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) { Console.WriteLine(" adding horizon edge " + edge.getVertexString()); } } } edge = edge.getNext(); }while (edge != edge0); }