NodeRepulseInterbodyForceBVH

Implementation of the InterbodyForce interface that applies a repulsive force between the nodes of two physical bodies based on their proximity, utilizing a bounding volume hierarchy (BVH) for improved performance during pair detection.

This class models interbody repulsion where nodes from two distinct bodies repel each other based on a defined search radius and strength. The BVH data structure accelerates the process of detecting intersecting nodes.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

A map used to cache BVH representations for bodies during a simulation frame, improving performance by avoiding redundant BVH recomputations.

Link copied to clipboard

The maximum distance within which nodes of two bodies interact. Nodes beyond this radius have no effect on each other.

Link copied to clipboard

The magnitude of the repulsive force applied between interacting nodes.

Functions

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