Skip to main content

Mesh

Inherits: Resource < RefCounted < Object

Description

A Resource that contains vertex array-based geometry. Mesh is divided in surfaces, each containing a separate array and material.

Methods

get_surface_count

Returns the number of surfaces that the Mesh holds.

surface_get_material

Returns a Material in a given surface.
int
The surface index

surface_set_material

Sets a Material for a given surface.

get_aabb

Returns the smallest AABB enclosing this mesh in local space.

create_trimesh_shape

Calculate a ConcavePolygonShape3D from the mesh.

Example Usage