import Point from '../util/point';
import Grid from './grid_index';
import { mat4 } from 'gl-matrix';
import type Transform from '../geo/transform';
import type { SingleCollisionBox } from '../data/bucket/symbol_bucket';
import type { GlyphOffsetArray, SymbolLineVertexArray } from '../data/array_types';
/**
 * A collision index used to prevent symbols from overlapping. It keep tracks of
 * where previous symbols have been placed and is used to check if a new
 * symbol overlaps with any previously added symbols.
 *
 * There are two steps to insertion: first placeCollisionBox/Circles checks if
 * there's room for a symbol, then insertCollisionBox/Circles actually puts the
 * symbol in the index. The two step process allows paired symbols to be inserted
 * together even if they overlap.
 *
 * @private
 */
declare class CollisionIndex {
    grid: Grid;
    ignoredGrid: Grid;
    transform: Transform;
    pitchfactor: number;
    screenRightBoundary: number;
    screenBottomBoundary: number;
    gridRightBoundary: number;
    gridBottomBoundary: number;
    constructor(transform: Transform, grid?: Grid, ignoredGrid?: Grid);
    placeCollisionBox(collisionBox: SingleCollisionBox, allowOverlap: boolean, textPixelRatio: number, posMatrix: mat4, collisionGroupPredicate?: any): {
        box: Array<number>;
        offscreen: boolean;
    };
    placeCollisionCircles(allowOverlap: boolean, symbol: any, lineVertexArray: SymbolLineVertexArray, glyphOffsetArray: GlyphOffsetArray, fontSize: number, posMatrix: mat4, labelPlaneMatrix: mat4, labelToScreenMatrix: mat4 | undefined | null, showCollisionCircles: boolean, pitchWithMap: boolean, collisionGroupPredicate: any | undefined | null, circlePixelDiameter: number, textPixelPadding: number): {
        circles: Array<number>;
        offscreen: boolean;
        collisionDetected: boolean;
    };
    /**
     * Because the geometries in the CollisionIndex are an approximation of the shape of
     * symbols on the map, we use the CollisionIndex to look up the symbol part of
     * `queryRenderedFeatures`.
     *
     * @private
     */
    queryRenderedSymbols(viewportQueryGeometry: Array<Point>): {};
    insertCollisionBox(collisionBox: Array<number>, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
    insertCollisionCircles(collisionCircles: Array<number>, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
    projectAndGetPerspectiveRatio(posMatrix: mat4, x: number, y: number): {
        point: Point;
        perspectiveRatio: number;
    };
    isOffscreen(x1: number, y1: number, x2: number, y2: number): boolean;
    isInsideGrid(x1: number, y1: number, x2: number, y2: number): boolean;
    getViewportMatrix(): mat4;
}
export default CollisionIndex;
//# sourceMappingURL=collision_index.d.ts.map