withParticleIndices(_:)
Provides access to the indices of particles that intersected the volume.
Declaration
func withParticleIndices<Result>(_ callback: (Span<UInt32>) -> Result) -> ResultParameters
- callback:
A closure that receives a span over the intersecting particle indices.
Return Value
The value returned by callback.
Discussion
This span is only available during the subscription callback of this event. The provided span is only valid for the lifetime of the callback.