ScreenSpaceError

Screen-space-error computation per the 3D Tiles 1.0 specification. SSE is the projected size in pixels of a tile's geometricError meters at cameraDistance. A traversal step descends when SSE > target; otherwise it renders the current LOD.

Formula: sse = (geometricError * viewportHeight) / (cameraDistance * 2 * tan(fov / 2))

Pulled into its own object both so traversal code reads more linearly and so it can be unit-tested in commonTest without a full RenderContext.

Functions

Link copied to clipboard
fun compute(rc: RenderContext, geometricError: Double, cameraDistance: Double): Double

Convenience overload reading viewport + FOV directly from rc.

fun compute(geometricError: Double, cameraDistance: Double, viewportHeightPixels: Double, verticalFovRadians: Double): Double
Link copied to clipboard

Focal length in pixels — viewportHeight / (2·tan(fov / 2)) — the projection scale that keeps a world-space point/splat radius mapping to a constant on-screen size with distance. Shares the same 2·tan(fov / 2) denominator as compute. Falls back to 1 for a degenerate (non-finite or non-positive) viewport / FOV so callers never divide by zero.