export default TerrainTileManager;
declare class TerrainTileManager {
    /**
     *
     * @param {Vector2} [tileSize]
     * @param {Material} [material]
     * @param {Material} [depthMaterial] applied to each tile mesh as
     *   `customDepthMaterial` so the shadow caster pass picks it up.
     *   Omit (null) to let three.js fall back to its default depth material.
     * @param {WorkerProxy} buildWorker
     */
    constructor({ material, depthMaterial, buildWorker }?: Vector2);
    /**
     *
     * @type {TerrainTile[]}
     */
    tiles: TerrainTile[];
    on: {
        tileBuilt: Signal<any, any, any, any, any, any, any, any>;
        tileDestroyed: Signal<any, any, any, any, any, any, any, any>;
    };
    /**
     *
     * @type {Vector2}
     */
    tileSize: Vector2;
    /**
     *
     * @type {Vector2}
     */
    totalSize: Vector2;
    /**
     * Number of subdivisions per single grid cell
     * @type {ObservedInteger}
     */
    resolution: ObservedInteger;
    /**
     * 2D Scale of the terrain
     * @type {Vector2}
     */
    scale: Vector2;
    /**
     *
     * @type {Float32Array}
     * @private
     */
    private __transform;
    /**
     * @readonly
     * @type {BVH}
     */
    readonly bvh: BVH;
    /**
     *
     * @type {NumericInterval}
     */
    heightRange: NumericInterval;
    /**
     * Debug parameter, makes all tiles have random colored material for easy visual distinction
     * @type {boolean}
     */
    debugTileMaterialRandom: boolean;
    material: ObservedValue;
    /**
     * Optional custom depth material for the shadow caster pass. When
     * non-null it is assigned to each tile mesh's `customDepthMaterial`
     * field. See {@link TerrainTileManager#assignTileMaterial}.
     *
     * @type {Material|null}
     */
    depthMaterial: Material | null;
    /**
     *
     * @type {WorkerProxy}
     */
    buildWorker: WorkerProxy;
    set transform(arg: Float32Array);
    get transform(): Float32Array;
    /**
     *
     * @param {number} min_height
     * @param {number} max_height
     */
    setHeightRange(min_height: number, max_height: number): void;
    initialize(): void;
    /**
     *
     * @param {TerrainTile} tile
     */
    assignTileMaterial(tile: TerrainTile): void;
    /**
     *
     * @param {function(tile:TerrainTile)} callback
     * @param {*} [thisArg]
     */
    traverse(callback: any, thisArg?: any): void;
    destroyTiles(): void;
    /**
     * Rebuild all tiles
     */
    rebuild(): void;
    /**
     * Rebuild tiles that overlap rectangular region of the overall terrain defined by normalized coordinates (UV space)
     * @param {number} u0
     * @param {number} v0
     * @param {number} u1
     * @param {number} v1
     */
    rebuildTilesByUV(u0: number, v0: number, u1: number, v1: number): void;
    /**
     *
     * @param {number} x0
     * @param {number} y0
     * @param {number} x1
     * @param {number} y1
     * @returns {TerrainTile[]}
     */
    getRawTilesOverlappingRectangle(x0: number, y0: number, x1: number, y1: number): TerrainTile[];
    initializeTiles(): void;
    /**
     *
     * @param {number} x Tile X coordinate
     * @param {number} y Tile Y coordinate
     * @returns {number}
     */
    computeTileIndex(x: number, y: number): number;
    /**
     *
     * @param {number} x
     * @param {number} y
     * @returns {TerrainTile|undefined}
     */
    getRaw(x: number, y: number): TerrainTile | undefined;
    /**
     *
     * @param {number} x Grid X coordinate
     * @param {number} y Grid Y coordinate
     * @returns {TerrainTile}
     */
    getRawTileByPosition(x: number, y: number): TerrainTile;
    /**
     * Given world coordinates in top-down plane, where X runs along X axis and Y runs along Z axis, returns terrain tile that overlaps that 2d region
     * @param {number} x
     * @param {number} y
     * @return {TerrainTile|undefined}
     */
    getTileByWorldPosition2D(x: number, y: number): TerrainTile | undefined;
    /**
     * Builds and returns the tile from world coordinates
     * @param {number} x
     * @param {number} y
     * @returns {Promise<TerrainTile>}
     */
    obtainTileAtWorldPosition2D(x: number, y: number): Promise<TerrainTile>;
    /**
     *
     * @param {number} x coordinate
     * @param {number} y coordinate
     * @returns {Promise<TerrainTile>}
     * @throws if no tile exists at given coordinates
     */
    obtain(x: number, y: number): Promise<TerrainTile>;
    /**
     *
     * @param {TerrainTile} tile
     */
    release(tile: TerrainTile): void;
    dispose(): void;
    /**
     * Fix normals along the seams of the tile
     *
     * @param {number} x
     * @param {number} y
     * @param {TerrainTile} tile
     */
    stitchTile(x: number, y: number, tile: TerrainTile): void;
    /**
     *
     * @param {SurfacePoint3} result
     * @param {number} originX
     * @param {number} originY
     * @param {number} originZ
     * @param {number} directionX
     * @param {number} directionY
     * @param {number} directionZ
     * @returns {boolean}
     */
    raycastFirstSync(result: SurfacePoint3, originX: number, originY: number, originZ: number, directionX: number, directionY: number, directionZ: number): boolean;
    /**
     * TODO untested
     * @param {SurfacePoint3} contact
     * @param {number} x
     * @param {number} y
     * @return {boolean}
     */
    raycastVerticalFirstSync(contact: SurfacePoint3, x: number, y: number): boolean;
    /**
     *
     * @param {number} x
     * @param {number} y
     * @param {function(tile:TerrainTile)} resolve
     * @param {function(reason:*)} reject
     */
    build(x: number, y: number, resolve: any, reject: any): void;
}
import TerrainTile from './TerrainTile.js';
import Signal from '../../../../core/events/signal/Signal.js';
import Vector2 from '../../../../core/geom/Vector2.js';
import ObservedInteger from "../../../../core/model/ObservedInteger.js";
import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
import { NumericInterval } from "../../../../core/math/interval/NumericInterval.js";
import ObservedValue from '../../../../core/model/ObservedValue.js';
import { SurfacePoint3 } from "../../../../core/geom/3d/SurfacePoint3.js";
//# sourceMappingURL=TerrainTileManager.d.ts.map