Contents

withSimulationSpacePositions(_:)

Provides access to the new simulation positions of the body’s particles, in simulation space.

Declaration

func withSimulationSpacePositions<Result>(_ body: (Span<SIMD3<Float>>) -> Result) -> Result

Parameters

  • body:

    A closure that receives a span over the simulation-space particle positions.

Return Value

The value returned by body.

Discussion

The provided span is only valid for the lifetime of the callback.

See Also

Accessing simulation space positions