From Jan Peciva, RayIntersector implementation