1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export as namespace Quadtree;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export = Quadtree;
|
15 |
|
16 |
|
17 | declare class Quadtree {
|
18 | constructor (bounds: Quadtree.Rect, max_objects?: number, max_levels?: number, level?: number);
|
19 | max_objects: number;
|
20 | max_levels: number;
|
21 | level: number;
|
22 | bounds: Quadtree.Rect;
|
23 | objects: Quadtree.Rect[];
|
24 | nodes: Quadtree[];
|
25 |
|
26 | split(): void
|
27 | getIndex(pRect: Quadtree.Rect): number[]
|
28 | insert(pRect: Quadtree.Rect): void
|
29 | retrieve<T extends Quadtree.Rect>(pRect: Quadtree.Rect): T[]
|
30 | clear(): void
|
31 | }
|
32 |
|
33 | /*~ If you want to expose types from your module as well, you can
|
34 | *~ place them in this block.
|
35 | *~
|
36 | *~ Note that if you decide to include this namespace, the module can be
|
37 | *~ incorrectly imported as a namespace object, unless
|
38 | *~ --esModuleInterop is turned on:
|
39 | *~ import * as x from '[~THE MODULE~]'; // WRONG! DO NOT DO THIS!
|
40 | */
|
41 | declare namespace Quadtree {
|
42 | export interface Rect {
|
43 | x: number
|
44 | y: number
|
45 | width: number
|
46 | height: number
|
47 | }
|
48 | } |
\ | No newline at end of file |