/**
 * Sweep a convex shape along a ray and find the first body it would
 * hit. Used by character controllers (sweep a capsule along intended
 * movement to find blockers), high-speed projectile movement (avoid
 * tunnelling without paying for full per-body CCD), and any kinematic
 * "where would this body end up if I tried to move it?" query.
 *
 * Pipeline:
 *   1. Build the swept AABB: the shape's local-frame AABB rotated
 *      into world by `rotation`, translated to `ray.origin`, then
 *      stretched along `ray.direction * ray.tMax`.
 *   2. Query both broadphase BVHs (static + dynamic) for leaves whose
 *      AABB overlaps the swept volume.
 *   3. For each candidate, bisect the [0, best_t] interval for the
 *      smallest `t` at which the swept shape overlaps the candidate's
 *      collider. GJK on each midpoint.
 *
 * Picking `best_t` (rather than always running the full [0, tMax]
 * bisection) is the early-termination optimisation: once we have a
 * hit at some t, no later candidate can produce a smaller TOI by
 * being checked at its full [0, tMax] interval.
 *
 * Output on hit:
 *   - `result.t` — sweep distance to impact (in the same units as
 *     `ray.direction`'s magnitude; for a unit-direction ray, this is
 *     metres).
 *   - `result.position` — `ray.origin + t * ray.direction`, i.e. the
 *     centre of the swept shape at the moment of first contact. NOT
 *     a point on the target's surface; that would need narrowphase
 *     refinement which the broadphase-only architecture doesn't have
 *     wired up yet.
 *   - `result.normal` — target surface's outward normal at the kiss
 *     point (unit length), computed by running GJK + EPA against the
 *     just-overlapping configuration at the TOI. Falls back to
 *     `-ray.direction` on the rare case EPA degenerates (NaN / zero
 *     depth) — see comment near the EPA call.
 *   - `result.entity` / `result.body_id` — the hit body.
 *
 * Output on miss: untouched; same convention as `raycast`.
 *
 * @param {PhysicsSystem} system
 * @param {Ray3} ray  origin + unit direction + `tMax`
 * @param {AbstractShape3D} shape  shape being swept, in its local frame
 * @param {{x:number,y:number,z:number,w:number}} rotation  fixed orientation
 * @param {PhysicsSurfacePoint} result  populated on hit; untouched on miss
 * @param {(entity:number, collider:Collider)=>boolean} [filter] mandatory in
 *   contract; defaults to {@link returnTrue}
 * @returns {boolean}
 */
export function shape_cast(system: PhysicsSystem, ray: Ray3, shape: AbstractShape3D, rotation: {
    x: number;
    y: number;
    z: number;
    w: number;
}, result: PhysicsSurfacePoint, filter?: (entity: number, collider: Collider) => boolean): boolean;
//# sourceMappingURL=shape_cast.d.ts.map