pub trait SpatialPartition {
type Cell: Hash + Eq;
// Required method
fn cells(&self) -> impl Iterator<Item = Self::Cell>;
}Expand description
Maps a collider to spatial cells for broad-phase acceleration.
Collision managers can use this to build a spatial index and only check pairs that share at least one cell, reducing O(n²) to O(n×k) where k is the average number of colliders per cell.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.