From da1c3949a449f3fafe579c62ff6b14ffd993a197 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 21 Feb 2021 18:01:56 +0100 Subject: Add 3d bounding box and merged SceneIntersection and Intersection --- src/material/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/material/mod.rs') diff --git a/src/material/mod.rs b/src/material/mod.rs index c939385..7f920e2 100644 --- a/src/material/mod.rs +++ b/src/material/mod.rs @@ -1,4 +1,5 @@ -use crate::core::{Ray, Intersection, Spectrum}; +use crate::core::{Ray, Spectrum}; +use crate::world::Intersection; use crate::sample::Sampler; mod lambertian; @@ -7,6 +8,6 @@ mod reflectant; pub use lambertian::Lambertian; pub use reflectant::Reflectant; -pub trait Material { +pub trait Material: Sync + Send { fn scatter(&self, ray: &Ray, i: &Intersection, sampler: &mut dyn Sampler) -> Option<(Spectrum, Ray)>; } -- cgit v1.2.3