import { BlockMaskBuffer } from './block-mask-buffer';
import type { NavSimplifyResult } from './fill-exterior';
import type { Bounds } from '../data-table';
/**
 * Floor-fill via XZ dilate -> per-column upward walk -> XZ dilate -> OR.
 *
 * Mirrors the shape of `fillExterior` (dilate -> traverse -> dilate -> OR) but
 * the traversal is a per-(lx, lz) upward walk through empty space instead of a
 * 3D boundary BFS, and the dilations operate only in X and Z.
 *
 * Steps with `r = ceil(dilation / voxelResolution)`:
 *   1. `S_xz = sparseDilate3(S, r, 0)` closes any XZ holes in horizontal
 *      surfaces smaller than `2 * r`.
 *   2. For every (lx, lz), walk `y = 0` upward through `S_xz`. Mark each
 *      visited empty voxel into `foundEmpty`. Stop on the first solid voxel
 *      of `S_xz` or at the grid top.
 *   3. `dilatedFound = sparseDilate3(foundEmpty, r, 0)` spreads the found
 *      under-surface volume back out in XZ to cover the kernel halo.
 *   4. `output = S | dilatedFound` adds the dilated under-surface region as
 *      solid on top of the original solids.
 *
 * Intended to run before `carve`: it seals the under-side of the floor
 * (and patches small XZ holes via the dilation), and the carve handles the
 * remaining hole plugging via its 3D dilate + capsule BFS.
 *
 * With `r = 0` the dilations are skipped and the algorithm degrades to
 * "fill the under-side of every column up to the first solid", matching the
 * original (pre-dilation) `fillFloor` behavior.
 *
 * @param buffer - Voxelized scene data.
 * @param gridBounds - Axis-aligned bounds of the voxel grid.
 * @param voxelResolution - Size of each voxel in world units.
 * @param dilation - XZ dilation radius in world units. 0 disables dilation.
 * @returns Modified buffer with under-surface regions filled.
 */
declare const fillFloor: (buffer: BlockMaskBuffer, gridBounds: Bounds, voxelResolution: number, dilation?: number) => NavSimplifyResult;
export { fillFloor };
