]> git.localhorst.tv Git - blank.git/blob - src/world/EntityCollision.hpp
be1a82d9085a52c632323c3746f0ba5f461f69da
[blank.git] / src / world / EntityCollision.hpp
1 #ifndef BLANK_WORLD_ENTITYCOLLISION_HPP_
2 #define BLANK_WORLD_ENTITYCOLLISION_HPP_
3
4
5 namespace blank {
6
7 class Entity;
8
9 struct EntityCollision {
10
11         Entity *entity;
12
13         float depth;
14         glm::vec3 normal;
15
16         EntityCollision()
17         : entity(nullptr), depth(0.0f), normal(0.0f) { }
18         EntityCollision(Entity *e, float d, const glm::vec3 &n)
19         : entity(e), depth(d), normal(n) { }
20
21         /// check if an actual collision
22         operator bool() const noexcept { return entity; }
23
24 };
25
26 }
27
28 #endif