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

# ARGeometryElement

A container for index data, such as vertex indices of a face.

```
class ARGeometryElement
```

## Overview

[`ARMeshGeometry`](/documentation/ARKit/ARMeshGeometry) uses geometry-elements to store face data (see [`faces`](/documentation/ARKit/ARMeshGeometry/faces)). Each face is defined by the primitive type, for example, [`ARGeometryPrimitiveType.triangle`](/documentation/ARKit/ARGeometryPrimitiveType/triangle).

To demonstrate, an [`ARMeshGeometry`](/documentation/ARKit/ARMeshGeometry) instance with two triangle-type faces results in the following configuration:

- `faces` [`count`](/documentation/ARKit/ARGeometryElement/count) `= 2`
- `faces` [`indexCountPerPrimitive`](/documentation/ARKit/ARGeometryElement/indexCountPerPrimitive) `= 3` (because [`primitiveType`](/documentation/ARKit/ARGeometryElement/primitiveType) is [`ARGeometryPrimitiveType.triangle`](/documentation/ARKit/ARGeometryPrimitiveType/triangle))
- `faces` [`bytesPerIndex`](/documentation/ARKit/ARGeometryElement/bytesPerIndex) `= 4` (because vertex indices are the type <doc://com.apple.documentation/documentation/Swift/UInt32>)
- The buffer’s total size in bytes `=` [`count`](/documentation/ARKit/ARGeometryElement/count) `*` [`indexCountPerPrimitive`](/documentation/ARKit/ARGeometryElement/indexCountPerPrimitive) `*` [`bytesPerIndex`](/documentation/ARKit/ARGeometryElement/bytesPerIndex) (which in this case, is `2 * 3 * 4 = 24` bytes)

## Topics

### Accessing Index Data

[`subscript(_:)`](/documentation/ARKit/ARGeometryElement/subscript(_:))

Provides an array of vertex indices that respresents the geometric primitive at the subscripted index.

[`buffer`](/documentation/ARKit/ARGeometryElement/buffer)

A Metal buffer containing primitive data.

### Getting Index Information

[`bytesPerIndex`](/documentation/ARKit/ARGeometryElement/bytesPerIndex)

The number of bytes for each index.

[`count`](/documentation/ARKit/ARGeometryElement/count)

The number of primitives in the buffer.

[`indexCountPerPrimitive`](/documentation/ARKit/ARGeometryElement/indexCountPerPrimitive)

The number of indices for each primitive.

[`primitiveType`](/documentation/ARKit/ARGeometryElement/primitiveType)

The geometry’s type of data (triangle, or line).

[`ARGeometryPrimitiveType`](/documentation/ARKit/ARGeometryPrimitiveType)

The kind of connection between vertices.

## Relationships

### Conforms To

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

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

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

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

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

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

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)