<!--
{
  "availability" : [
    "iOS: 13.4.0 -",
    "iPadOS: 13.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARMeshGeometry/faces",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ARMeshGeometry(py)faces"
  },
  "title" : "faces"
}
-->

# faces

An object that contains a buffer of vertex indices of the geometry’s faces.

```
var faces: ARGeometryElement { get }
```

## Discussion

Each element of the buffer-based array is a three-index combination that forms a unique triangle, or *face*. The index refers to that vertex’s position in the [`vertices`](/documentation/ARKit/ARMeshGeometry/vertices) array. The [`count`](/documentation/ARKit/ARGeometryElement/count) of this property represents the number of faces.

The following code demonstrates getting the vertices of a particular face:

```swift
extension ARMeshGeometry {
    func vertexIndicesOf(faceWithIndex index: Int) -> [Int] {
        let indicesPerFace = faces.indexCountPerPrimitive
        let facesPointer = faces.buffer.contents()
        var vertexIndices = [Int]()
        for offset in 0..<indicesPerFace {
            let vertexIndexAddress = facesPointer.advanced(by: (index * indicesPerFace + offset) * MemoryLayout<UInt32>.size)
            vertexIndices.append(Int(vertexIndexAddress.assumingMemoryBound(to: UInt32.self).pointee))
        }
        return vertexIndices
    }
}
```

---

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)