<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothPoseResource",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C12PoseResourceC"
  },
  "title" : "ClothPoseResource"
}
-->

# ClothPoseResource

A resource that defines a set of vertex positions for a cloth body.

```
final class ClothPoseResource
```

## Overview

A pose resource provides an alternate set of positions for the vertices of a [`ClothMeshResource`](/documentation/RealityKit/ClothMeshResource);
the topology is still determined by the mesh resource.
One common use is to specify an already-draped starting configuration via [`initialMeshDraping`](/documentation/RealityKit/ClothBodyComponent/initialMeshDraping).

## Topics

### Creating a pose resource

[`convenience init(positions: [SIMD3<Float>]) throws`](/documentation/RealityKit/ClothPoseResource/init(positions:))

Creates a cloth pose resource with the given vertex positions.

### Accessing pose positions

[`func withPositions<Result>((Span<SIMD3<Float>>) -> Result) -> Result`](/documentation/RealityKit/ClothPoseResource/withPositions(_:))

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

[`func position(at: UInt32) -> SIMD3<Float>`](/documentation/RealityKit/ClothPoseResource/position(at:))

Returns the position of the vertex at the given index.

[`var vertexCount: Int`](/documentation/RealityKit/ClothPoseResource/vertexCount)

The number of vertices in the pose resource.

## Relationships

### Conforms To

[`Resource`](/documentation/RealityKit/Resource)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)