Change testscene interface

This commit is contained in:
hal8174 2025-01-02 23:17:17 +01:00
parent 829476c602
commit 0b3daf9441
12 changed files with 313 additions and 223 deletions

View file

@ -1,7 +1,7 @@
use crate::prelude::*;
use std::fmt::Debug;
pub trait Light<R: Rng>: Sync + Debug {
pub trait Light<R: Rng>: Send + Sync + Debug {
fn emit(&self, w_in: Dir3, rng: &mut R) -> Color;
}

View file

@ -2,7 +2,7 @@ use crate::prelude::*;
use std::fmt::Debug;
/// All calculations for the material are done a tangent space of the intersection.
pub trait Material<R: Rng>: Sync + Debug {
pub trait Material<R: Rng>: Send + Sync + Debug {
fn eval(&self, w_in: Dir3, w_out: Dir3, rng: &mut R) -> Color;
fn sample(&self, w_in: Dir3, rng: &mut R) -> SampleResult {