Skip to content

Search

Documentation

geometry3d

Mesh operations: hulls, convex decomposition, voxelisation, cutting and boolean intersection, on a Mesh that load_mesh reads from an asset or a script…

On this page

Mesh operations: hulls, convex decomposition, voxelisation, cutting and boolean intersection, on a Mesh that load_mesh reads from an asset or a script builds.

7 functions, 0 constants. Scripts reach it as geometry3d::.

Functions

Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.

function acts on what it does
convex_decomposition(geometry3d::Mesh, geometry3d::DecompositionOptions?) -> [geometry3d::Mesh] — The mesh cut into convex pieces, each one a mesh: the only way to collide a concave shape dynamically.
convex_hull(geometry3d::Mesh) -> geometry3d::Mesh — The tightest convex shape containing every point: what a dynamic collider wants when the model is concave.
intersect(geometry3d::Mesh, geometry3d::Mesh) -> geometry3d::Mesh? — The mesh both meshes have in common, or nothing when they do not overlap.
load_mesh(string) -> geometry3d::Mesh — A mesh asset's points and triangles.
pieces(geometry3d::Mesh) -> [geometry3d::Mesh] — The mesh's separate parts, one mesh each: what a model that was already broken is made of.
split(geometry3d::Mesh, geometry3d::Plane) -> [geometry3d::Mesh?] — Cut the mesh with a plane, returning the two halves, nil for a half with nothing in it.
voxelize(geometry3d::Mesh, geometry3d::VoxelizeOptions?) -> geometry3d::Voxels — The mesh as a voxel grid (size and cells, ready to be a voxels asset) so a model can become destructible terrain.

Are you sure?