/** Construct the most accurate normalized plane through an x-y point and including the Z axis. * If none of the points can determine the plane, return null. * @param planePoints is a set of points to choose from. The best one for constructing the most precise plane is picked. * @return the plane */ public static Plane constructNormalizedZPlane(final Vector... planePoints) { // Pick the best one (with the greatest x-y distance) double bestDistance = 0.0; Vector bestPoint = null; for (final Vector point : planePoints) { final double pointDist = point.x * point.x + point.y * point.y; if (pointDist > bestDistance) { bestDistance = pointDist; bestPoint = point; } } return constructNormalizedZPlane(bestPoint.x, bestPoint.y); }
} else { final Plane normalPlane = Plane.constructNormalizedZPlane(upperPoint, lowerPoint, center);
final Plane normalPlane = Plane.constructNormalizedZPlane(upperPoint, lowerPoint, point);
final Plane normalizedZPlane = constructNormalizedZPlane(A,B); final GeoPoint[] points = findIntersections(planetModel, normalizedZPlane, bounds, NO_BOUNDS); for (final GeoPoint point : points) {
final Plane verticalPlane = constructNormalizedZPlane(A,B); final GeoPoint[] points = findIntersections(planetModel, verticalPlane, bounds, NO_BOUNDS); for (final GeoPoint point : points) {