withPositions(_:)
Provides access to the positions of all the vertices within a callback.
Declaration
final func withPositions<Result>(_ callback: (Span<SIMD3<Float>>) -> Result) -> ResultParameters
- callback:
A closure that receives a span over the vertex positions.
Return Value
The value returned by callback.
Discussion
The provided span is only valid for the lifetime of the callback.