---
title: MeshDescriptor
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/meshdescriptor
---

# MeshDescriptor

Defines a 3D mesh’s structure and data.

## Declaration

```swift
struct MeshDescriptor
```

## Overview

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 by creating a MeshResource with MeshResource/generate(from:)-6l1q2, and create a ModelComponent with init(mesh:materials:). Start by creating a basic triangle with a MeshDescriptor instance. var descriptor = MeshDescriptor(name: "triangle") descriptor.positions = MeshBuffers.Positions([     [-1, -1, 0], [1, -1, 0], [0, 1, 0] ]) descriptor.primitives = .triangles([0, 1, 2])

## Topics

### Initializers

- [init(name:)](realitykit/meshdescriptor/init(name:).md)

### Instance Properties

- [materials](realitykit/meshdescriptor/materials-swift.property.md)
- [name](realitykit/meshdescriptor/name.md)
- [primitives](realitykit/meshdescriptor/primitives-swift.property.md)

### Enumerations

- [MeshDescriptor.Materials](realitykit/meshdescriptor/materials-swift.enum.md)
- [MeshDescriptor.Primitives](realitykit/meshdescriptor/primitives-swift.enum.md)

## Relationships

### Conforms To

- [MeshBufferContainer](realitykit/meshbuffercontainer.md)

## See Also

### Static meshes

- [MeshDescriptor.Primitives](realitykit/meshdescriptor/primitives-swift.enum.md)
- [MeshDescriptor.Materials](realitykit/meshdescriptor/materials-swift.enum.md)
