Provides a common API for 3D shapes that support ray intersection.
Determines if the given ray intersects the shape.