import { QuadTree, Boundaries } from "../../utils/geometry/interfaces"; import { Edge } from "../../../interfaces"; import { AbstractQuad } from "./AbstractQuad"; import Graph from "../Graph"; /** * Sigma Quadtree Module for edges * =============================== * * Author: Sébastien Heymann, * from the quad of Guillaume Plique (Yomguithereal) * Version: 0.2 */ /** * Quad Functions * ------------ * * The Quadtree functions themselves. * For each of those functions, we consider that in a splitted quad, the * index of each node is the following: * 0: top left * 1: top right * 2: bottom left * 3: bottom right * * Moreover, the hereafter quad's philosophy is to consider that if an element * collides with more than one nodes, this element belongs to each of the * nodes it collides with where other would let it lie on a higher node. */ /** * Sigma Quad Constructor * ---------------------- * * The edgequad API as exposed to sigma */ /** * The edgequad core that will become the sigma interface with the quadtree. * * property {object} tree Property holding the quadtree object. * property {object} cache Cache for the area method. * property {boolean} enabled Can index and retreive elements. */ export default class EdgeQuad extends AbstractQuad { private graph; constructor(graph: Graph); protected addItem(edge: Edge): void; protected createQuadTree(bounds: Boundaries, level: number, maxElements: number, maxLevel: number): QuadTree; }