import * as THREE from 'three/webgpu'; import type { SplatSortMetric } from './splat-mesh-types'; /** Inclusive ordering-key range used by the quantized sort implementations. */ export interface SplatSortRange { min: number; max: number; } /** * The greatest view-space depth displacement of a local bounding sphere. * * View depth is the dot product of the local point and row 2 of `modelView`. * A sphere with radius `r` therefore spans exactly `r · ||row2.xyz||` either * side of its transformed center. Unlike a maximum-axis-scale estimate, this * remains correct when a non-uniformly scaled ancestor and a rotated child * compose into a shear. */ export declare function viewDepthRadius(modelView: THREE.Matrix4, radius: number): number; /** * A conservative camera-space radius for radial-distance quantization. * * Uses `sqrt(||A^T A||∞)`, an upper bound on the linear part's largest * singular value. Unlike `Matrix4.getMaxScaleOnAxis()`, it cannot under-bound * a sphere when a transformed hierarchy introduces shear. */ export declare function viewRadialRadius(modelView: THREE.Matrix4, radius: number): number; /** Returns the conservative scene-bound range for a selected ordering key. */ export declare function sceneSortRange(modelView: THREE.Matrix4, bounds: THREE.Sphere, sortMetric: SplatSortMetric, viewCenter?: THREE.Vector3): SplatSortRange; /** * Returns the ordering-key range which can contain a drawn splat center. * * An invalid/infinite far plane deliberately returns `null`: callers retain * their scene-bound range rather than turning an unbounded frustum into a * collapsed quantization range. */ export declare function cameraVisibleSortRange(camera: THREE.Camera, sortMetric: SplatSortMetric, viewport?: THREE.Vector2): SplatSortRange | null; /** * Narrows a scene range to the finite camera draw range. An empty overlap * retains the scene range: that frame has no drawable centers, but the sorter * must still receive an ordered, non-collapsed interval for its live inputs. */ export declare function intersectSortRange(scene: SplatSortRange, visible: SplatSortRange | null | undefined): SplatSortRange; /** * Builds the pose signature relevant to radial sorting. * * World-space distance depends on the mesh's linear transform and its * translation relative to the camera, but not on camera orientation. The * scheduler compares this matrix so rotating in place does not dispatch an * identical radial sort. */ export declare function radialSortState(meshWorld: THREE.Matrix4, cameraWorld: THREE.Matrix4, out: THREE.Matrix4): THREE.Matrix4;