/** * Computes the first intersection of this globe with a specified line. The line is interpreted as a ray; * intersection points behind the line's origin are ignored. * * @param line the line to intersect with this globe * @param result a pre-allocated {@link Vec3} in which to return the computed point * * @return true if the ray intersects the globe, otherwise false * * @throws IllegalArgumentException If either argument is null */ public boolean intersect(Line line, Vec3 result) { if (line == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "intersect", "missingLine")); } if (result == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Globe", "intersect", "missingResult")); } return this.projection.intersect(this, line, result); } }