Expand description
Bounded procedural meshes and pure mesh transforms. Bounded procedural triangle meshes and pure mesh transforms.
These helpers operate on owned crate::Mesh values. They deliberately do
not resolve assets or interact with a renderer, so the same mesh is usable by
native and WASM adapters.
Structs§
- Profile
Point - A radius and vertical position used by
lathe.
Constants§
- MAX_
PROCEDURAL_ INDICES - Largest number of triangle indices accepted by one procedural mesh.
- MAX_
PROCEDURAL_ VERTICES - Largest number of vertices accepted by one procedural mesh.
Functions§
- cone
- Creates a capped cone centered at the origin and aligned with Y.
- grid
- Creates an XZ grid centered at the origin with upward normals.
- lathe
- Revolves a radius-height profile around Y. The profile must contain at least two finite points with non-negative radii.
- parametric_
surface - Samples a pure parameterization over
[0, 1] × [0, 1]and derives smooth normals. - suzanne
- Loads the bundled CC0 Suzanne test mesh in metres with its original normals.
- torus_
mesh - Creates a torus around the Y axis with caller-selected ring and tube resolution.
- uv_
sphere - Creates a UV sphere centred at the origin with caller-selected resolution.
- validate_
mesh - Validates mesh buffer shape, finite coordinates, normals, and triangle indices.