import * as FSM from '@dra2020/fsm';
import * as Poly from './poly';
export interface BoundBox {
    l?: number;
    t?: number;
    r?: number;
    b?: number;
}
export interface WrappedPoly {
    box: BoundBox;
    p: any;
}
export declare function polyBoundBox(f: any): BoundBox;
export declare function geoBoundBox(col: any): BoundBox;
export interface QuadOptions {
    maxLeafCount?: number;
    maxDepth?: number;
    tickStep?: number;
}
export declare const DefaultQuadOptions: QuadOptions;
export interface TickCounter {
    ticks: number;
}
declare class QuadLevel {
    options: QuadOptions;
    level: number;
    children: QuadLevel[];
    features: any[];
    box: BoundBox;
    asyncUnion: any;
    constructor(options: QuadOptions, level: number, box: BoundBox, features: WrappedPoly[]);
    private featureInBox;
    union(): any;
    readonly isempty: boolean;
    tickUnion(tickCounter: TickCounter): void;
}
export declare class FsmQuadTree extends FSM.Fsm {
    quad: QuadLevel;
    asyncUnion: any;
    isempty: boolean;
    options: Poly.TickOptions;
    constructor(env: FSM.FsmEnvironment, options?: Poly.TickOptions, col?: any);
    initialize(col: any): void;
    cancel(): any;
    readonly result: any;
    tick(): void;
}
export {};
