<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation14MeshDescriptorV"
  },
  "title" : "MeshDescriptor"
}
-->

# MeshDescriptor

Defines a 3D mesh’s structure and data.

```
struct MeshDescriptor
```

## Overview

Create or modify 3D shapes in a RealityKit scene using `MeshDescriptor`,
which provides properties and methods to define the vertices,
normals, texture coordinates, and other attributes of the mesh.

Apply the mesh to an [`Entity`](/documentation/RealityKit/Entity) by creating a [`MeshResource`](/documentation/RealityKit/MeshResource) with `MeshResource/generate(from:)-6l1q2`, and create a [`ModelComponent`](/documentation/RealityKit/ModelComponent) with [`init(mesh:materials:)`](/documentation/RealityKit/ModelComponent/init(mesh:materials:)).

Start by creating a basic triangle with a `MeshDescriptor` instance.

```swift
var descriptor = MeshDescriptor(name: "triangle")
descriptor.positions = MeshBuffers.Positions([
    [-1, -1, 0], [1, -1, 0], [0, 1, 0]
])
descriptor.primitives = .triangles([0, 1, 2])
```

## Relationships

### Conforms To

[`MeshBufferContainer`](/documentation/RealityKit/MeshBufferContainer)

---

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)