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

# vertexIndex(primitive:vertex:)

Returns the vertex index of the specified vertex within the specified primitive.

```
final func vertexIndex(primitive: UInt32, vertex: UInt32) -> UInt32
```

## Parameters

`primitive`

The zero-based index of the primitive.

`vertex`

The zero-based index of the vertex within the primitive.

## Return Value

The vertex index of the specified vertex within the specified primitive.

---

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)