/** Find the intersections with an envelope plane, and assess those intersections for * whether they truly describe crossings. */ private int countCrossings(final Edge edge, final Plane envelopePlane, final Membership envelopeBound) { final GeoPoint[] intersections = edge.plane.findIntersections(planetModel, envelopePlane, envelopeBound); int crossings = 0; if (intersections != null) { for (final GeoPoint intersection : intersections) { if (edge.startPlane.strictlyWithin(intersection) && edge.endPlane.strictlyWithin(intersection)) { // It's unique, so assess it crossings += edgeCrossesEnvelope(edge.plane, intersection, envelopePlane)?1:0; } } } return crossings; }
/** Find the intersections with an envelope plane, and assess those intersections for * whether they truly describe crossings. */ private int countCrossings(final Edge edge, final Plane envelopePlane, final Membership envelopeBound1, final Membership envelopeBound2) { final GeoPoint[] intersections = edge.plane.findIntersections(planetModel, envelopePlane, envelopeBound1, envelopeBound2); int crossings = 0; if (intersections != null) { for (final GeoPoint intersection : intersections) { if (edge.startPlane.strictlyWithin(intersection) && edge.endPlane.strictlyWithin(intersection)) { //System.out.println(" Envelope intersection point = "+intersection); // It's unique, so assess it final int counter = edgeCrossesEnvelope(edge.plane, intersection, envelopePlane)?1:0; //System.out.println(" Edge crosses envelope "+counter+" times"); crossings += counter; } } } else { //System.out.println(" Intersections = null"); } return crossings; }
if (travelIntersections != null) { for (final GeoPoint intersection : travelIntersections) { if (edge.startPlane.strictlyWithin(intersection) && edge.endPlane.strictlyWithin(intersection)) { if (edge.startPlane.strictlyWithin(otherIntersection) && edge.endPlane.strictlyWithin(otherIntersection) && intersection.isNumericallyIdentical(otherIntersection)) { if (edge.startPlane.strictlyWithin(intersection) && edge.endPlane.strictlyWithin(intersection)) {