Contents

reset(encoder:)

Resets the simulation to its initial state, clearing all live elements and accumulated time.

Declaration

final func reset(encoder: any MTLComputeCommandEncoder)

Parameters

  • encoder:

    The compute command encoder to encode the reset operation with.

Discussion

The reset is encoded as a compute dispatch into encoder. You must commit the enclosing command buffer for the reset to take effect on the GPU.