import { type ClipStats } from './fragments'; import { type Bounds, type Vec3 } from './math'; import type { SplitCell, SplitItem } from './types'; /** Something the splitter keeps whole and only has to home: a retained Scene node. */ export type Homeable = { id: string; bounds: Bounds; }; export type CellPlan = { cells: SplitCell[]; /** Retained nodes by owning cell id. */ homed: Map; splitItems: number; wholeItems: number; clip: ClipStats; }; export declare function cellSlug(cx: number, cz: number): string; /** * Assigns every item to the fixed grid. * * - A node no wider than a cell is owned WHOLE by the cell containing its * centre (the design rule: a feature belongs to the cell holding its * centroid). It keeps its name, its mesh and its instancing. * - A wider node (a building shell, a long floor) is clipped against the grid * so each cell holds exactly the surface that lies in it. * - The spawn core is every cell within `coreRadiusM` of the spawn, and any * whole node that touches that disc joins the core even when its centre * lies outside it, so nothing the player can touch at arrival is missing. */ export declare function planCells(input: { items: readonly SplitItem[]; homeable: readonly Homeable[]; cellSizeM: number; spawn: Vec3; coreRadiusM: number; }): CellPlan; export declare function unionOfCells(cells: readonly SplitCell[]): Bounds;