[][src]Struct tray_rust::geometry::intersection::Intersection

pub struct Intersection<'a, 'b> {
    pub dg: DifferentialGeometry<'a>,
    pub instance: &'b Instance,
    pub material: &'b dyn Material,
}

Stores information about an intersection that occured with some instance of geometry in the scene

Fields

dg: DifferentialGeometry<'a>

The differential geometry holding information about the piece of geometry that was hit

instance: &'b Instance

The instance of geometry that was hit

material: &'b dyn Material

The material of the instance that was hit

Methods

impl<'a, 'b> Intersection<'a, 'b>[src]

pub fn new(
    dg: DifferentialGeometry<'a>,
    inst: &'b Instance,
    mat: &'b dyn Material
) -> Intersection<'a, 'b>
[src]

Construct the Intersection from a potential hit stored in a Option. Returns None if dg is None or if the instance member of dg is None

Trait Implementations

impl<'a, 'b> Clone for Intersection<'a, 'b>[src]

impl<'a, 'b> Copy for Intersection<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> !Send for Intersection<'a, 'b>

impl<'a, 'b> !Sync for Intersection<'a, 'b>

impl<'a, 'b> Unpin for Intersection<'a, 'b>

impl<'a, 'b> !UnwindSafe for Intersection<'a, 'b>

impl<'a, 'b> !RefUnwindSafe for Intersection<'a, 'b>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]