pub struct RealisticCamera {
    pub camera_to_world: AnimatedTransform,
    pub shutter_open: Float,
    pub shutter_close: Float,
    pub film: Arc<Film>,
    pub medium: Option<Arc<Medium>>,
    pub simple_weighting: bool,
    pub element_interfaces: Vec<LensElementInterface>,
    pub exit_pupil_bounds: Vec<Bounds2f>,
}

Fields§

§camera_to_world: AnimatedTransform§shutter_open: Float§shutter_close: Float§film: Arc<Film>§medium: Option<Arc<Medium>>§simple_weighting: bool§element_interfaces: Vec<LensElementInterface>§exit_pupil_bounds: Vec<Bounds2f>

Implementations§

source§

impl RealisticCamera

source

pub fn new( camera_to_world: AnimatedTransform, shutter_open: Float, shutter_close: Float, aperture_diameter: Float, focus_distance: Float, simple_weighting: bool, lens_data: &[Float], film: Arc<Film>, medium: Option<Arc<Medium>> ) -> Self

source

pub fn create( params: &ParamSet, cam2world: AnimatedTransform, film: Arc<Film>, medium: Option<Arc<Medium>>, search_directory: Option<&PathBuf> ) -> Arc<Camera>

source

pub fn generate_ray(&self, sample: &CameraSample, ray: &mut Ray) -> Float

source

pub fn lens_rear_z(&self) -> Float

source

pub fn lens_front_z(&self) -> Float

source

pub fn rear_element_radius(&self) -> Float

source

pub fn trace_lenses_from_film( &self, r_camera: &Ray, r_out: Option<&mut Ray> ) -> bool

source

pub fn intersect_spherical_element( &self, radius: Float, z_center: Float, ray: &Ray, t: &mut Float, n: &mut Normal3f ) -> bool

source

pub fn trace_lenses_from_scene( &self, r_camera: &Ray, r_out: Option<&mut Ray> ) -> bool

source

pub fn draw_lens_system(&self)

source

pub fn draw_ray_path_from_film( &self, _r: &Ray, _arrow: bool, _to_optical_intercept: bool )

source

pub fn draw_ray_path_from_scene( &self, _r: &Ray, _arrow: bool, _to_optical_intercept: bool )

source

pub fn compute_cardinal_points( &self, r_in: &Ray, r_out: &Ray, idx: usize, pz: &mut [Float; 2], fz: &mut [Float; 2] )

source

pub fn compute_thick_lens_approximation( &self, pz: &mut [Float; 2], fz: &mut [Float; 2] )

source

pub fn focus_thick_lens(&self, focus_distance: Float) -> Float

source

pub fn focus_distance(&self, film_distance: Float) -> Float

source

pub fn bound_exit_pupil(&self, p_film_x0: Float, p_film_x1: Float) -> Bounds2f

source

pub fn render_exit_pupil(&self, _sx: Float, _sy: Float, _filename: String)

source

pub fn sample_exit_pupil( &self, p_film: Point2f, lens_sample: Point2f, sample_bounds_area: &mut Float ) -> Point3f

source

pub fn test_exit_pupil_bounds(&self)

source

pub fn generate_ray_differential( &self, sample: &CameraSample, ray: &mut Ray ) -> Float

source

pub fn we(&self, _ray: &Ray, _p_raster2: Option<&mut Point2f>) -> Spectrum

source

pub fn pdf_we(&self, _ray: &Ray) -> (Float, Float)

source

pub fn sample_wi( &self, _iref: &InteractionCommon, _lens_intr: &mut InteractionCommon, _u: Point2f, _wi: &mut Vector3f, _pdf: &mut Float, _p_raster: &mut Point2f, _vis: &mut VisibilityTester<'_, '_> ) -> Spectrum

source

pub fn get_shutter_open(&self) -> Float

source

pub fn get_shutter_close(&self) -> Float

source

pub fn get_film(&self) -> Arc<Film>

Trait Implementations§

source§

impl Clone for RealisticCamera

source§

fn clone(&self) -> RealisticCamera

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.