[−][src]Struct tray_rust::geometry::emitter::Emitter
An instance of geometry in the scene that receives and emits light.
Fields
emission: AnimatedColor
The light intensity emitted
tag: String
Tag to identify the instance
Methods
impl Emitter
[src]
pub fn area(
geom: Arc<dyn SampleableGeom + Send + Sync>,
material: Arc<dyn Material + Send + Sync>,
emission: AnimatedColor,
transform: AnimatedTransform,
tag: String
) -> Emitter
[src]
geom: Arc<dyn SampleableGeom + Send + Sync>,
material: Arc<dyn Material + Send + Sync>,
emission: AnimatedColor,
transform: AnimatedTransform,
tag: String
) -> Emitter
Create a new area light using the geometry passed to emit light TODO: We need sample methods for geometry to do this We also need MIS in the path tracer's direct light sampling so we get good quality
pub fn point(
transform: AnimatedTransform,
emission: AnimatedColor,
tag: String
) -> Emitter
[src]
transform: AnimatedTransform,
emission: AnimatedColor,
tag: String
) -> Emitter
Create a point light at the origin that is transformed by transform
to its location
in the world
pub fn intersect(
&self,
ray: &mut Ray
) -> Option<(DifferentialGeometry, &dyn Material)>
[src]
&self,
ray: &mut Ray
) -> Option<(DifferentialGeometry, &dyn Material)>
Test the ray for intersection against this insance of geometry.
returns Some(Intersection) if an intersection was found and None if not.
If an intersection is found ray.max_t
will be set accordingly
pub fn radiance(&self, w: &Vector, _: &Point, n: &Normal, time: f32) -> Colorf
[src]
Return the radiance emitted by the light in the direction w
from point p
on the light's surface with normal n
pub fn get_transform(&self) -> &AnimatedTransform
[src]
Get the transform to place the emitter into world space
pub fn set_transform(&mut self, transform: AnimatedTransform)
[src]
Set the transform to place the emitter into world space
Trait Implementations
impl Boundable for Emitter
[src]
fn bounds(&self, start: f32, end: f32) -> BBox
[src]
fn update_deformation(&mut self, start: f32, end: f32)
[src]
impl Light for Emitter
[src]
Auto Trait Implementations
impl Send for Emitter
impl Sync for Emitter
impl Unpin for Emitter
impl !UnwindSafe for Emitter
impl !RefUnwindSafe for Emitter
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,