Skip to main content

Module soft_body

Module soft_body 

Source
Expand description

Mass-spring soft body simulation.

Models deformable objects as networks of point masses connected by Hookean springs (structural, shear, and bend). Integration uses semi-implicit Euler with optional Verlet damping.

§Typical Usage

use proof_engine::physics::soft_body::SoftBody;
let mut cloth = SoftBody::grid(8, 8, 1.0);
cloth.pin(0); // pin top-left corner
cloth.step(0.016, [0.0, -9.8].into());

Structs§

SoftBody
A mass-spring soft body.
SoftNode
A point mass in the soft body network.
Spring
A Hookean spring connecting two nodes.

Enums§

SoftConstraint
Additional constraint types that can be layered onto a SoftBody.
SpringKind
Spring type for categorization and visual rendering.