Change testscene interface
This commit is contained in:
parent
829476c602
commit
0b3daf9441
12 changed files with 313 additions and 223 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue