---
title: "vertexIndex(primitive:vertex:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/clothmeshresource/vertexindex(primitive:vertex:)"
---

# vertexIndex(primitive:vertex:)

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

## Declaration

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

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

## See Also

### Accessing vertex data

- [vertexCount](realitykit/clothmeshresource/vertexcount.md)
- [positions](realitykit/clothmeshresource/positions.md)
- [position(at:)](realitykit/clothmeshresource/position(at:).md)
- [withPositions(_:)](realitykit/clothmeshresource/withpositions(_:).md)
- [vertexIndex(at:)](realitykit/clothmeshresource/vertexindex(at:).md)
- [vertices(in:center:orientation:)](realitykit/clothmeshresource/vertices(in:center:orientation:).md)
