-
Notifications
You must be signed in to change notification settings - Fork 11
/
README
67 lines (43 loc) · 1.34 KB
/
README
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
57
58
59
60
61
62
63
64
65
=
*
/| |\
* * * *
Simple quadtrees for c.
see test.c for usage, and use make to build
And the api goes:
quadtree_point_t*
quadtree_point_new(double x, double y);
void
quadtree_point_free(quadtree_point_t *point);
quadtree_bounds_t*
quadtree_bounds_new();
void
quadtree_bounds_extend(quadtree_bounds_t *bounds, double x, double y);
void
quadtree_bounds_free(quadtree_bounds_t *bounds);
quadtree_node_t*
quadtree_node_new();
void
quadtree_node_free(quadtree_node_t *node, void (*value_free)(void*));
int
quadtree_node_ispointer(quadtree_node_t *node);
int
quadtree_node_isempty(quadtree_node_t *node);
int
quadtree_node_isleaf(quadtree_node_t *node);
void
quadtree_node_reset(quadtree_node_t* node, void (*key_free)(void*));
quadtree_node_t*
quadtree_node_with_bounds(double minx, double miny, double maxx, double maxy);
quadtree_t*
quadtree_new(double minx, double miny, double maxx, double maxy);
void
quadtree_free(quadtree_t *tree);
quadtree_point_t*
quadtree_search(quadtree_t *tree, double x, double y);
int
quadtree_insert(quadtree_t *tree, double x, double y, void *key);
void
quadtree_walk(quadtree_node_t *root,
void (*descent)(quadtree_node_t *node),
void (*ascent)(quadtree_node_t *node));