import { type IGaussianSplattingStreamSourceRange } from "./gaussianSplattingStream.js"; /** * A LOD entry referencing an interval of a source file. Structurally an ISOGLODEntry. * @internal */ export interface ISplatResidencyEntry { /** Index of the source file. */ file: number; /** First splat of the interval inside the source file. */ offset: number; /** Number of splats in the interval. */ count: number; } /** * One resident allocation unit carved from a source file. * @internal */ export interface ISplatResidencyPage { /** Allocation ID, never lower than the number of source files. */ id: number; /** Merged source interval covered by the page. */ source: Readonly; /** LOD entries (by reference) that fall inside the source interval. */ entries: ISplatResidencyEntry[]; } /** * Result of {@link BuildSplatResidencyPages}. * @internal */ export interface ISplatResidencyPagesResult { /** Pages to publish. */ pages: ISplatResidencyPage[]; /** Source files left whole because at least one of their entries was invalid. */ invalidFiles: number[]; } /** * Groups overlapping intervals, but not adjacent ones, into independently resident pages. * Does not mutate entries; callers publish the mapping once the pages are returned. * Pinned source files remain whole so the permanent fallback cannot be partially evicted. * A source file with no known size, or with at least one invalid interval, produces no pages and stays whole. * @param entries LOD entries referenced by leaves * @param counts splat count of every source file whose metadata is available * @param pinned source files that must stay whole * @param sourceFileCount number of source files; valid source IDs are in [0, sourceFileCount) * @param firstId first unused allocation ID, at least sourceFileCount * @returns the pages plus the source files left whole because of invalid intervals * @internal */ export declare function BuildSplatResidencyPages(entries: readonly ISplatResidencyEntry[], counts: ReadonlyMap, pinned: ReadonlySet, sourceFileCount: number, firstId: number): ISplatResidencyPagesResult;