pub struct Camera { /* private fields */ }Expand description
A positionable camera with thin-lens depth of field.
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn new(
lookfrom: Point3,
lookat: Point3,
vup: Vec3,
vfov: f64,
aspect_ratio: f64,
aperture: f64,
focus_dist: f64,
) -> Self
pub fn new( lookfrom: Point3, lookat: Point3, vup: Vec3, vfov: f64, aspect_ratio: f64, aperture: f64, focus_dist: f64, ) -> Self
lookfrom: camera origin, lookat: point the camera looks at, vup: up-direction vector.
vfov: vertical field of view (degrees), aspect_ratio: width/height ratio.
aperture: lens aperture diameter (0.0 = pinhole), focus_dist: focus distance.
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more