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
sourceimpl RealisticCamera
impl RealisticCamera
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
pub fn create(
params: &ParamSet,
cam2world: AnimatedTransform,
film: Arc<Film>,
medium: Option<Arc<Medium>>,
search_directory: Option<&PathBuf>
) -> Arc<Camera>
pub fn generate_ray(&self, sample: &CameraSample, ray: &mut Ray) -> Float
pub fn lens_rear_z(&self) -> Float
pub fn lens_front_z(&self) -> Float
pub fn rear_element_radius(&self) -> Float
pub fn trace_lenses_from_film(
&self,
r_camera: &Ray,
r_out: Option<&mut Ray>
) -> bool
pub fn intersect_spherical_element(
&self,
radius: Float,
z_center: Float,
ray: &Ray,
t: &mut Float,
n: &mut Normal3f
) -> bool
pub fn trace_lenses_from_scene(
&self,
r_camera: &Ray,
r_out: Option<&mut Ray>
) -> bool
pub fn draw_lens_system(&self)
pub fn draw_ray_path_from_film(
&self,
_r: &Ray,
_arrow: bool,
_to_optical_intercept: bool
)
pub fn draw_ray_path_from_scene(
&self,
_r: &Ray,
_arrow: bool,
_to_optical_intercept: bool
)
pub fn compute_cardinal_points(
&self,
r_in: &Ray,
r_out: &Ray,
idx: usize,
pz: &mut [Float; 2],
fz: &mut [Float; 2]
)
pub fn compute_thick_lens_approximation(
&self,
pz: &mut [Float; 2],
fz: &mut [Float; 2]
)
pub fn focus_thick_lens(&self, focus_distance: Float) -> Float
pub fn focus_binary_search(&self, focus_distance: Float) -> Float
pub fn focus_distance(&self, film_distance: Float) -> Float
pub fn bound_exit_pupil(&self, p_film_x0: Float, p_film_x1: Float) -> Bounds2f
pub fn render_exit_pupil(&self, _sx: Float, _sy: Float, _filename: String)
pub fn sample_exit_pupil(
&self,
p_film: Point2f,
lens_sample: Point2f,
sample_bounds_area: &mut Float
) -> Point3f
pub fn test_exit_pupil_bounds(&self)
pub fn generate_ray_differential(
&self,
sample: &CameraSample,
ray: &mut Ray
) -> Float
pub fn we(&self, _ray: &Ray, _p_raster2: Option<&mut Point2f>) -> Spectrum
pub fn pdf_we(&self, _ray: &Ray) -> (Float, Float)
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
pub fn get_shutter_open(&self) -> Float
pub fn get_shutter_close(&self) -> Float
pub fn get_film(&self) -> Arc<Film>
Trait Implementations
sourceimpl Clone for RealisticCamera
impl Clone for RealisticCamera
sourcefn clone(&self) -> RealisticCamera
fn clone(&self) -> RealisticCamera
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for RealisticCamera
impl Send for RealisticCamera
impl Sync for RealisticCamera
impl Unpin for RealisticCamera
impl UnwindSafe for RealisticCamera
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more