/**
 * Sweep `shape` (held at the fixed `rotation`) linearly from `(fx,fy,fz)` to
 * `(tx,ty,tz)` through both broadphase trees, ignoring colliders owned by
 * `exclude_entity`.
 *
 * Returns the traversable fraction of the segment in `[0, 1]`: `1` means the
 * path is clear; a value `< 1` means a blocker was hit at that fraction and
 * `result` has been filled — `result.position` is the swept-shape centre at
 * first contact, `result.normal` is the blocker's outward surface normal
 * (B → A), `result.entity` / `result.body_id` the blocker.
 *
 * @param {import("../ecs/PhysicsSystem.js").PhysicsSystem} system
 * @param {import("../../../core/geom/3d/shape/AbstractShape3D.js").AbstractShape3D} shape
 * @param {{x:number,y:number,z:number,w:number}} rotation fixed orientation
 * @param {number} fx
 * @param {number} fy
 * @param {number} fz
 * @param {number} tx
 * @param {number} ty
 * @param {number} tz
 * @param {number} exclude_entity entity to ignore (the swept body itself)
 * @param {PhysicsSurfacePoint} result populated on hit; untouched on a clear path
 * @returns {number} traversable fraction in [0, 1]
 */
export function ccd_sweep_segment(system: import("../ecs/PhysicsSystem.js").PhysicsSystem, shape: import("../../../core/geom/3d/shape/AbstractShape3D.js").AbstractShape3D, rotation: {
    x: number;
    y: number;
    z: number;
    w: number;
}, fx: number, fy: number, fz: number, tx: number, ty: number, tz: number, exclude_entity: number, result: PhysicsSurfacePoint): number;
/**
 * Post-solve continuous-collision pass over the awake set. For each awake
 * Dynamic body flagged {@link RigidBodyFlags.CCD} that moved more than
 * {@link CCD_MIN_SWEEP_DISTANCE} this step, sweep its primary collider along the
 * step's net translation and stop it at the first blocker (clamp pose + remove
 * inbound normal velocity).
 *
 * Start-of-step positions are captured into `system.__ccd_start_pos` (3 doubles
 * per body index) before the substep loop; this pass reads the final pose from
 * the live Transform. Iterates the awake list in storage order, so it is
 * deterministic.
 *
 * @param {import("../ecs/PhysicsSystem.js").PhysicsSystem} system
 */
export function ccd_resolve(system: import("../ecs/PhysicsSystem.js").PhysicsSystem): void;
/**
 * Continuous collision detection — linear shape-cast (the "speculative margin
 * floor, upgraded to an opt-in per-body sweep" item from PLAN.md).
 *
 * The discrete pipeline detects contacts by overlap at step boundaries: a body
 * that moves more than its own thickness in one step can start a step on one
 * side of a thin wall and end on the other, never overlapping it on any frame
 * the broadphase samples — it tunnels. The speculative fat-AABB margin
 * (`compute_fat_world_aabb`) covers moderate speeds; genuinely fast movers
 * (bullets, dropped debris, a body flung by an explosion) need a swept test.
 *
 * Approach (Box2D `b2_continuousPhysics`-style conservative advancement): after
 * the substep solver has produced each body's final pose, sweep a CCD-flagged
 * fast mover's primary collider along its NET step translation
 * (start-of-step → final pose) using the existing {@link shape_cast} TOI engine.
 * On the first blocker, clamp the body to the contact pose and remove the
 * inbound normal component of its velocity (an inelastic stop) — the next
 * discrete step then resolves the now-touching contact with the real
 * material / restitution.
 *
 * Scope (v1, deliberate):
 *   - LINEAR sweep only: the orientation is held fixed through the sweep (the
 *     per-step angular motion is small at the fixed-step rate).
 *   - PRIMARY same-entity collider: a compound body sweeps its first collider;
 *     child-entity colliders (whose transform is synced outside the step) are
 *     not swept.
 *   - EXACT against static geometry (the static BVH holds tight, never-moved
 *     leaves); APPROXIMATE against other dynamic bodies (they have moved this
 *     step too, but the sweep sees their start-of-step broadphase AABBs) — the
 *     speculative-margin floor for the dynamic-vs-dynamic case.
 *   - The CCD stop itself is inelastic; the impact does not bounce. Restitution
 *     applies on the next discrete contact.
 */
/**
 * Minimum per-step displacement (metres) before a CCD sweep is worth running.
 * Its ONLY job is to skip a body that didn't meaningfully move — a resting /
 * sleeping-soon body whose displacement is sub-millimetre jitter — which avoids
 * a degenerate zero-length sweep and saves the query cost.
 *
 * It must NOT be tied to the body's own size. Tunnelling risk is governed by the
 * *obstacle's* thickness, not the mover's: a 2 m sphere drifting at 0.5 m/step
 * still passes clean through a 1 cm floor. A small absolute slop catches that;
 * gating on a fraction of the body's extent would (wrongly) wait until the body
 * moved more than its own radius and miss every thin-obstacle tunnel below that
 * speed. The discrete narrowphase still owns any obstacle thicker than a body's
 * per-step move, so CCD reliably prevents tunnelling of obstacles thicker than
 * this slop.
 * @type {number}
 */
export const CCD_MIN_SWEEP_DISTANCE: number;
import { PhysicsSurfacePoint } from "../queries/PhysicsSurfacePoint.js";
//# sourceMappingURL=linear_sweep.d.ts.map