summaryrefslogtreecommitdiff
path: root/archive/src/physics.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 12:48:05 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 12:48:05 +1000
commitdfb6adbcbcc7d50b770b6d5ea82efdd8f8c32e25 (patch)
treea470b91a90716d7ea46fde53ed395449c24583a2 /archive/src/physics.h
parent54354e32c6498cc7f8839ab4deb1208d37216cc5 (diff)
delete documentation workflow
Diffstat (limited to 'archive/src/physics.h')
-rw-r--r--archive/src/physics.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/archive/src/physics.h b/archive/src/physics.h
new file mode 100644
index 0000000..134f08b
--- /dev/null
+++ b/archive/src/physics.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "geometry.h"
+#include "maths_types.h"
+
+// 'system' means that it gets called per frame
+
+typedef struct physics_settings {
+ f32 gravity_strength;
+} physics_settings;
+
+// What else do I need?
+// intersection methods
+
+typedef struct physics_world {
+ physics_settings settings;
+} physics_world;
+
+physics_world physics_init(physics_settings settings);
+void physics_shutdown(physics_world* phys_world);
+
+/** @brief perform one or more simulation steps */
+void physics_system_update(physics_world* phys_world, f64 deltatime);
+
+// enum ColliderType {
+// CuboidCollider,
+// SphereCollider,
+// };
+
+/** @brief Oriented Bounding Box */
+typedef struct OBB {
+ Vec3 center;
+ Bbox_3D bbox;
+ Quat rotation;
+} OBB;
+
+PUB void Debug_DrawOBB(OBB obb);
+
+/** @brief generic collider structure */
+typedef struct Collider {
+ u64 id; // ? Replace with handle?
+ OBB shape; // NOTE: We're only supporting the one collider type for now
+ bool on_ground;
+} Collider;