From 81f18badf66dc972deef4e06edf4c9fe9d415891 Mon Sep 17 00:00:00 2001 From: Brody Brooks Date: Tue, 18 Aug 2026 15:13:23 -0400 Subject: [PATCH] Added camera class --- src/core/camera.vala | 17 +++++++++++++++++ src/meson.build | 1 + 2 files changed, 18 insertions(+) create mode 100644 src/core/camera.vala diff --git a/src/core/camera.vala b/src/core/camera.vala new file mode 100644 index 0000000..e819929 --- /dev/null +++ b/src/core/camera.vala @@ -0,0 +1,17 @@ +public class Worldbuilder.Camera : Object { + /** + * The position of the camera + */ + public Vector3 position { get; set; } + + /** + * The direction the camera is facing. + */ + public Vector3 direction { get; set; } + + public Camera (Vector3 position = Vector3 (), Vector3 direction = Vector3 (0, 0, -1)) { + this.position = position; + this.direction = direction; + } +} + diff --git a/src/meson.build b/src/meson.build index 9e9c036..875a442 100644 --- a/src/meson.build +++ b/src/meson.build @@ -7,6 +7,7 @@ worldbuilder_sources = [ 'core/vector3.vala', 'core/matrix4x4.vala', 'core/vector2.vala', + 'core/camera.vala' ] worldbuilder_deps = [