replace(_:)
Replaces all transform data synchronously on the CPU.
Declaration
final func replace<R, E>(_ body: @_lifetime(0: copy 0) (inout MutableSpan<float4x4>) throws(E) -> R) throws(E) -> R where E : Error, R : ~CopyableParameters
- body:
A closure that receives a mutable span over the transform data and fully populates it.
Discussion
You pass a closure that receives a mutable span representing the transform data. Upon entry the transform data is undefined; the closure is responsible for populating it with valid data. This span is valid only for the duration of the closure.