@playcanvas/splat-transform
Version:
Library and CLI tool for 3D Gaussian splat format conversion and transformation
19 lines (18 loc) • 852 B
TypeScript
import type { Bounds } from '../data-table';
import type { Mesh } from './marching-cubes';
import { SparseVoxelGrid } from '../voxel/sparse-voxel-grid';
/**
* Extract a watertight voxel-boundary mesh from a SparseVoxelGrid.
*
* Exposed voxel faces are first greedily merged into axis-aligned rectangles.
* Rectangle boundaries are then split at every collinear rectangle corner
* before triangulation, so adjacent rectangles share matching edges instead
* of producing T-junctions.
*
* @param grid - Voxel grid after filtering / nav phases.
* @param gridBounds - Grid bounds aligned to block boundaries.
* @param voxelResolution - Size of each voxel in world units.
* @returns Mesh with positions and indices.
*/
declare const voxelFaces: (grid: SparseVoxelGrid, gridBounds: Bounds, voxelResolution: number) => Mesh;
export { voxelFaces };