refactor: scene/raytracer/camera logic

This commit is contained in:
2026-05-08 17:16:21 +02:00
parent 549707fbb3
commit 383f739808
5 changed files with 82 additions and 20 deletions

View File

@@ -38,6 +38,22 @@ impl Scene {
max_depth,
}
}
pub fn get_camera(&self) -> &Camera {
&self.camera
}
pub fn get_image_width(&self) -> f32 {
self.image_width as f32
}
pub fn get_image_height(&self) -> f32 {
self.image_height as f32
}
pub fn init(&mut self) {
self.camera.init(self.get_image_width(), self.get_image_height());
}
}
#[derive(Deserialize)]