/** * LOD1 index simplification (issue #1682, phase 5). * * Vertex-clustering decimation in the style of meshoptimizer's "sloppy" * simplifier, over the batch's EXISTING interleaved vertex buffer: vertices * are snapped to a uniform grid, each occupied cell elects its first vertex * as representative, and a triangle survives only when its three corners * land in three DISTINCT cells. The output is just another index buffer over * the same vertices — LOD costs index bytes only, no second vertex buffer, * and the per-vertex entityId lane (picking id + colour salt) rides along * with the representative vertex. * * Works on ifc-lite's unwelded flat-shaded soup because clustering keys on * POSITION, not index topology: coincident duplicated vertices land in the * same cell and collapse together. Representative normals are "whichever * face got there first" — visually fine at the sub-`thresholdPx` projected * sizes LOD1 is drawn at, and the no-weld invariant (#846) is untouched * because the full-detail LOD0 geometry is never modified. */ /** Below this many source triangles a batch keeps LOD0 only. */ export declare const LOD_MIN_TRIANGLES = 500; /** Grid cell edge as a fraction of the batch AABB diagonal (error budget). */ export declare const LOD_CELL_FRACTION = 0.02; /** * Cluster-simplify `indices` over interleaved vertex data. * * @param vertexData interleaved records, `strideFloats` floats per vertex, * position at float offset 0..2 (the batch layout: 7 floats = 28 bytes) * @param cellSize world-space grid edge; non-positive returns null * @returns the LOD1 index buffer, or null when simplification does not pay * (too few source triangles, or the result is not meaningfully smaller) */ export declare function simplifyIndicesByClustering(vertexData: Float32Array, strideFloats: number, indices: Uint32Array, cellSize: number): Uint32Array | null; /** Cell size for a batch from its world AABB (diagonal * LOD_CELL_FRACTION). */ export declare function lodCellSizeForBounds(min: readonly [number, number, number], max: readonly [number, number, number]): number; //# sourceMappingURL=lod-simplify.d.ts.map