symtropy_physics/lib.rs
1// Copyright (C) 2024-2026 Tristan Stoltz / Luminous Dynamics
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Commercial licensing: see COMMERCIAL_LICENSE.md at repository root
4//! N-dimensional rigid body physics engine.
5//!
6//! Provides dimension-agnostic rigid body dynamics, GJK collision detection,
7//! and constraint solving. All types are `const D: usize` parameterized for
8//! stack-allocated, SIMD-friendly physics at 2D/3D/4D.
9//!
10//! # Architecture
11//! - `RigidBody<D>` — position, velocity, angular velocity (bivector), mass, collider
12//! - `PhysicsWorld<D>` — owns bodies, steps simulation, resolves collisions
13//! - `gjk::intersects()` — GJK intersection test for any `Shape<D>`
14//! - `contact::ContactManifold<D>` — collision contact data
15//! - `integrator` — semi-implicit Euler with bivector angular dynamics
16
17pub mod articulation;
18pub mod body;
19pub mod broadphase;
20pub mod ccd;
21pub mod constraint;
22pub mod contact;
23pub mod epa;
24pub mod gjk;
25pub mod integrator;
26pub mod island;
27pub mod joints;
28pub mod manifold_gen;
29pub mod raycast;
30pub mod replay;
31pub mod world;
32
33pub use articulation::{ArticulatedChain, ChainBuilder, LinkSpec};
34pub use body::{BodyHandle, BodyType, NetId, RigidBody};
35pub use broadphase::{morton_encode, morton_prefix, Aabb, Lbvh};
36pub use constraint::Constraint;
37pub use contact::{CollisionEvent, ContactCache, ContactManifold, SensorEvent};
38pub use epa::EpaResult;
39pub use joints::{BallJoint, FixedJoint, HingeJoint, MotorDrive, PrismaticJoint};
40pub use replay::{apply_commands, ReplayTape, WorldCommand, WorldSnapshot};
41pub use world::{NoOpCallback, PhysicsCallback, PhysicsWorld};