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§
Source§impl 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 Freeze for Light
impl !RefUnwindSafe for Light
impl Send for Light
impl Sync for Light
impl Unpin for Light
impl !UnwindSafe for Light
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more