summaryrefslogtreecommitdiff
path: root/quadtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'quadtree.h')
-rw-r--r--quadtree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/quadtree.h b/quadtree.h
index 9a84e98..923a49f 100644
--- a/quadtree.h
+++ b/quadtree.h
@@ -15,7 +15,9 @@ class Quadtree {
QuadNode(Quadtree *tree, QuadNode *parent, float x, float y, float width, float height, int level, bool leaf);
virtual ~QuadNode();
+ void fill();
void subdivide(bool leaf = true);
+ void merge();
void draw();
void draw_grid();
float get_height(float px, float py);
@@ -31,9 +33,10 @@ class Quadtree {
Quadtree(int width, int height, float *heightmap, int levels);
virtual ~Quadtree();
+ void create_nodes(int levels);
unsigned int count_nodes();
void make_vbo();
- QuadNode *find(float x, float y);
+ QuadNode *find(float x, float y, int leve = -1l);
};
#endif