[−][src]Struct rpt::Camera
A simple thin-lens perspective camera
Fields
eye: DVec3
Location of the camera
direction: DVec3
Direction that the camera is facing
up: DVec3
Direction of "up" for screen, must be orthogonal to direction
fov: f64
Field of view in the longer direction as an angle in radians, in (0, pi)
aperture: f64
Aperture radius for depth-of-field effects
focal_distance: f64
Focal distance, if aperture radius is nonzero
Implementations
impl Camera
[src]
pub fn look_at(eye: DVec3, center: DVec3, up: DVec3, fov: f64) -> Self
[src]
Perspective camera looking at a point, with a given field of view
pub fn focus(self, focal_point: DVec3, aperture: f64) -> Self
[src]
Focus the camera on a position, with simulated depth-of-field
pub fn cast_ray(&self, x: f64, y: f64, rng: &mut StdRng) -> Ray
[src]
Cast a ray, where (x, y) are normalized to the standard [-1, 1] box
Trait Implementations
impl Clone for Camera
[src]
impl Copy for Camera
[src]
impl Debug for Camera
[src]
impl Default for Camera
[src]
Auto Trait Implementations
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,