Expand description
Broadphase AABB kernels for parallel overlap detection.
Structs§
- AabbGpu
- Axis-aligned bounding box using f32 coordinates for GPU compatibility.
- Aabb
Overlap Kernel - Kernel that detects overlapping AABB pairs.
- Aabb
Sort Kernel - Kernel that sorts AABBs along the X-axis and outputs sorted indices.
- BvhGpu
Node - A single node of a GPU-oriented BVH tree.
- Compact
Pair List - A deduplicated, sorted list of overlapping body-ID pairs.
- Sort
AndSweep Gpu - Sort-and-sweep broadphase operating on
AabbGpuvalues. - Uniform
Grid Gpu - Uniform 3-D grid for GPU broadphase.
Functions§
- aabb_
surface_ area - Compute the surface area of an
AabbGpu. - assign_
to_ grid_ cells - Assigns each AABB in a flat array to uniform grid cells.
- build_
bvh - Build a BVH using a simple midpoint-split heuristic.
- build_
lbvh - Build a Linear BVH (LBVH) by sorting AABBs on their Morton codes.
- bvh_
depth - Compute the depth of the BVH tree.
- bvh_
leaf_ count - Count the number of leaf nodes in the BVH.
- bvh_
sah_ cost - Surface Area Heuristic (SAH) cost of a BVH tree.
- lbvh_
query_ pairs - Query overlapping leaf pairs in an LBVH by traversal.
- morton_
code - Compute the 3-D Morton code (Z-curve) for integer coordinates.
- morton_
key_ for_ aabb - Compute a Morton key for a world-space AABB centroid.
- morton_
sort - Sort a slice of
AabbGpuby Morton code (Z-order curve). - pairs_
from_ grid_ assignments - Extract candidate pairs from a cell-assignment list.
- refit_
bvh - Refit BVH bounding boxes bottom-up after leaf AABBs have changed.
- sah_
best_ split - Surface Area Heuristic (SAH) split for BVH construction.
- sap_
incremental_ update - Update the sort-and-sweep pair list after a set of bodies have moved.
- sort_
and_ sweep_ flat - Sort-and-sweep on a flat f64 AABB array (GPU-style parallel data layout).