summaryrefslogtreecommitdiffstats
path: root/game/shared/entity/collision.hh
diff options
context:
space:
mode:
Diffstat (limited to 'game/shared/entity/collision.hh')
-rw-r--r--game/shared/entity/collision.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/game/shared/entity/collision.hh b/game/shared/entity/collision.hh
new file mode 100644
index 0000000..536a066
--- /dev/null
+++ b/game/shared/entity/collision.hh
@@ -0,0 +1,25 @@
+#ifndef SHARED_ENTITY_COLLISION_HH
+#define SHARED_ENTITY_COLLISION_HH 1
+#pragma once
+
+#include "core/math/aabb.hh"
+
+namespace world
+{
+class Dimension;
+} // namespace world
+
+namespace entity
+{
+struct Collision final {
+ math::AABB aabb;
+
+public:
+ // NOTE: entity::Collision::fixed_update must be called
+ // before entity::Transform::fixed_update and entity::Velocity::fixed_update
+ // because both transform and velocity may be updated internally
+ static void fixed_update(world::Dimension* dimension);
+};
+} // namespace entity
+
+#endif // SHARED_ENTITY_COLLISION_HH