Skip to main content

tessellate

Function tessellate 

Source
pub fn tessellate(geometry: &Geometry) -> Result<Mesh, Diagnostic>
Expand description

Tessellates a built-in geometry using fixed deterministic resolution.

The returned mesh owns newly allocated vertex and index buffers. It neither reads assets nor calls a renderer.

§Errors

Returns an error for invalid dimensions, a group, or an adapter-owned mesh asset that this core intentionally cannot resolve.

use konjure_sdk::{tessellate, Geometry};
let mesh = tessellate(&Geometry::Sphere { radius_m: 0.5 })?;
assert_eq!(mesh.positions.len(), mesh.normals.len());