import type { Box2Like } from './box2'; import type { Circle2Like } from './circle2'; import type { Vec2, Vec2Like } from './types'; /** 2D ray storage: [originX, originY, directionX, directionY, maxDistance]. */ export type Ray2 = Float32Array & { readonly __ray2: void; }; /** Readable 2D ray input. */ export type Ray2Like = ArrayLike; /** Result shared by AABB, circle, and swept-volume intersection tests. */ export interface Ray2Intersection { hit: boolean; /** Entry distance along the normalized ray, clamped to zero when inside. */ t: number; } /** Create a normalized finite 2D ray. `maxDistance` defaults to infinity. */ export declare function create(out?: Float32Array, origin?: Vec2Like, direction?: Vec2Like, maxDistance?: number): Ray2; /** Copy the ray origin to out. */ export declare function getOrigin(out: Vec2, ray: Ray2Like): Vec2; /** Copy the normalized ray direction to out. */ export declare function getDirection(out: Vec2, ray: Ray2Like): Vec2; /** Return the ray's finite travel limit. */ export declare function getMaxDistance(ray: Ray2Like): number; /** Set the ray origin. */ export declare function setOrigin(ray: Ray2, origin: Vec2Like): Ray2; /** Set and normalize the ray direction. */ export declare function setDirection(ray: Ray2, direction: Vec2Like): Ray2; /** Set the ray's non-negative travel limit. */ export declare function setMaxDistance(ray: Ray2, maxDistance: number): Ray2; /** Intersect a finite ray with an AABB using the 2D slab method. */ export declare function rayAabbIntersects(ray: Ray2Like, box: Box2Like): Ray2Intersection; /** Intersect a finite ray with a bounding circle. */ export declare function rayCircleIntersects(ray: Ray2Like, circle: Circle2Like): Ray2Intersection; /** Sweep an AABB along a finite ray and intersect it with a target AABB. */ export declare function aabbCastIntersects(ray: Ray2Like, moving: Box2Like, target: Box2Like): Ray2Intersection; /** Sweep a circle along a finite ray and intersect it with a target circle. */ export declare function circleCastIntersects(ray: Ray2Like, moving: Circle2Like, target: Circle2Like): Ray2Intersection; //# sourceMappingURL=ray2.d.ts.map