import type { Vec3 } from 'mathcat'; import type { NavMesh } from './nav-mesh.js'; import { type NodeRef, NodeType } from './node.js'; export declare enum FindStraightPathOptions { ALL_CROSSINGS = 1, AREA_CROSSINGS = 2 } export declare enum StraightPathPointFlags { START = 0, END = 1, OFFMESH = 2 } export type StraightPathPoint = { position: Vec3; type: NodeType; nodeRef: NodeRef | null; /** @see StraightPathPointFlags */ flags: number; }; export declare enum FindStraightPathResultFlags { NONE = 0, SUCCESS = 1, PARTIAL_PATH = 4, MAX_POINTS_REACHED = 8, INVALID_INPUT = 16 } export type FindStraightPathResult = { flags: FindStraightPathResultFlags; success: boolean; path: StraightPathPoint[]; }; /** * This method peforms what is often called 'string pulling'. * * The start position is clamped to the first polygon node in the path, and the * end position is clamped to the last. So the start and end positions should * normally be within or very near the first and last polygons respectively. * * @param navMesh The navigation mesh to use for the search. * @param start The start position in world space. * @param end The end position in world space. * @param pathNodeRefs The list of polygon node references that form the path, generally obtained from `findNodePath` * @param maxPoints The maximum number of points to return in the straight path. If null, no limit is applied. * @param straightPathOptions @see FindStraightPathOptions * @returns The straight path */ export declare const findStraightPath: (navMesh: NavMesh, start: Vec3, end: Vec3, pathNodeRefs: NodeRef[], maxPoints?: number | null, straightPathOptions?: number) => FindStraightPathResult;