parry3d/query/sweep_toi/mod.rs
1//! Time-of-impact computation on endpoint-interpolated sweeps.
2//!
3//! Unlike [`cast_shapes_nonlinear`](crate::query::cast_shapes_nonlinear), which models motion
4//! as constant velocities, this module models a timestep as a [`Sweep`] between two endpoint
5//! poses (linear center-of-mass interpolation + rotation nlerp) and computes the earliest
6//! time at which two swept shapes reach a slop-based target separation, using conservative
7//! advancement with separation functions.
8//!
9//! NOTE: this is mostly ported from Box2D which had much better CCD quality than Rapier.
10//! TODO: see how we can combine that with `nonlinear_shape_cast` since they serve similar goals.
11
12pub use self::proxy_distance::{proxy_distance, ProxyDistanceOutput, SimplexCache};
13pub use self::sweep::Sweep;
14pub use self::sweep_toi::{sweep_time_of_impact, SweepToiOutput, SweepToiStatus};
15pub use self::toi_proxy::{ToiProxy, TOI_PROXY_INLINE_POINTS};
16
17#[cfg(feature = "alloc")]
18pub use self::composite::{sweep_time_of_impact_composite, SweepCompositeFastShape, CORE_FRACTION};
19
20#[cfg(feature = "alloc")]
21mod composite;
22mod proxy_distance;
23mod separation;
24mod sweep;
25mod sweep_toi;
26mod toi_proxy;