run Dynamics3DAll
suspend fun <A : AgentLike> KSLProcessBuilder.runDynamics3DAll(dynamics: Dynamics3D<A>, agents: () -> Collection<A>, dt: Double = 0.05, until: () -> Boolean = { false }, apply: (agent: A, vNew: Point3D, pNew: Point3D) -> Unit = { a, v, p ->
dynamics.setVelocity(a, v)
dynamics.space.moveTo(a, p)
})(source)
Drive a whole population under dynamics from a single controller process using a Jacobi (synchronous, order-independent) update — the batched, 3D analog of runDynamics3D. Each tick computes every agent's step from the shared current state via Dynamics3D.stepAll, applies them all, then delays dt.
agents is re-evaluated each tick so the population may change. Override apply to inject boundary handling (torus wrap, altitude clamp, no-fly-zone rejection) before the candidate is committed; by default the candidate is applied as-is.
Throws
if dt is non-positive