diff options
Diffstat (limited to 'src/physics/collision.h')
-rw-r--r-- | src/physics/collision.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/physics/collision.h b/src/physics/collision.h new file mode 100644 index 0000000..cca6042 --- /dev/null +++ b/src/physics/collision.h @@ -0,0 +1,30 @@ +/** + * @file collision.h + * @author your name (you@domain.com) + * @brief + * @version 0.1 + * @date 2024-05-12 + * + * @copyright Copyright (c) 2024 + * + */ +#pragma once +#include "geometry.h" + +enum collider_type { + cuboid_collider, + sphere_collider, +}; + +/** @brief generic collider structure */ +typedef struct physics_collider { + u64 id; // ? Replace with handle? + enum collider_type shape; + union collider_data { + cuboid cuboid; + sphere sphere; + } geometry; + transform transform; + u8 layer; + bool on_ground; +} physics_collider;
\ No newline at end of file |