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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use std::path::PathBuf;
use film::{FrameInfo, RenderTarget};
use scene::Scene;
pub use self::multithreaded::MultiThreaded;
pub mod multithreaded;
pub mod distrib;
#[derive(Debug, Clone)]
pub struct Config {
pub out_path: PathBuf,
pub scene_file: String,
pub num_threads: u32,
pub spp: usize,
pub frame_info: FrameInfo,
pub current_frame: usize,
pub select_blocks: (usize, usize)
}
impl Config {
pub fn new(out_path: PathBuf, scene_file: String, spp: usize, num_threads: u32,
frame_info: FrameInfo, select_blocks: (usize, usize)) -> Config {
Config { out_path: out_path, scene_file: scene_file, spp: spp,
num_threads: num_threads, frame_info: frame_info,
current_frame: frame_info.start, select_blocks: select_blocks }
}
}
pub trait Exec {
fn render(&mut self, scene: &mut Scene, rt: &mut RenderTarget, config: &Config);
}