[][src]Trait tray_rust::material::Material

pub trait Material {
    fn bsdf<'a, 'b, 'c>(
        &'a self,
        hit: &Intersection<'a, 'b>,
        alloc: &'c Allocator
    ) -> BSDF<'c>
    where
        'a: 'c
; }

Trait implemented by materials. Provides method to get the BSDF describing the material properties at the intersection

Required methods

fn bsdf<'a, 'b, 'c>(
    &'a self,
    hit: &Intersection<'a, 'b>,
    alloc: &'c Allocator
) -> BSDF<'c> where
    'a: 'c, 

Get the BSDF for the material which defines its properties at the hit point.

We have the lifetime constraint on the returned BSDF to enforce it does not outlive the material which produced it. This allows us to borrow things from the parent material in the BxDFs making up the BSDF.

Loading content...

Implementors

impl Material for Glass[src]

impl Material for Matte[src]

impl Material for Merl[src]

impl Material for Metal[src]

impl Material for Plastic[src]

impl Material for RoughGlass[src]

impl Material for SpecularMetal[src]

Loading content...