pub enum Light {
DiffuseArea(Box<DiffuseAreaLight>),
Distant(Box<DistantLight>),
GonioPhotometric(Box<GonioPhotometricLight>),
InfiniteArea(Box<InfiniteAreaLight>),
Point(Box<PointLight>),
Projection(Box<ProjectionLight>),
Spot(Box<SpotLight>),
}
Variants
DiffuseArea(Box<DiffuseAreaLight>)
Distant(Box<DistantLight>)
GonioPhotometric(Box<GonioPhotometricLight>)
InfiniteArea(Box<InfiniteAreaLight>)
Point(Box<PointLight>)
Projection(Box<ProjectionLight>)
Spot(Box<SpotLight>)
Implementations
sourceimpl Light
impl Light
sourcepub fn sample_li<'a, 'b>(
&'b self,
iref: &'a InteractionCommon,
light_intr: &'b mut InteractionCommon,
u: Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester<'a, 'b>
) -> Spectrum
pub fn sample_li<'a, 'b>(
&'b self,
iref: &'a InteractionCommon,
light_intr: &'b mut InteractionCommon,
u: Point2f,
wi: &mut Vector3f,
pdf: &mut Float,
vis: &mut VisibilityTester<'a, 'b>
) -> Spectrum
Returns the radiance arriving at a point at a certain time due to the light, assuming there are no occluding objects between them.
pub fn power(&self) -> Spectrum
pub fn preprocess(&self, scene: &Scene)
pub fn le(&self, ray: &Ray) -> Spectrum
pub fn pdf_li(&self, iref: &dyn Interaction, wi: &Vector3f) -> Float
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
pub fn pdf_le(
&self,
ray: &Ray,
n_light: &Normal3f,
pdf_pos: &mut Float,
pdf_dir: &mut Float
)
pub fn get_flags(&self) -> u8
pub fn get_n_samples(&self) -> i32
pub fn l(&self, intr: &InteractionCommon, w: &Vector3f) -> Spectrum
Auto Trait Implementations
impl !RefUnwindSafe for Light
impl Send for Light
impl Sync for Light
impl Unpin for Light
impl !UnwindSafe for Light
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