/** * Line of sight over the ground (phase 3E): given heights along a path, is the far end visible from the near end? * Pure maths — the ground heights come from an ElevationProvider or the renderer's terrain. * * The Earth's curvature raises the ground between the two ends by d·(D−d)/(2·R′), with R′ the effective radius * under standard atmospheric refraction (k = 0.13), so long sight lines are judged as a surveyor would. */ import type { Position } from '../core/types.js'; /** `count` points from `from` to `to` (both ends included), evenly spaced. Fine for the ranges sight is judged over. */ export declare function pathSamples(from: Position, to: Position, count: number): Position[]; export interface SightProfilePoint { position: Position; /** Ground height (metres above sea level); null where unknown. */ ground: number | null; /** Height of the sight line there. */ sight: number; /** Extra ground height from the Earth's curvature there. */ bulge: number; } export interface SightResult { visible: boolean; /** The first place the ground rises above the sight line. */ blockedAt?: Position; /** The smallest gap between the sight line and the (curved) ground; negative when blocked. */ clearanceMeters: number; distanceMeters: number; /** Samples whose ground height was unknown (they cannot block, so the answer may be optimistic). */ unknownSamples: number; profile: SightProfilePoint[]; } /** * Judges a sight line. `fromHeight` and `toHeight` are the two ends' heights above sea level; `ground` holds the * ground height at each of `samples` (from `pathSamples`). The two end samples never block (they are the ends). */ export declare function judgeSight(samples: Position[], ground: Array, fromHeight: number, toHeight: number, refraction?: number): SightResult;