BoundingVolumeHierarchy
Median-split AABB tree, reusable for mesh primitives or particle boxes.
query_pairs returns unique original-index pairs whose boxes are within
cutoff of one another. This is an exact box query, and only a broad
phase for extended objects. For point boxes it is an exact radius search.
Refit preserves the topology; rebuild by constructing a new tree when
large deformations make the original split inefficient.