<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNGeometryElement",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNGeometryElement"
  },
  "title" : "SCNGeometryElement"
}
-->

# SCNGeometryElement

A container for index data describing how vertices connect to define a three-dimensional object, or geometry.

```
class SCNGeometryElement
```

## Overview

You use geometry elements together with [`SCNGeometrySource`](/documentation/SceneKit/SCNGeometrySource) objects to define custom [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) objects or to inspect the data that composes an existing geometry. You create a custom geometry using a three-step process:

1. Create one or more [`SCNGeometrySource`](/documentation/SceneKit/SCNGeometrySource) objects, each of which defines per-vertex information such as position, surface normal, or texture coordinates for all vertices in the geometry.
2. Create at least one [`SCNGeometryElement`](/documentation/SceneKit/SCNGeometryElement) object, containing an array of indices identifying vertices in the geometry sources and describing the drawing primitive that SceneKit uses to connect the vertices when rendering the geometry.
3. Create an [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) instance from the geometry sources and geometry elements.

When SceneKit renders a geometry, each geometry element corresponds to a drawing command sent to the GPU. Because different rendering states require separate drawing commands, you can define a geometry using multiple geometry elements. For example, the teapot geometry shown below has four geometry elements, so you can assign up to four [`SCNMaterial`](/documentation/SceneKit/SCNMaterial) objects in order to render each element with a different appearance. But because each drawing command incurs a CPU time overhead when rendering, minimizing the number of elements in a custom geometry can improve rendering performance.

![](images/com.apple.scenekit/media-2929778@2x.png)

## Topics

### Creating a Geometry Element

[`init(indices:primitiveType:)`](/documentation/SceneKit/SCNGeometryElement/init(indices:primitiveType:))

Creates a geometry element from the specified array of index values.

[`+  geometryElementWithData:primitiveType:primitiveCount:bytesPerIndex:`](/documentation/SceneKit/SCNGeometryElement/init(data:primitiveType:primitiveCount:bytesPerIndex:))

Creates a geometry element from the specified data and options.

[`+  geometryElementWithMDLSubmesh:`](/documentation/SceneKit/SCNGeometryElement/geometryElementWithMDLSubmesh:)

Creates a geometry element from the specified Model I/O submesh object.

### Working with Indexes

[`data`](/documentation/SceneKit/SCNGeometryElement/data)

The data describing the geometry element.

[`bytesPerIndex`](/documentation/SceneKit/SCNGeometryElement/bytesPerIndex)

The number of bytes that represent each index value in the element’s data.

[`primitiveType`](/documentation/SceneKit/SCNGeometryElement/primitiveType)

The drawing primitive that connects vertices when rendering the geometry element.

[`SCNGeometryPrimitiveType`](/documentation/SceneKit/SCNGeometryPrimitiveType)

The drawing primitive that connects vertices when rendering a geometry element, used by the [`primitiveType`](/documentation/SceneKit/SCNGeometryElement/primitiveType) property to specify how SceneKit interprets the geometry element’s data.

[`primitiveCount`](/documentation/SceneKit/SCNGeometryElement/primitiveCount)

The number of primitives in the element.

[`primitiveRange`](/documentation/SceneKit/SCNGeometryElement/primitiveRange)

The range of primitives from the geometry element to render.

### Rendering Point Clouds

Use these properties to display a geometry as a collection of points, rather than as a solid surface or wireframe.

[`pointSize`](/documentation/SceneKit/SCNGeometryElement/pointSize)

The width of each point in the geometry element, as measured in the geometry’s local 3D coordinate space.

[`minimumPointScreenSpaceRadius`](/documentation/SceneKit/SCNGeometryElement/minimumPointScreenSpaceRadius)

The smallest radius, measured in screen points, at which to render any point in the geometry element.

[`maximumPointScreenSpaceRadius`](/documentation/SceneKit/SCNGeometryElement/maximumPointScreenSpaceRadius)

The largest radius, measured in screen points, at which to render any point in the geometry element.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### 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)