raycastShape static method
Implementation
static RaycastHit<Shape>? raycastShape(Ray ray, Shape shape) {
if (shape is Circle) return raycastCircle(ray, shape);
if (shape is AABB) return raycastAABB(ray, shape);
if (shape is Line) return raycastLine(ray, shape);
return null;
}