[][src]Struct tray_rust::geometry::receiver::Receiver

pub struct Receiver {
    pub material: Arc<dyn Material + Send + Sync>,
    pub tag: String,
    // some fields omitted
}

An instance of geometry in the scene that only receives light

Fields

material: Arc<dyn Material + Send + Sync>

The material being used by this instance.

tag: String

Tag to identify the instance

Methods

impl Receiver[src]

pub fn new(
    geom: Arc<dyn BoundableGeom + Send + Sync>,
    material: Arc<dyn Material + Send + Sync>,
    transform: AnimatedTransform,
    tag: String
) -> Receiver
[src]

Create a new instance of some geometry in the scene

pub fn intersect(
    &self,
    ray: &mut Ray
) -> Option<(DifferentialGeometry, &dyn Material)>
[src]

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 get_transform(&self) -> &AnimatedTransform[src]

Get the transform to place the receiver into world space

pub fn set_transform(&mut self, transform: AnimatedTransform)[src]

Set the transform to place the receiver into world space

Trait Implementations

impl Boundable for Receiver[src]

Auto Trait Implementations

impl Send for Receiver

impl Sync for Receiver

impl Unpin for Receiver

impl !UnwindSafe for Receiver

impl !RefUnwindSafe for Receiver

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> SetParameter for T[src]