UNPKG

@playcanvas/splat-transform

Version:

Library and CLI tool for 3D Gaussian splat format conversion and transformation

20 lines (19 loc) 1.02 kB
import { BlockMaskBuffer } from './block-mask-buffer'; /** * Remove isolated voxels and fill isolated empty voxels within mixed blocks. * * For each mixed block, computes 6 per-direction occupancy masks (in-block via * bit shifts + cross-block via adjacent block lookups), then: * - Remove: keeps only voxels with at least one occupied 6-connected neighbor * - Fill: fills empty voxels where all 6 neighbors are occupied * * Blocks that become empty or solid as a consequence are handled automatically. * * @param buffer - BlockMaskBuffer with voxelization results (linear-keyed). * @param nbx - Grid block dimension X (used to decode block indices). * @param nby - Grid block dimension Y (used to decode block indices). * @param nbz - Grid block dimension Z (used for neighbor bounds checks). * @returns New BlockMaskBuffer with filtered/filled data. */ declare function filterAndFillBlocks(buffer: BlockMaskBuffer, nbx: number, nby: number, nbz: number): BlockMaskBuffer; export { filterAndFillBlocks };