InterbodyForce

Interface representing a force interaction between two physical bodies in a simulation.

Implementations of this interface define the logic for detecting overlapping pairs of bodies, initializing frames for force calculations, and applying interbody forces during simulation steps.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun apply(body: Body, other: Body, dt: Double, substep: Int)
Link copied to clipboard
abstract suspend fun findOverlappingPairs(bodies: List<Body>): List<Pair<Int, Int>>
Link copied to clipboard
abstract suspend fun initializeFrame()