/** * A lazily built uniform spatial grid over splat centers, for the CPU spatial * queries `SplatMesh` exposes (M9). Pure array math - no THREE, no GPU - over * the pool's CPU-side centers, so it is cheap to build and to test. * * The grid indexes a set of *pool indices* into a shared centers array (the * pool's `backing.centers`, RGBA-strided: splat `p`'s center is * `centers[p*4 + 0..2]`). Only the indices handed in are indexed, so a static * mesh grids its whole scene and a streamed mesh grids exactly its resident * splats. Everything is in the mesh's **local** space; the caller converts * world queries in and results out. */ export declare class UniformGrid { /** Populated-region minimum corner (local space). */ private readonly min; /** Per-axis cell size (local units). */ private readonly cellSize; /** Per-axis cell counts. */ private readonly dims; /** CSR cell offsets: cell c owns `items[start[c] .. start[c+1])`. */ private readonly cellStart; /** Pool indices, bucketed by cell. */ private readonly items; /** Pool centers array this grid points into (RGBA stride 4). */ private readonly centers; readonly count: number; /** * @param centers - The pool's CPU centers (stride 4: x,y,z,_ per splat). * @param poolIndices - The pool indices to index (e.g. the active list). * @param count - How many entries of `poolIndices` are valid. */ constructor(centers: Float32Array, poolIndices: Uint32Array, count: number); /** The cell index of pool splat `p`, clamped into range. */ private cellOf; private axisCell; /** * Visits every indexed splat within `radius` (local units) of the local * point, calling `visit(poolIndex, distanceSq)`. Cells are pruned by their * axis span and each candidate is distance-filtered here, so the callback * only ever sees splats truly within the radius. */ forEachWithin(x: number, y: number, z: number, radius: number, visit: (poolIndex: number, distanceSq: number) => void): void; /** * The nearest indexed splat to the local point within `radius`, or null. * Returns its pool index and squared local distance. */ nearest(x: number, y: number, z: number, radius: number): { poolIndex: number; distSq: number; } | null; }