[][src]Struct pbrt::lights::infinite::InfiniteAreaLight

pub struct InfiniteAreaLight {
    pub lmap: Arc<MipMap<Spectrum>>,
    pub world_center: RwLock<Point3f>,
    pub world_radius: RwLock<Float>,
    pub distribution: Arc<Distribution2D>,
    pub flags: u8,
    pub n_samples: i32,
    pub medium_interface: MediumInterface,
    pub light_to_world: Transform,
    pub world_to_light: Transform,
}

Fields

lmap: Arc<MipMap<Spectrum>>world_center: RwLock<Point3f>world_radius: RwLock<Float>distribution: Arc<Distribution2D>flags: u8n_samples: i32medium_interface: MediumInterfacelight_to_world: Transformworld_to_light: Transform

Methods

impl InfiniteAreaLight[src]

pub fn new(
    light_to_world: &Transform,
    l: &Spectrum,
    n_samples: i32,
    texmap: String
) -> Self
[src]

pub fn new_hdr(
    light_to_world: &Transform,
    l: &Spectrum,
    n_samples: i32,
    texmap: String
) -> Self
[src]

pub fn sample_li(
    &self,
    iref: &InteractionCommon,
    u: &Point2f,
    wi: &mut Vector3f,
    pdf: &mut Float,
    vis: &mut VisibilityTester
) -> Spectrum
[src]

pub fn power(&self) -> Spectrum[src]

Like directional lights, the total power from the infinite area light is related to the surface area of the scene. Like many other lights the power computed here is approximate.

pub fn preprocess(&self, scene: &Scene)[src]

Like DistanceLights, InfiniteAreaLights also need the scene bounds; here again, the preprocess() method finds the scene bounds after all of the scene geometry has been created.

pub fn le(&self, ray: &mut Ray) -> Spectrum[src]

Because infinte area lights need to be able to contribute radiance to rays that don't hit any geometry in the scene, we'll add a method to the base Light class that returns emitted radiance due to that light along a ray that escapes the scene bounds. It's the responsibility of the integrators to call this method for these rays.

pub fn pdf_li(&self, _iref: &dyn Interaction, w: Vector3f) -> Float[src]

pub fn sample_le(
    &self,
    u1: &Point2f,
    u2: &Point2f,
    time: Float,
    ray: &mut Ray,
    n_light: &mut Normal3f,
    pdf_pos: &mut Float,
    pdf_dir: &mut Float
) -> Spectrum
[src]

pub fn pdf_le(
    &self,
    ray: &Ray,
    _n_light: &Normal3f,
    pdf_pos: &mut Float,
    pdf_dir: &mut Float
)
[src]

pub fn get_flags(&self) -> u8[src]

pub fn get_n_samples(&self) -> i32[src]

Auto Trait Implementations

impl Send for InfiniteAreaLight

impl Unpin for InfiniteAreaLight

impl Sync for InfiniteAreaLight

impl UnwindSafe for InfiniteAreaLight

impl RefUnwindSafe for InfiniteAreaLight

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]