pub struct Camera {
pub origin: [f32; 3],
/* private fields */
}Expand description
A simple pinhole camera.
Fields§
§origin: [f32; 3]Camera origin.
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn new(
look_from: [f32; 3],
look_at: [f32; 3],
vup: [f32; 3],
vfov: f32,
aspect_ratio: f32,
aperture: f32,
focus_dist: f32,
) -> Self
pub fn new( look_from: [f32; 3], look_at: [f32; 3], vup: [f32; 3], vfov: f32, aspect_ratio: f32, aperture: f32, focus_dist: f32, ) -> Self
Construct a camera.
look_from— eye positionlook_at— target positionvup— world up vectorvfov— vertical field of view in degreesaspect_ratio— image width / heightaperture— lens aperture (0 = pinhole)focus_dist— focus distance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more