aboutsummaryrefslogtreecommitdiff
path: root/src/scene/scene.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
committerhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
commita34c49f103c8950a57687ea3d866c244d95b4414 (patch)
treeff268f4a7f52769a252443d6f2822c9814e3bb1c /src/scene/scene.h
parent06398a7a176e123506de6e8851866a8bec0b3427 (diff)
[docs]: added a few comments cause i wont be able to read this in a week's time
Diffstat (limited to 'src/scene/scene.h')
-rw-r--r--src/scene/scene.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/scene/scene.h b/src/scene/scene.h
index 23d884f..d585a28 100644
--- a/src/scene/scene.h
+++ b/src/scene/scene.h
@@ -8,31 +8,28 @@
namespace Donut
{
- // The document: everything the app edits and renders, independent of any
- // backend or UI. Workspaces (tabs) read and mutate this; the RenderPath reads
- // it to draw. It owns the two viewpoints (cameras) as scene state, plus small
+ // the document: everything the app edits and renders, independent of any
+ // backend or UI. the UI panels read and mutate this; the RenderPath reads it
+ // to draw. it owns the two viewpoints (cameras) as scene state, plus small
// camera-framing helpers, since a viewpoint is part of the document.
class Scene
{
public:
Scene();
- // world-builder content. The default object orbits clear of the hole at the
+ // world-builder content. the default object orbits clear of the hole at the
// origin (positions are in Schwarzschild radii; see BH_SCENE_RADIUS).
std::vector<SceneObject> objects{ SceneObject{ { 18.0f, 6.0f, 0.0f }, 2.0f, { 0.85f, 0.35f, 0.2f } } };
int selected_object = 0;
- // black hole / accretion disk
BlackHoleParams black_hole;
- // environment
std::string hdri_path = "assets/hdri/hdr_blue_nebulae_1.hdr";
- // viewpoints
Camera sim_camera{ 60.0f, 16.0f / 9.0f, 0.1f, 100.0f }; // black-hole view
Camera scene_camera{ 45.0f, 16.0f / 9.0f, 0.1f, 1000.0f }; // world-builder view
- // Camera framing helpers (the sim view supports orbital + free-fly).
+ // camera framing helpers (the sim view supports orbital + free-fly).
auto reset_sim_camera() -> void;
auto set_free_fly(bool enabled) -> void;
auto is_free_fly() const -> bool { return sim_camera.get_camera_mode() == CameraMode::FPS; }