8 Sphere::Sphere(float r)
10 bounds.min = glm::vec3(-r);
11 bounds.max = glm::vec3(r);
14 void Sphere::ReverseCollisionTest(Object &other, std::vector<Contact> &contacts) {
15 other.ActualCollisionTest(*this, contacts);
18 void Sphere::ActualCollisionTest(Sphere &other, std::vector<Contact> &contacts) {
21 if (Intersection(Shape(), other.Shape(), dist, norm)) {
22 glm::vec3 point(state.pos + ((dist - radius) * norm));
23 contacts.emplace_back(point, norm, this, &other);