import type { Vec2 } from '../core/types';
export interface PathGrid {
    width: number;
    height: number;
    /** Return true if (x,y) is walkable. */
    isWalkable(x: number, y: number): boolean;
    /** Movement cost to enter (x,y). Default = 1. */
    cost?(x: number, y: number): number;
}
export interface PathfinderOptions {
    /** Allow diagonal movement (default true). */
    allowDiagonals?: boolean;
    /** Maximum iterations before giving up (default 2000). */
    maxIterations?: number;
    /** Heuristic weight – higher = faster but less optimal (default 1). */
    heuristicWeight?: number;
}
export declare function findPath(grid: PathGrid, startX: number, startY: number, endX: number, endY: number, options?: PathfinderOptions): Vec2[] | null;
export declare function smoothPath(path: Vec2[], grid: PathGrid): Vec2[];
export declare class FlowField {
    readonly width: number;
    readonly height: number;
    /** Direction vectors for each cell. */
    readonly directions: Vec2[];
    /** Dijkstra cost for each cell (Infinity = unreachable). */
    readonly costs: Float32Array;
    constructor(width: number, height: number);
    /** Generate flow field towards target (tileX, tileY). */
    generate(grid: PathGrid, targetX: number, targetY: number): void;
    getDirection(tileX: number, tileY: number): Vec2;
    getCost(tileX: number, tileY: number): number;
}
export interface NavPolygon {
    id: number;
    vertices: Vec2[];
    neighbors: number[];
}
export interface NavMesh {
    polygons: NavPolygon[];
}
/** Find which polygon contains a point (simple point-in-polygon test). */
export declare function findContainingPolygon(mesh: NavMesh, point: Vec2): NavPolygon | null;
