pub struct PerspectiveCamera {
    pub camera_to_world: AnimatedTransform,
    pub shutter_open: Float,
    pub shutter_close: Float,
    pub film: Arc<Film>,
    pub medium: Option<Arc<Medium>>,
    pub raster_to_camera: Transform,
    pub lens_radius: Float,
    pub focal_distance: Float,
    pub dx_camera: Vector3f,
    pub dy_camera: Vector3f,
    pub a: Float,
    /* private fields */
}

Fields§

§camera_to_world: AnimatedTransform§shutter_open: Float§shutter_close: Float§film: Arc<Film>§medium: Option<Arc<Medium>>§raster_to_camera: Transform§lens_radius: Float§focal_distance: Float§dx_camera: Vector3f§dy_camera: Vector3f§a: Float

Implementations§

source§

impl PerspectiveCamera

source

pub fn new( camera_to_world: AnimatedTransform, screen_window: Bounds2f, shutter_open: Float, shutter_close: Float, lens_radius: Float, focal_distance: Float, fov: Float, film: Arc<Film>, medium: Option<Arc<Medium>>, clipping_start: Float ) -> Self

source

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

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<'a, 'b>( &self, iref: &'a InteractionCommon, lens_intr: &'b mut InteractionCommon, u: Point2f, wi: &mut Vector3f, pdf: &mut Float, p_raster: &mut Point2f, vis: &mut VisibilityTester<'a, 'b> ) -> 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>

source

pub fn get_clipping_start(&self) -> Float

source

pub fn adjust_to_clipping_start(&self, sample: &CameraSample, ray: &mut Ray)

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, 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.