summaryrefslogtreecommitdiff
path: root/src/scene.h
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-10 13:24:05 +1000
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-05-10 13:24:05 +1000
commitf7944239b793d1d5c49336856965d3a793f99316 (patch)
tree2effd38a16a15aee505eb8c27a231dfbe35c822a /src/scene.h
parent3a0557d98ba311b031ad53ceb8fc6025013f65dc (diff)
make core a static and add a default scene to it
Diffstat (limited to 'src/scene.h')
-rw-r--r--src/scene.h42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/scene.h b/src/scene.h
index 6cac061..5399ab7 100644
--- a/src/scene.h
+++ b/src/scene.h
@@ -8,23 +8,41 @@
* @copyright Copyright (c) 2024
*
*/
+#pragma once
+#include "camera.h"
#include "defines.h"
-#include "types.h"
+#include "render_types.h"
+#include "maths_types.h"
typedef struct scene {
- // directional_light dir_light;
- // point_light point_lights[4];
- // size_t n_point_lights;
+ // 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;
-bool scene_add_directional_light(scene* s /* TODO */);
-bool scene_add_point_light(scene* s /* TODO */);
+void scene_init(scene* s);
+void scene_free(scene* s);
-// 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);
+// Simplified API - no scene pointer; gets and sets global scene
-bool scene_add_model(scene* s, model_handle model);
-void scene_remove_model(scene* s, model_handle model);
+// Add/Remove objects from the scene
+void scene_set_dir_light(directional_light light);
+void scene_add_point_light(point_light light);
+void scene_add_model(model_handle model, transform3d transform);
+bool scene_remove_model(model_handle model);
-// TODO: functions to load and save scenes from disk \ No newline at end of file
+// 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