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 a box through its box-to-clip
matrix to a screen-space pixel diagonal (with near-plane saturation). The legacy
selector: 'coverage' metric.
projectBoxAreaFraction — project the box's inscribed ellipsoid,
sized by the ellipsoid's view-axis depth, to the viewport AREA its
screen-space ellipse covers, in rect units (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.