import { Box2 } from 'three'; /** * Data structure that splits a 2D region into cells where each cell can contain zero to many * elements. Elements can be stored in several cells. This data structure make overlap lookups * efficient. * * Note! This class is tailored for usage with {@link HtmlOverlayTool} and has a few restrictions * and assumptions associated with the usage. If used elsewhere, take care as to how this affects * performance and behaviour. */ export declare class BucketGrid2D { private readonly _dimensions; private readonly _bounds; private readonly _cells; /** * Holds elements that has been removed from the collection using {@link BucketGrid2D.removeOverlappingElements}. * This is used to avoid expensive re-allocations of cells when removing elements. */ private readonly _removedElements; constructor(bounds: Box2, dimensions: [width: number, height: number]); insert(bounds: Box2, element: T): void; overlappingElements(bounds: Box2): Generator; removeOverlappingElements(bounds: Box2): Generator; private cellsIntersecting; }