import { Box } from '../classes/Box'; import type { Point } from '../classes/Point'; import { IntervalTree } from '../data_structures/interval-tree'; /** * Class representing a planar set - a generic container with ability to keep and retrieve shapes and * perform spatial queries. Planar set is an extension of Set container, so it supports * Set properties and methods */ export declare class PlanarSet { set: Set; index: IntervalTree; /** * Create new instance of PlanarSet * @param shapes - array or set of geometric objects to store in planar set */ constructor(shapes?: T[]); [Symbol.iterator](): IterableIterator; get size(): number; has(shape: T): boolean; forEach(fn: (shape: T) => void): void; /** * Add new shape to planar set and to its spatial index.
* If shape already exist, it will not be added again. * This happens with no error, it is possible to use size property to check if * a shape was actually added.
* Method returns planar set object updated and may be chained */ add(shape: T): this; /** * Delete shape from planar set. Returns true if shape was actually deleted, false otherwise */ delete(shape: T): boolean; /** * Clear planar set */ clear(): void; /** * 2d range search in planar set.
* Returns array of all shapes in planar set which bounding box is intersected with query box * @param box - query box */ search(box: Box): any[]; /** * Point location test. Returns array of shapes which contains given point * @param point - query point */ hit(point: Point): any[]; } //# sourceMappingURL=PlanarSet.d.ts.map