ft: 12: movable camera + camera init overhaul
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user