---
title: SCNGeometryElement
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scngeometryelement
---

# SCNGeometryElement

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

## Declaration

```swift
class SCNGeometryElement
```

## Overview

Overview You use geometry elements together with SCNGeometrySource objects to define custom SCNGeometry objects or to inspect the data that composes an existing geometry. You create a custom geometry using a three-step process: Create one or more SCNGeometrySource objects, each of which defines per-vertex information such as position, surface normal, or texture coordinates for all vertices in the geometry. Create at least one 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. Create an 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 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.

## Topics

### Creating a Geometry Element

- [init(indices:primitiveType:)](scenekit/scngeometryelement/init(indices:primitivetype:).md)
- [init(data:primitiveType:primitiveCount:bytesPerIndex:)](scenekit/scngeometryelement/init(data:primitivetype:primitivecount:bytesperindex:).md)

### Working with Indexes

- [data](scenekit/scngeometryelement/data.md)
- [bytesPerIndex](scenekit/scngeometryelement/bytesperindex.md)
- [primitiveType](scenekit/scngeometryelement/primitivetype.md)
- [SCNGeometryPrimitiveType](scenekit/scngeometryprimitivetype.md)
- [primitiveCount](scenekit/scngeometryelement/primitivecount.md)
- [primitiveRange](scenekit/scngeometryelement/primitiverange.md)

### Rendering Point Clouds

- [pointSize](scenekit/scngeometryelement/pointsize.md)
- [minimumPointScreenSpaceRadius](scenekit/scngeometryelement/minimumpointscreenspaceradius.md)
- [maximumPointScreenSpaceRadius](scenekit/scngeometryelement/maximumpointscreenspaceradius.md)

### Initializers

- [init(buffer:primitiveType:primitiveCount:bytesPerIndex:)](scenekit/scngeometryelement/init(buffer:primitivetype:primitivecount:bytesperindex:).md)
- [init(buffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:)](scenekit/scngeometryelement/init(buffer:primitivetype:primitivecount:indiceschannelcount:interleavedindiceschannels:bytesperindex:).md)
- [init(coder:)](scenekit/scngeometryelement/init(coder:).md)
- [init(data:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:)](scenekit/scngeometryelement/init(data:primitivetype:primitivecount:indiceschannelcount:interleavedindiceschannels:bytesperindex:).md)

### Instance Properties

- [hasInterleavedIndicesChannels](scenekit/scngeometryelement/hasinterleavedindiceschannels.md)
- [indicesChannelCount](scenekit/scngeometryelement/indiceschannelcount.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Geometry

- [SCNGeometry](scenekit/scngeometry.md)
- [SCNGeometrySource](scenekit/scngeometrysource.md)
- [Built-in Geometry Types](scenekit/built-in-geometry-types.md)
