Skip to main content

Crate uzor_urx_physics

Crate uzor_urx_physics 

Source
Expand description

§uzor-urx-physics

Lightweight 3D physics for the URX render family — Wave 15+16:

  • Collider: AABB (axis-aligned box) or Sphere.
  • Body: id, position, velocity, mass, restitution, kind (Dynamic / Static / Kinematic).
  • PhysicsWorld: stores bodies, runs Verlet integration with gravity, and emits Contact events for every overlapping pair.

Out of scope (later waves): joints, friction, continuous-collision resolution, mesh colliders, sleeping bodies. The point of this crate is to be ENOUGH for URX 3D demos (falling boxes, ball-on- plane, particle-vs-box) without pulling in rapier3d’s 100k LOC.

No dependency on uzor-urx-3d: that’s the consumer’s job — pass Body::position into the matching Node::with_translation each frame.

Structs§

Body
BodyId
Contact
Overlap event — a < b always (lower-id first) to avoid dupes.
PhysicsWorld
Vec3
A 3-dimensional vector.

Enums§

BodyKind
Body kind controls how the integrator treats the body.
Collider
Joint
Wave 17 — joint between two bodies.