// generated by diplomat-tool import type { NucleationError } from "./NucleationError.mjs" import type { Palette } from "./Palette.mjs" import type { Schematic } from "./Schematic.mjs" import type { Shape } from "./Shape.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Namespace for the mesh-voxelization entry points (GLB/OBJ → shapes * and textured schematics). */ export class Voxelizer { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Load a binary glTF (`.glb`, embedded buffers/images) and voxelize * it into a fillable Shape: the model is uniformly scaled so its * largest dimension equals `target_size` voxels, centered on x/z * with its base resting at y = 0. Solidity is a parity test at each * voxel center (robust on closed meshes), plus — when `shell` > 0 — * every voxel whose center is within `shell` blocks of the surface, * which rescues thin walls and hollow vessels (0.7–1.0 closes * single-voxel shells; 0 = pure parity; a *negative* `shell` is * surface-only — a skin |shell| blocks thick with no interior fill, * for open sheets/ribbons that dip or self-overlap). Errors with `Parse` on * malformed/triangle-less GLB and `InvalidArgument` on a * non-positive `target_size`. */ static shapeFromGlb(data: Array, targetSize: number, shell: number): Shape; /** * Load a Wavefront OBJ (`v`/`vt`/`f` lines; polygon faces are * fan-triangulated, negative indices supported, materials ignored) * and voxelize it into a fillable Shape, fitted and shelled exactly * like `shape_from_glb`. Errors with `Parse` on malformed/triangle-less * OBJ and `InvalidArgument` on invalid UTF-8 or a non-positive * `target_size`. */ static shapeFromObj(text: string, targetSize: number, shell: number): Shape; /** * Load a binary glTF and voxelize it directly into a textured * schematic named `name`: every solid voxel becomes the `palette` * block closest to its nearest-surface texture color (interior * voxels inherit the nearest surface color; voxels without texture * info snap to mid-gray). `shell` behaves as in `shape_from_glb` — * use ~0.7 for thin-walled models. Errors with `Parse` on malformed GLB and * `InvalidArgument` on invalid UTF-8 or a non-positive * `target_size`. */ static schematicFromGlbTextured(data: Array, targetSize: number, shell: number, palette: Palette, name: string): Schematic; }