Class

MeshResource

A high-level representation of a collection of vertices and edges that define a shape.

Declaration

class MeshResource

Topics

Getting Material Count

var expectedMaterialCount: Int

The number of material entries required to render the mesh resource.

Getting a Bounding Box

var bounds: BoundingBox

A box that bounds the mesh.

struct BoundingBox

An axis-aligned bounding box.

Creating a Box

Creating a Plane

static func generatePlane(width: Float, height: Float, cornerRadius: Float) -> MeshResource

Creates a new rectangle mesh with the specified dimensions in the entity’s XY-plane.

static func generatePlane(width: Float, depth: Float, cornerRadius: Float) -> MeshResource

Creates a new rectangle mesh with the specified dimensions in the entity’s XZ-plane.

Creating a Sphere

static func generateSphere(radius: Float) -> MeshResource

Creates a new sphere mesh with the specified radius.

Relationships

Conforms To

See Also

Specifying a Mesh

var mesh: MeshResource

The mesh that defines the shape of the entity.