diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-01 15:53:14 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-01 15:53:14 +0200 |
commit | 3b360c21777aad02394a643b32be2ab25362bba1 (patch) | |
tree | e5a3ed2c546e31c9e83170c53fc75c0016169384 /quadtree.h | |
parent | bd22509aa429c6f33075293e379f1e2b2714a094 (diff) |
Some cleanup in preparation for dynamic subdivision of the terrain quadtree.
Diffstat (limited to 'quadtree.h')
-rw-r--r-- | quadtree.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |