export type VisionPoint = readonly [number, number]; /** Structurally matches `world/walls` `WallSegment` — pass those straight in as occluders. */ export interface VisionWall { from: VisionPoint; to: VisionPoint; } export interface VisionConeConfig { range: number; /** Full cone opening angle in radians (matches `TelegraphShape`'s cone `angle`). */ angle: number; } /** 2D segment intersection on the XZ plane (collinear overlaps count) — the LoS building block `revealQuery`/`frustumSensor` never shipped (#286.5). * @internal */ export declare function segmentsIntersect(a1: VisionPoint, a2: VisionPoint, b1: VisionPoint, b2: VisionPoint): boolean; /** True when no wall segment crosses the sight line. * @internal */ export declare function hasWallLineOfSight(from: VisionPoint, to: VisionPoint, walls: readonly VisionWall[]): boolean; /** Angle + range test only — no occlusion. `heading` is engine yaw (radians, `atan2(dx, dz)`). * @internal */ export declare function pointInCone(origin: VisionPoint, heading: number, config: VisionConeConfig, point: VisionPoint): boolean; export interface VisionTarget { id: TId; at: VisionPoint; } /** * The guard-sight primitive every stealth game hand-rolled: an angle+range cone on the XZ plane * whose sight lines are blocked by 2D wall segments (`world/walls` segments fit structurally). * Pure math — feed entity positions and heading each tick. */ export interface VisionCone { canSee(origin: VisionPoint, heading: number, target: VisionPoint): boolean; visibleTargets(origin: VisionPoint, heading: number, targets: readonly VisionTarget[]): TId[]; } /** @internal */ export declare function createVisionCone(config: VisionConeConfig, walls?: readonly VisionWall[]): VisionCone;