Contents

withPositions(_:)

Provides access to the positions of all the vertices within a callback.

Declaration

final func withPositions<Result>(_ callback: (Span<SIMD3<Float>>) -> Result) -> Result

Parameters

  • 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.

See Also

Accessing vertex data