1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use crate::prelude::*;
#[allow(unused)]
pub trait Scene : Sync + Send {
fn new() -> Self where Self: Sized;
fn background(&self, ray: &Ray) -> PTF3;
fn closest_hit(&self, ray: &Ray, state: &mut State, light: &mut LightSampleRec) -> bool;
fn any_hit(&self, ray: &Ray, max_dist: PTF) -> bool;
fn camera(&self) -> &Box<dyn Camera3D>;
fn number_of_lights(&self) -> usize;
fn light_at(&self, index: usize) -> &AnalyticalLight;
fn recursion_depth(&self) -> u16 {
4
}
fn to_linear(&self, c: PTF3) -> PTF3 {
PTF3::new(c.x.powf(2.2), c.y.powf(2.2), c.z.powf(2.2))
}
}