import type { CityWaterSurface } from '../../source'; /** Cells whose smoothed level lies within this many metres of the band's lowest are one surface. */ export declare const WATER_BAND_M = 1.5; /** A rectangle may take bank cells this many cells out from the water of its band (the terrain hides the plane there). */ export declare const WATER_BANK_REACH_CELLS = 8; /** * A bank cell's centre must stand at least this far above the surface (negative: may stand this far below it) for a rectangle to cover it. A cell is * 7 m across, so on a steep bank its centre is the fair test (the lowest point of its footprint sits metres under the water on any slope); the * 0.2 m allowance wets a shelving shore by at most a few metres where the rectangle's edge falls between two cells. */ export declare const WATER_BANK_CLEAR_M = -0.2; /** Open-sea cells within this many metres of the datum belong to the scene's sea volume, not to a surface of their own. */ export declare const SEA_TOLERANCE_M = 0.75; /** A band of fewer cells than this is level noise at a shore (3 x 3 median of the level already applied), unless the whole body is that small. */ export declare const WATER_MIN_BAND_CELLS = 6; /** A surface box reaches this far below its level at least, and the body's deepest cell plus `WATER_FLOOR_SLACK_M` at most `WATER_FLOOR_MAX_M`. */ export declare const WATER_FLOOR_MIN_M = 4; export declare const WATER_FLOOR_SLACK_M = 2; export declare const WATER_FLOOR_MAX_M = 60; export interface WaterSurfaceTuning { bandM: number; bankReachCells: number; bankClearM: number; minBandCells: number; } export declare const DEFAULT_WATER_TUNING: WaterSurfaceTuning; export interface WaterSurfaceInput { tuning?: Partial; /** Field grid size. */ width: number; height: number; /** Flat indices `j * width + i` of the body's wet cells. */ cells: readonly number[]; /** Depth below the surface, metres, of a flat cell index. */ depth: (k: number) => number; /** Ground height (scene Y) at the cell's centre, and the lowest ground over the cell's footprint. */ groundCentre: (i: number, j: number) => number; groundMin: (i: number, j: number) => number; /** World plan box `[minX, minZ, maxX, maxZ]` of the cell rectangle `i0..i1`, `j0..j1` (inclusive). */ cellBox: (i0: number, j0: number, i1: number, j1: number) => [number, number, number, number]; /** Skip the cells at or below this level (the open sea: `SEA_TOLERANCE_M`). */ skipAtOrBelowM?: number; } /** The surfaces of one body, biggest first. */ export declare function buildWaterSurfaces(input: WaterSurfaceInput): CityWaterSurface[];