export type CorridorPoint = readonly [number, number]; export interface CorridorEdge { /** Centerline polyline in XZ; at least two points. */ points: readonly CorridorPoint[]; /** Full corridor width around the centerline. */ width: number; } export interface CorridorSample { /** Distance from the query point to the nearest centerline. */ distance: number; /** Nearest point on that centerline. */ closest: CorridorPoint; /** Index of the edge owning the nearest centerline point. */ edgeIndex: number; } /** * Organic corridor/path collision (#284.9): a distance-to-polyline width clamp over an edge graph — * cave tunnels, river channels, winding roads. Grid/navmesh/voxel collision can't express a smooth * ribbon; this can. Pure math over authored centerlines. */ export interface CorridorField { contains(x: number, z: number): boolean; /** Nearest-centerline sample, or `null` for an empty field. */ nearest(x: number, z: number): CorridorSample | null; /** The input point when inside; otherwise the nearest point on the corridor boundary — the movement clamp. */ clamp(x: number, z: number): CorridorPoint; /** Signed distance to the corridor edge: negative inside, positive outside. */ distanceToBoundary(x: number, z: number): number; } export declare function createCorridorField(edges: readonly CorridorEdge[]): CorridorField;