Constraint

interface Constraint(source)

Represents a constraint in a physical system, which influences the behavior of a Body.

A Constraint typically applies rules or restrictions to the motion or interaction of the elements within a Body. This can include conditions like maintaining distances between points, restricting movement to certain boundaries, or other physical interactions.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun initialize()
Link copied to clipboard
abstract suspend fun solve(body: Body, dt: Double)

Resolves constraints and updates the state of nodes within the given physical body over a time step.