Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
collider.hpp
Go to the documentation of this file.
1#pragma once
2
4
5struct Physics;
6
10enum class Collider {
11 // A collider type of None indicates that an object does not have a
12 // collider - all collision checks are ignored
13 None,
14 Box,
15 Sphere
16};
17
27bool detectCollision(const Physics& obj1, const Physics& obj2);
28
37bool detectCollisionSphere(const Physics& sphere, const Physics& obj);
38
47bool detectCollisionBox(const Physics& box, const Physics& obj);
bool detectCollision(const Physics &obj1, const Physics &obj2)
Detects whether a collision has occurred between two objects given their Physics structs; this is don...
Definition: collider.cpp:4
bool detectCollisionSphere(const Physics &sphere, const Physics &obj)
Detects whether a collision has occurred between two objects given their Physics structs and that the...
Definition: collider.cpp:19
bool detectCollisionBox(const Physics &box, const Physics &obj)
Detects whether a collision has occurred between two objects given their Physics structs and that the...
Definition: collider.cpp:66
Collider
Enumeration to identify collider shape.
Definition: collider.hpp:10
Physics struct that contains all movement / collision related data for a particular object.
Definition: object.hpp:23