Module bvh

Source
Expand description

Deterministic median-split bounding-volume hierarchy.

The tree stores only caller-owned keys and axis-aligned bounds. It is a broad-phase structure: overlap and ray results are candidates, never an assertion about exact geometry. Build and queries are serial. The immutable representation is deliberately provider-neutral; a parallel or GPU builder can implement the same crate::SpatialIndex contract later without exposing hardware concepts.

Structsยง

Bvh
Immutable median-split AABB hierarchy over opaque caller keys.
CandidatePair
One conservative pair emitted by a broad-phase query.
NearestCandidate
Nearest accepted key according to AABB lower-bound distance.
PairCandidates
Deterministically ordered conservative pair candidates plus execution cost.
SpatialQueryStats
Observable cost counters for an allocating candidate-pair query.