Expand description
GPU-accelerated rigid body batch simulation (CPU mock).
Provides structs and functions for simulating many rigid bodies in batch, broadphase collision detection (SAP), and constraint solving via sequential impulse. All computation is done on the CPU as a reference implementation.
Structs§
- Broadphase
Pair Gpu - A candidate collision pair from the broadphase, with AABB information.
- Contact
Manifold Gpu - Contact manifold between two bodies produced by the narrowphase.
- GpuBroadphase
- Broadphase collision detection for GPU rigid bodies using a sweep-and-prune (SAP) approach.
- GpuConstraint
Solver - Iterative sequential-impulse constraint solver for rigid body contacts.
- GpuRigid
Body - A single rigid body stored in GPU-friendly packed arrays of
f32. - GpuRigid
Body Batch - A batch of GPU rigid bodies supporting bulk integration.
Functions§
- integrate_
orientation - Integrate a quaternion orientation
qby angular velocityomega(rad/s) over time stepdt(seconds). - quat_
mul - Multiply two unit quaternions
aandb(Hamilton product). - quat_
normalize - Normalise a quaternion to unit length.
- quat_
rotate - Rotate vector
vby unit quaternionq(format: [x, y, z, w]).