blob: 648b889be0b2091c9cb1a27ab3fff6c84bbed92b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <memory>
#include "CollisionContext.h"
#include "Museum.h"
using namespace std;
CollisionContext::CollisionContext(Museum & m) : museum(m) {}
shared_ptr<QuadTree> CollisionContext::get_quadtree() {
return this->quadtree;
}
void CollisionContext::update() {
this->quadtree = std::make_shared<QuadTree>();
this->quadtree->boundary = {
.x = 0.0,
.y = 0.0,
.width = static_cast<float>(this->museum.canvas.data.columns),
.height = static_cast<float>(this->museum.canvas.data.rows),
};
}
|