From b737e35de8898c5efc74b192833857abe5e0bf79 Mon Sep 17 00:00:00 2001 From: STP Date: Sat, 25 Nov 2023 13:21:24 -0500 Subject: [PATCH] Added dimensionless camera --- src/camera.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/camera.rs b/src/camera.rs index 531ca73..b14455a 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -44,6 +44,15 @@ impl Camera { } } + pub fn new_sizeless( + eye: Point3, + target: Point3, + up: Vector3, + fovy: f32, + ) -> Self { + Camera::new(eye, target, up, 1, 1, fovy) + } + pub fn unit() -> Self { let eye = Point3::new(0.0, 0.0, 1.0); let target = Point3::new(0.0, 0.0, 0.0);