aboutsummaryrefslogtreecommitdiff
path: root/NaiveCollisionChecker.cpp
blob: db277ab7ae710758e732d13826c2a1d3ffb825bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "NaiveCollisionChecker.h"
#include "Museum.h"
#include "People.h"
#include "Artist.h"

void NaiveCollisionChecker::check() {
	auto artists = this->museum.people.get_artists();
	for (Artist * artist : artists) artist->colliding = false;
	auto begin = artists.begin();
	auto end = artists.end();
	for (auto it1 = begin; it1 != end; ++it1) {
		auto it2 = it1;
		++it2;
		for (; it2 != end; ++it2) {
			this->compare(**it1, **it2);
		}
	}
}