Contents

advance(_:)

Advances the simulation by one time step, encoding all simulation stage dispatches into the command buffer and encoder provided by params.

Declaration

final func advance(_ params: ComputeGraphSimulation.AdvanceParams)

Parameters

  • params:

    The advance parameters, including the time delta, command buffer, compute encoder, and spatial transforms for this frame.

Discussion

Call this once per frame from your render loop. The simulation reads deltaTime to determine how much simulated time to consume, subject to simulationRate. Spatial transforms and optional viewer information in params are forwarded to the simulation graph.