feat(physics): add angular dynamics, sequential impulse solver, sleep system, BVH improvements, CCD, and ray extensions

- 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>
This commit is contained in:
2026-03-25 20:57:55 +09:00
parent 1b0e12e824
commit abd6f5cf6e
8 changed files with 1166 additions and 106 deletions

View File

@@ -9,12 +9,15 @@ pub mod rigid_body;
pub mod integrator;
pub mod solver;
pub mod raycast;
pub mod ccd;
pub use bvh::BvhTree;
pub use collider::Collider;
pub use contact::ContactPoint;
pub use collision::detect_collisions;
pub use rigid_body::{RigidBody, PhysicsConfig};
pub use integrator::integrate;
pub use integrator::{integrate, inertia_tensor, inv_inertia};
pub use solver::{resolve_collisions, physics_step};
pub use raycast::{RayHit, raycast};
pub use raycast::{RayHit, raycast, raycast_all};
pub use ray::ray_vs_triangle;
pub use ccd::swept_sphere_vs_aabb;