Skip to main content

Module gpu_rigid

Module gpu_rigid 

Source
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§

BroadphasePairGpu
A candidate collision pair from the broadphase, with AABB information.
ContactManifoldGpu
Contact manifold between two bodies produced by the narrowphase.
GpuBroadphase
Broadphase collision detection for GPU rigid bodies using a sweep-and-prune (SAP) approach.
GpuConstraintSolver
Iterative sequential-impulse constraint solver for rigid body contacts.
GpuRigidBody
A single rigid body stored in GPU-friendly packed arrays of f32.
GpuRigidBodyBatch
A batch of GPU rigid bodies supporting bulk integration.

Functions§

integrate_orientation
Integrate a quaternion orientation q by angular velocity omega (rad/s) over time step dt (seconds).
quat_mul
Multiply two unit quaternions a and b (Hamilton product).
quat_normalize
Normalise a quaternion to unit length.
quat_rotate
Rotate vector v by unit quaternion q (format: [x, y, z, w]).