From fab0fccc0aaa18e915bcd08e81e5a04177e435cd Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 21 Oct 2024 19:06:58 +0200 Subject: fix quad tree collision checker --- CollisionContext.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'CollisionContext.cpp') 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 CollisionContext::get_quadtree() { - return this->quadtree; +shared_ptr CollisionContext::get_checker() { + return this->checker; } void CollisionContext::update() { - this->quadtree = std::make_shared(this->museum); + this->checker = std::make_shared(this->museum); + // this->checker = std::make_shared(this->museum); + this->checker->check(); } -- cgit v1.2.3