From b03bde3d412148cd573f5f14012cdd270f309947 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sun, 11 Aug 2024 23:00:26 +1000 Subject: starting work on immediate mode drawing --- src/collision.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/collision.h (limited to 'src/collision.h') 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; -- cgit v1.2.3-70-g09d2