summaryrefslogtreecommitdiff
path: root/src/scene.h
diff options
context:
space:
mode:
authorJoshua Rowe <17525998+omnisci3nce@users.noreply.github.com>2024-05-20 10:50:11 +1000
committerGitHub <noreply@github.com>2024-05-20 10:50:11 +1000
commite904c22003c3a134201b222e6619e782fbe63947 (patch)
tree5295c8ce5f855ca4a0f1bebe50beee80bae66682 /src/scene.h
parent02e84ee4d18e705e3362be1e327fdb6f1397a032 (diff)
parent73d4145f46d2305f45761b8e456df692d1962dfb (diff)
Merge pull request #14 from omnisci3nce/realign
Realign
Diffstat (limited to 'src/scene.h')
-rw-r--r--src/scene.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/scene.h b/src/scene.h
new file mode 100644
index 0000000..5ac7542
--- /dev/null
+++ b/src/scene.h
@@ -0,0 +1,54 @@
+/**
+ * @file scene.h
+ * @author your name (you@domain.com)
+ * @brief
+ * @version 0.1
+ * @date 2024-04-27
+ *
+ * @copyright Copyright (c) 2024
+ *
+ */
+#pragma once
+#include "camera.h"
+#include "defines.h"
+#include "maths_types.h"
+#include "render_types.h"
+
+typedef struct scene {
+ // camera
+ camera camera;
+ // lights
+ directional_light dir_light;
+ point_light point_lights[4];
+ size_t point_lights_count;
+ // geometry
+ render_entity_darray* renderables;
+ // TODO: tree - transform_hierarchy
+} scene;
+
+void scene_init(scene* s);
+void scene_free(scene* s);
+
+// Simplified API - no scene pointer; gets and sets global scene
+
+// Add/Remove objects from the scene
+/* vec3 direction; */
+/* vec3 ambient; */
+/* vec3 diffuse; */
+/* vec3 specular; */
+void scene_set_dir_light(directional_light light);
+void _scene_set_dir_light(vec3 ambient, vec3 diffuse, vec3 specular, vec3 direction);
+
+void scene_add_point_light(point_light light);
+void scene_add_model(model_handle model, transform3d transform);
+bool scene_remove_model(model_handle model);
+
+// Getter & Setters
+void scene_set_model_transform(model_handle model, transform3d new_transform);
+void scene_set_camera(vec3 pos, vec3 front);
+
+/* // There can only be one heightmap terrain at a time right now. */
+/* bool scene_add_heightmap(scene* s /\* TODO *\/); */
+/* bool scene_delete_heightmap(scene* s); */
+
+// TODO: functions to load and save scenes from disk