pub fn compute_scattering_functions(
        &self,
        si: &mut SurfaceInteraction,
        // arena: &mut Arena,
        mode: TransportMode,
        allow_multiple_lobes: bool,
        mat: Option<Arc<Material>>,
        scale: Option<Spectrum>,
    ) {
        match self {
            Material::Disney(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Fourier(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Glass(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Hair(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Matte(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Metal(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Mirror(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Mix(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Plastic(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Substrate(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Subsurface(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Translucent(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Uber(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
        }
    }
/// The method is given a **SurfaceInteraction** object that
/// contains geometric properties at an intersection point on the
/// surface of a shape and is responsible for determining the
/// reflective properties at the point and initializing some
/// member variables.
The method is given a **SurfaceInteraction** object that
contains geometric properties at an intersection point on the
surface of a shape and is responsible for determining the
reflective properties at the point and initializing some
member variables.
The method is given a ** SurfaceInteraction ** object that contains geometric properties at an intersection point on the surface of a shape and is responsible for determining the reflective properties at the point and initializing some member variables .
pub fn compute_scattering_functions(
        &self,
        si: &mut SurfaceInteraction,
        // arena: &mut Arena,
        mode: TransportMode,
        allow_multiple_lobes: bool,
        mat: Option<Arc<Material>>,
        scale: Option<Spectrum>,
    ) {
        match self {
            Material::Disney(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Fourier(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Glass(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Hair(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Matte(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Metal(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Mirror(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Mix(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Plastic(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Substrate(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Subsurface(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Translucent(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
            Material::Uber(material) => {
                material.compute_scattering_functions(si, mode, allow_multiple_lobes, mat, scale)
            }
        }
    }
pub fn compute_scattering_functions ( & self , si : & mut SurfaceInteraction , // arena: &mut Arena, mode : TransportMode , allow_multiple_lobes : bool , mat : Option < Arc < Material > > , scale : Option < Spectrum > , ) { match self { Material :: Disney ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Fourier ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Glass ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Hair ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Matte ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Metal ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Mirror ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Mix ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Plastic ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Substrate ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Subsurface ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Translucent ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } Material :: Uber ( material ) => { material . compute_scattering_functions ( si , mode , allow_multiple_lobes , mat , scale ) } } }
The method is given a **SurfaceInteraction** object that
contains geometric properties at an intersection point on the
surface of a shape and is responsible for determining the
reflective properties at the point and initializing some
member variables.
The method is given a ** SurfaceInteraction ** object that contains geometric properties at an intersection point on the surface of a shape and is responsible for determining the reflective properties at the point and initializing some member variables .
&self
si
&mut SurfaceInteraction
mode
TransportMode
allow_multiple_lobes
bool
mat
Option<Arc<Material>>
scale
Option<Spectrum>