ft: 12: movable camera + camera init overhaul

This commit is contained in:
2026-04-25 03:55:44 +02:00
parent ffad2f12e4
commit 5f2c419af5
3 changed files with 118 additions and 33 deletions

View File

@@ -37,6 +37,12 @@ fn main() {
world.push(Sphere::xyz(1., 0., -1.0, 0.5, right.clone()));
world.push(Sphere::xyz(0., 0.7, -0.4, 0.2, blue.clone()));
let c = Camera::new(16. / 9., 1920, 3, 50);
let mut c = Camera::new(400, 300);
// let mut c = Camera::new(1920, 1080);
c.set_fov(20.);
c.set_anti_alias_rate(2);
c.set_max_depth(90);
c.set_look_from(Vec3::new(-2., 2., 1.));
c.set_look_at(Vec3::new(0., 0., -1.));
c.render(&world);
}