blob: e908fbbdf5f7475d5a270c4f8784aea18d0063d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
declare namespace Voronoi {
class Point {
x: number;
y: number;
}
class Site {
x: number;
y: number;
voronoiId: number;
}
class Cell {
site: Site;
halfedges: HalfEdge[];
closeMe: boolean;
}
class Edge {
lSite: Site;
rSite: Site;
vb: Point;
va: Point;
}
class HalfEdge {
site: Site;
edge: Edge;
angle: number;
getStartpoint(): Point;
getEndpoint(): Point;
}
class BBox {
xl: number;
xr: number;
yt: number;
yb: number;
}
class VoronoiDiagram {
site: any;
cells: Cell[];
edges: Edge[];
vertices: Point[];
execTime: number;
}
}
declare class Voronoi {
constructor();
compute(sites: Voronoi.Point[], bbox: Voronoi.BBox): Voronoi.VoronoiDiagram;
}
export = Voronoi;
|