Selector math for the per-frame LOD-group selector.
The camera-geometry half of lod-group-registry.ts, extracted so the
registry file holds the policy/state machine and this module holds the
(individually unit-testable) math:
computeEntryWorldBox — fold a group's per-child nD raw or robust
bounds into one world-space box via displayDims + matrixWorld.
projectBoxDiagonalPx — project that box through the camera to a
screen-space pixel diagonal (with near-plane saturation). The legacy
selector: 'coverage' metric.
projectBoxAreaFraction — project that box to the fraction of the
viewport AREA its screen-space rect covers (same near-plane saturation).
The selector: 'screen-area' metric.
pickChildWithHysteresis — pick the level for whichever metric the
group's selector names, with asymmetric downgrade hysteresis.
The registry re-exports projectBoxAreaFraction / projectBoxDiagonalPx /
pickChildWithHysteresis so existing importers (the selector unit tests)
are unchanged.
Selector math for the per-frame LOD-group selector.
The camera-geometry half of
lod-group-registry.ts, extracted so the registry file holds the policy/state machine and this module holds the (individually unit-testable) math:displayDims+matrixWorld.selector: 'coverage'metric.selector: 'screen-area'metric.selectornames, with asymmetric downgrade hysteresis.The registry re-exports
projectBoxAreaFraction/projectBoxDiagonalPx/pickChildWithHysteresisso existing importers (the selector unit tests) are unchanged.