<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothPoseResource/withPositions(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C12PoseResourceC13withPositionsyxxs4SpanVys5SIMD3VySfGGXElF"
  },
  "title" : "withPositions(_:)"
}
-->

# withPositions(_:)

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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)