summaryrefslogtreecommitdiff
path: root/inc/quadtree.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'inc/quadtree.hpp')
-rw-r--r--inc/quadtree.hpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/inc/quadtree.hpp b/inc/quadtree.hpp
index 8da34aa..2b07103 100644
--- a/inc/quadtree.hpp
+++ b/inc/quadtree.hpp
@@ -4,38 +4,38 @@
#include <list>
#include <vector>
-#include "sdl/window.hpp"
+#include "constants.hpp"
#include "creature.hpp"
#include "resource.hpp"
#include "entity.hpp"
#include "rectangle.hpp"
+
#include "opengl/graphicsdata.hpp"
+#include "sdl/window.hpp"
class Quadtree {
+ public:
+ Quadtree();
+ Quadtree(int pLevel,Rectangle pBounds);
+
+ void clear();
+ void insert(Entity* iter);
+
+ std::list<Entity*> retrieve(std::list<Entity*> returnObject, GraphicsData obj);
+ std::list<Entity*> objects;
+
+ Quadtree* nodes;
+
+ std::vector<GraphicsData> Draw();
+
+ private:
+ void split();
+ int getIndex(GraphicsData object);
+ int level;
+ bool isNull = true;
- public:
- Quadtree();
- Quadtree(int pLevel, Rectangle pBounds);
- void clear();
- void insert(Entity* iter);
- std::list<Entity*> retrieve(std::list<Entity*> returnObject, GraphicsData obj);
-
- std::list<Entity*> objects;
-
- Quadtree* nodes;
-
- std::vector<GraphicsData> Draw();
-
- private:
- void split();
- int getIndex(GraphicsData object);
- int MAX_OBJECTS = 5;
- int MAX_LEVELS = 6;
- int level;
- bool isNull = true;
-
- GraphicsData gfxDataRect;
- Rectangle bounds;
+ GraphicsData gfxDataRect;
+ Rectangle bounds;
};
#endif