diff options
Diffstat (limited to 'CollisionContext.cpp')
-rw-r--r-- | CollisionContext.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CollisionContext.cpp b/CollisionContext.cpp index e7550e5..ec608b5 100644 --- a/CollisionContext.cpp +++ b/CollisionContext.cpp @@ -2,16 +2,20 @@ #include "CollisionContext.h" #include "Museum.h" +#include "NaiveCollisionChecker.h" +#include "QuadTreeCollisionChecker.h" using namespace std; CollisionContext::CollisionContext(Museum & m) : museum(m) {} -shared_ptr<QuadTree> CollisionContext::get_quadtree() { - return this->quadtree; +shared_ptr<CollisionChecker> CollisionContext::get_checker() { + return this->checker; } void CollisionContext::update() { - this->quadtree = std::make_shared<QuadTree>(this->museum); + this->checker = std::make_shared<QuadTreeCollisionChecker>(this->museum); + // this->checker = std::make_shared<NaiveCollisionChecker>(this->museum); + this->checker->check(); } |