summaryrefslogtreecommitdiff
path: root/src/collision.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/collision.h')
-rw-r--r--src/collision.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/collision.h b/src/collision.h
new file mode 100644
index 0000000..4ac9ec3
--- /dev/null
+++ b/src/collision.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "geometry.h"
+
+enum ColliderType {
+ CuboidCollider,
+ SphereCollider,
+};
+
+/** @brief generic collider structure */
+typedef struct Collider {
+ u64 id; // ? Replace with handle?
+ enum ColliderType shape;
+ union collider_data {
+ Cuboid cuboid;
+ Sphere sphere;
+ } geometry;
+ Transform transform;
+ u8 layer;
+ bool on_ground;
+} Collider;