withElements(_:)
Provides read-only access to the per-vertex data within a callback.
Declaration
func withElements<Result>(_ callback: (Span<ElementType>) -> Result) -> ResultParameters
- callback:
A closure that receives a span over the per-vertex data.
Return Value
The value returned by callback.
Discussion
The provided span is only valid for the lifetime of the callback.