[][src]Enum tray_rust::geometry::instance::Instance

pub enum Instance {
    Emitter(Emitter),
    Receiver(Receiver),
}

Defines an instance of some geometry with its own transform and material

Variants

Emitter(Emitter)
Receiver(Receiver)

Methods

impl Instance[src]

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

Create an instance of the geometry in the scene that will only receive light.

pub fn area_light(
    geom: Arc<dyn SampleableGeom + Send + Sync>,
    material: Arc<dyn Material + Send + Sync>,
    emission: AnimatedColor,
    transform: AnimatedTransform,
    tag: String
) -> Instance
[src]

Create an instance of the geometry in the scene that will emit and receive light

pub fn point_light(
    transform: AnimatedTransform,
    emission: AnimatedColor,
    tag: String
) -> Instance
[src]

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<Intersection>[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 tag(&self) -> &str[src]

Get the tag for this instance

pub fn get_transform(&self) -> &AnimatedTransform[src]

Get the transform for this instance

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

Set the transform for this instance

Trait Implementations

impl Boundable for Instance[src]

Auto Trait Implementations

impl Send for Instance

impl Sync for Instance

impl Unpin for Instance

impl !UnwindSafe for Instance

impl !RefUnwindSafe for Instance

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]