1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Spatial acceleration contracts.
//!
//! # What this crate provides
//!
//! Two indices, both deterministic and callback-based:
//!
//! - [`Bvh`] over bounded *objects* -- triangles, solids, anything with an
//! AABB. Adapts to how geometry is distributed, so empty space costs
//! nothing. This is what clash, ray casting, and healing use.
//! - [`PointIndex`] over *points*, on a uniform grid. Exact KNN and radius
//! search for scattered samples, where every query has the same radius and
//! cell arithmetic beats tree descent.
//!
//! An octree, k-d tree, GPU broad phase, or foreign index can implement the
//! same [`SpatialIndex`] callback API. None is provided here: the BVH covers
//! object queries and the grid covers point queries, and a third structure
//! should arrive with a measured workload that needs it, not before.
//!
//! Narrow-phase geometry remains outside the index: these answer *which
//! candidates*, never *what the intersection is*.
//!
//! Beside the indices, [`barycentric`] locates a point in a triangle,
//! tetrahedron or polygon by weights of its corners, for interpolating
//! values given there.
pub use ;
pub use ;
pub use ;
pub use ;