using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D;
///
/// Represents a 2D raycast resolver.
///
public interface IRaycastResolver2D
{
///
/// Casts a against a specific shape and returns the first hit, if any.
///
/// The type of the , which must implement .
/// The shape to test against.
/// The to cast.
///
/// The maximum distance to check along the . Defaults to .
///
///
/// A containing information about the intersection, or if there was no hit.
///
RaycastResult? RaycastAgainst(T shape, Ray2D ray, float length = float.MaxValue) where T : ICollider2D;
}