#pragma once #include #include #include "Artist.h" #include "CollisionChecker.h" #include "Rectangle.h" class QuadTreeCollisionChecker : public CollisionChecker { public: QuadTreeCollisionChecker(Museum &); virtual void check(); public: const Rectangle & get_boundary() { return this->boundary; } std::unique_ptr subtree[4] = { nullptr, nullptr, nullptr, nullptr, }; private: QuadTreeCollisionChecker(const QuadTreeCollisionChecker *, const Rectangle & boundary); const int capacity = 2; std::forward_list artists; size_t artists_size = 0; Rectangle boundary; void subdivide(); void cull(); };