refactor: scene/raytracer/camera logic
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user