import { type Box3 } from 'mathcat'; import { type BuildContextState } from './build-context.js'; import type { CompactHeightfield } from './compact-heightfield.js'; export type Contour = { /** simplified contour vertex and connection data. size: 4 * nVerts */ vertices: number[]; /** the number of vertices in the simplified contour */ nVertices: number; /** raw contour vertex and connection data */ rawVertices: number[]; /** the number of vertices in the raw contour */ nRawVertices: number; /** the region id of the contour */ reg: number; /** the area id of the contour */ area: number; }; export type ContourSet = { /** an array of the contours in the set */ contours: Contour[]; /** the bounds in world space */ bounds: Box3; /** the size of each cell */ cellSize: number; /** the height of each cell */ cellHeight: number; /** the width of the set */ width: number; /** the height of the set */ height: number; /**the aabb border size used to generate the source data that the contour set was derived from */ borderSize: number; /** the max edge error that this contour set was simplified with */ maxError: number; }; export declare enum ContourBuildFlags { /** tessellate solid (impassable) edges during contour simplification */ CONTOUR_TESS_WALL_EDGES = 1, /** tessellate edges between areas during contour simplification */ CONTOUR_TESS_AREA_EDGES = 2 } export declare const buildContours: (ctx: BuildContextState, compactHeightfield: CompactHeightfield, maxSimplificationError: number, maxEdgeLength: number, buildFlags: ContourBuildFlags) => ContourSet;