/** * Create a GeoPath of the right kind given the specified information. * @param planetModel is the planet model. * @param maxCutoffAngle is the width of the path, measured as an angle. * @param pathPoints are the points in the path. * @return a GeoPath corresponding to what was specified. */ public static GeoPath makeGeoPath(final PlanetModel planetModel, final double maxCutoffAngle, final GeoPoint[] pathPoints) { if (maxCutoffAngle < Vector.MINIMUM_ANGULAR_RESOLUTION) { return new GeoDegeneratePath(planetModel, filterPoints(pathPoints)); } return new GeoStandardPath(planetModel, maxCutoffAngle, filterPoints(pathPoints)); }