engine/include/components/collider.h

23 lines
396 B
C
Raw Normal View History

2023-05-01 12:55:49 +00:00
#ifndef ENGINE_INCLUDE_COMPONENTS_COLLIDER_H_
#define ENGINE_INCLUDE_COMPONENTS_COLLIDER_H_
2023-01-18 14:42:09 +00:00
2023-01-26 23:52:25 +00:00
#include <glm/vec3.hpp>
2023-05-01 12:55:49 +00:00
2023-01-26 23:52:25 +00:00
#include <cstdint>
2023-01-18 14:42:09 +00:00
namespace engine {
2023-05-01 12:55:49 +00:00
struct AABB {
glm::vec3 pos1;
glm::vec3 pos2;
};
2023-01-22 18:20:10 +00:00
2023-05-01 12:55:49 +00:00
struct ColliderComponent {
bool is_static;
bool is_trigger; // entity receives an event on collision enter and exit
AABB aabb; // broad phase
2023-05-01 12:55:49 +00:00
};
2023-02-02 17:32:19 +00:00
2023-05-01 12:55:49 +00:00
} // namespace engine
2023-01-18 14:42:09 +00:00
2023-05-01 12:55:49 +00:00
#endif