Remove vestigal option and extraneous use statements.

This commit is contained in:
Bill Thiede 2019-02-05 19:55:31 -08:00
parent bf9e226899
commit 23ac418dcb
4 changed files with 3 additions and 12 deletions

View File

@ -32,7 +32,7 @@ fn main() -> Result<(), std::io::Error> {
.start(pprof_path.to_str().unwrap().as_bytes())
.unwrap();
}
let res = render(scene, &opt.output, opt.store_intermediate);
let res = render(scene, &opt.output);
if let Some(pprof_path) = opt.pprof {
info!("Saving pprof to {}", pprof_path.to_string_lossy());
PROFILER.lock().unwrap().stop().unwrap();

View File

@ -20,7 +20,6 @@ use hitable::Hit;
use ray::Ray;
use scenes;
use texture::EnvMap;
use texture::Texture;
use vec3::Vec3;
#[derive(Debug)]
@ -101,9 +100,6 @@ pub struct Opt {
/// Use acceleration data structure, may be BVH or kd-tree depending on scene.
#[structopt(long = "use_accel")]
pub use_accel: bool,
/// Store intermediate images when -s > 1
#[structopt(long = "store_intermediate")]
pub store_intermediate: bool,
/// Output directory
#[structopt(parse(from_os_str), default_value = "/tmp/tracer")]
@ -213,11 +209,7 @@ fn render_worker(
trace!(target: "renderer", "Shutting down worker {}", tid);
}
pub fn render(
scene: Scene,
output_dir: &Path,
store_intermediate: bool,
) -> std::result::Result<(), std::io::Error> {
pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::io::Error> {
let (pixel_req_tx, pixel_req_rx) = channel::unbounded();
let (pixel_resp_tx, pixel_resp_rx) = channel::unbounded();

View File

@ -28,7 +28,7 @@ pub fn new(opt: &Opt) -> Scene {
lookfrom,
lookat,
Vec3::new(0., 1., 0.),
20.,
50.,
opt.width as f32 / opt.height as f32,
aperture,
dist_to_focus,

View File

@ -7,7 +7,6 @@ use hitable::Hit;
use hitable_list::HitableList;
use kdtree::KDTree;
use material::Lambertian;
use noise::lode::Lode;
use noise::perlin::Perlin;
use noise::NoiseType;
use renderer::Opt;