import { RoomName } from "../types"; /** * Apply distance transform in-place on a given matrix. * * Output values are distance to the nearest wall. * @param cm initial matrix with 1 representing walkable. Modified in-place * @param oob out of bound value (optional: default to 255) * @returns modified cost matrix */ export declare function applyDistanceTransform(cm: CostMatrix, oob?: number): CostMatrix; /** Maximum value of {@link CostMatrix} */ export declare const MATRIX_MAX = 255; declare global { interface CostMatrix { _bits: number[]; } } /** * Convert {@link RoomTerrain} to {@link CostMatrix} * @param roomName target room name * @param plain value for {@link TERRAIN_MASK_PLAIN} * @param swamp value for {@link TERRAIN_MASK_SWAMP} * @param wall value for {@link TERRAIN_MASK_WALL} * @param exclude optional matrix with non-zero values considered as wall * @returns a matrix of the terrain for the given room */ export declare function getRoomTerrainMatrix(roomName: RoomName, plain?: number, swamp?: number, wall?: number, exclude?: CostMatrix): CostMatrix; /** * Apply distance transform algorithm for a given room. * @param roomName name of the target room. No visibility is needed * @param exclude optional matrix with non-zero values considered as wall * @returns A matrix where values are distance to the nearest wall */ export declare function getRoomDistanceTransform(roomName: RoomName, exclude?: CostMatrix): CostMatrix;