import * as FSM from '@dra2020/fsm';
import * as Poly from './poly';
import * as BB from './boundbox';
export interface WrappedPoly {
    box: BB.BoundBox;
    p: any;
}
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: BB.BoundBox;
    asyncUnion: any;
    constructor(options: QuadOptions, level: number, box: BB.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 {};
