src/Quadtree.cs
/// <summary>Find all items intersecting the given ray, ordered closest to <paramref name="start"/> first.</summary>
/// <param name="start">Start point.</param>
/// <param name="direction">Direction of the ray.</param>
/// <param name="thickness">Thickness (width) of ray.</param>
/// <returns>Items that intersect the given ray.</returns>
Find all items intersecting the given ray, ordered closest to  first.
Find all items intersecting the given ray ordered closest to first .
public ItemList Raycast(Vector2 start, Vector2 direction, float thickness = 1) {
            var end = start + (direction * float.MaxValue);
            var items = Query<ItemList>(new RotRect(start, new Vector2(MathF.Sqrt(Vector2.DistanceSquared(start, end)), thickness), MathF.Atan2(direction.Y, direction.X), new Vector2(0, thickness / 2)));
            items.Sort((T x, T y) => Vector2.DistanceSquared(start, x.Bounds.XY) < Vector2.DistanceSquared(start, x.Bounds.XY) ? -1 : 0);
            return items;
        }
public ItemList Raycast ( Vector2 start , Vector2 direction , float thickness = 1 ) { var end = start + ( direction * float . MaxValue ) ; var items = Query < ItemList > ( new RotRect ( start , new Vector2 ( MathF . Sqrt ( Vector2 . DistanceSquared ( start , end ) ) , thickness ) , MathF . Atan2 ( direction . Y , direction . X ) , new Vector2 ( 0 , thickness / 2 ) ) ) ; items . Sort ( ( T x , T y ) => Vector2 . DistanceSquared ( start , x . Bounds . XY ) < Vector2 . DistanceSquared ( start , x . Bounds . XY ) ? - 1 : 0 ) ; return items ; }
Find all items intersecting the given ray, ordered closest to  first.
Find all items intersecting the given ray ordered closest to first .
Items that intersect the given ray.
Items that intersect the given ray .
start
Vector2
None
direction
Vector2
Direction of the ray.
Direction of the ray .
thickness
float
Thickness (width) of ray.
Thickness ( width ) of ray .