Add ConvexHull struct storing vertices with a support function that
returns the farthest point in a given direction, enabling GJK/EPA
collision detection. Update all Collider match arms across the physics
crate (collision, raycast, integrator, solver) to handle the new variant.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Angular velocity integration with diagonal inertia tensor (sphere/box/capsule)
- Angular impulse in collision solver (torque from off-center contacts)
- Sequential impulse solver with configurable iterations (default 4)
- Sleep/island system: bodies sleep after velocity threshold timeout, wake on collision
- Ray vs triangle intersection (Moller-Trumbore algorithm)
- raycast_all returning all hits sorted by distance
- BVH query_pairs replaced N^2 brute force with recursive tree traversal
- BVH query_ray for accelerated raycasting
- BVH refit for incremental AABB updates
- Swept sphere vs AABB continuous collision detection (CCD)
- Updated lib.rs exports for all new public APIs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add friction coefficient to RigidBody (default 0.5) and implement
tangential impulse clamping in resolve_collisions using Coulomb's law,
including resting-contact friction for sliding bodies.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement GJK (Gilbert-Johnson-Keerthi) overlap detection and EPA
(Expanding Polytope Algorithm) penetration resolution for arbitrary
convex collider pairs. Used as the fallback narrow phase for any
combination involving Capsule, while Sphere/Box specialized routines
are preserved for performance.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Capsule { radius, half_height } to the Collider enum, with AABB
computation and ray-vs-capsule intersection support. The capsule is
oriented along the Y axis (cylinder + two hemisphere caps).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements resolve_collisions() with impulse-based velocity correction and
Baumgarte-style position correction, plus physics_step() combining integrate,
detect_collisions, and resolve_collisions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>