aboutsummaryrefslogtreecommitdiff
path: root/QuadTree.h
diff options
context:
space:
mode:
Diffstat (limited to 'QuadTree.h')
-rw-r--r--QuadTree.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/QuadTree.h b/QuadTree.h
index 6ee7a5a..5a371d4 100644
--- a/QuadTree.h
+++ b/QuadTree.h
@@ -8,11 +8,9 @@
class QuadTree {
public:
- const int capacity = 2;
-
- std::forward_list<Artist *> artists;
-
- Rectangle boundary;
+ QuadTree(Museum &);
+ QuadTree(const QuadTree *, const Rectangle & boundary);
+ const Rectangle & get_boundary() { return this->boundary; }
std::unique_ptr<QuadTree> subtree[4] = {
nullptr,
nullptr,
@@ -20,8 +18,16 @@ public:
nullptr,
};
+private:
+ const int capacity = 2;
+
+ std::forward_list<Artist *> artists;
+ size_t artists_size = 0;
+
+ Rectangle boundary;
+
void subdivide();
- void query_range();
+ void cull();
};