Added dimensionless camera

This commit is contained in:
STP
2023-11-25 13:21:24 -05:00
parent 137fb9f6d7
commit b737e35de8

View File

@@ -44,6 +44,15 @@ impl Camera {
} }
} }
pub fn new_sizeless(
eye: Point3<f32>,
target: Point3<f32>,
up: Vector3<f32>,
fovy: f32,
) -> Self {
Camera::new(eye, target, up, 1, 1, fovy)
}
pub fn unit() -> Self { pub fn unit() -> Self {
let eye = Point3::new(0.0, 0.0, 1.0); let eye = Point3::new(0.0, 0.0, 1.0);
let target = Point3::new(0.0, 0.0, 0.0); let target = Point3::new(0.0, 0.0, 0.0);