Skip to main content

Module gpu_collision_detection

Module gpu_collision_detection 

Source
Expand description

GPU-accelerated collision detection (CPU mock backend via Rayon).

Implements a broadphase AABB sweep-and-prune followed by a narrowphase sphere-sphere test and a stub GJK dispatcher. The “GPU” dispatch is mocked using Rayon parallel iterators so the module compiles and runs on CPU.

Structs§

Aabb
Axis-aligned bounding box.
GpuCollisionBuffer
Buffer holding the AABB list and broadphase potential pairs.
Sphere
Sphere descriptor: centre + radius.
SphereContact
Sphere-sphere narrowphase collision result.

Enums§

GjkResult
Stub result from the GJK narrowphase.

Functions§

batch_gjk_dispatch
Dispatch GJK for a batch of collision pairs (stub implementation).
build_collision_pairs
Build the full broadphase collision pair list from a sorted AABB list.
gpu_aabb_overlap
AABB-AABB overlap test kernel (mock GPU dispatch).
gpu_broadphase_sort
Sort AABBs by their minimum x-coordinate (mock GPU sort).
gpu_sphere_collision
Test sphere-sphere collisions for the given pairs (mock GPU narrowphase).