Made get_nearest_intersection take a container instead of iterators.