---
title: "generateConvex(from:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/shaperesource/generateconvex(from:)-6q0wj"
---

# generateConvex(from:)

Creates a convex shape from the given points.

## Declaration

```swift
@MainActor @preconcurrency static func generateConvex(from points: [SIMD3<Float>]) -> ShapeResource
```

## Parameters

- `points`: An array of 3D points that define the convex polyhedron. Keep the number of points small to avoid hurting performance.

## Return Value

Return Value The new shape.

## See Also

### Generating convex shapes

- [generateConvex(from:)](realitykit/shaperesource/generateconvex(from:)-53jm9.md)
