Silence some warnings.

This commit is contained in:
Nathan Vegdahl 2016-07-31 11:19:30 -07:00
parent 3e7b142cd8
commit b4939f88c8
2 changed files with 3 additions and 13 deletions

View File

@ -1,7 +1,7 @@
use bbox::BBox; use bbox::BBox;
use sah::sah_split; use sah::sah_split;
use lerp::lerp_slice; use lerp::lerp_slice;
use algorithm::{partition, merge_slices_append}; use algorithm::merge_slices_append;
use math::{Vector, Point, Normal}; use math::{Vector, Point, Normal};
use shading::surface_closure::SurfaceClosure; use shading::surface_closure::SurfaceClosure;
@ -80,19 +80,8 @@ impl LightTree {
child_index: 0, child_index: 0,
}); });
// Get combined object bounds
let bounds = {
let mut bb = BBox::new();
for obj in &objects[..] {
bb |= lerp_slice(info_getter(obj).0, 0.5);
}
bb
};
// Partition objects. // Partition objects.
let (split_index, split_axis) = sah_split(objects, &|obj_ref| info_getter(obj_ref).0); let (split_index, _) = sah_split(objects, &|obj_ref| info_getter(obj_ref).0);
// Create child nodes // Create child nodes
let (_, c1_bounds) = let (_, c1_bounds) =

View File

@ -24,6 +24,7 @@ pub struct LightArray {
} }
impl LightArray { impl LightArray {
#[allow(dead_code)]
pub fn new<'a, T, F>(things: &mut [T], q: F) -> LightArray pub fn new<'a, T, F>(things: &mut [T], q: F) -> LightArray
where F: 'a + Fn(&T) -> Option<(&'a [BBox], f32)> where F: 'a + Fn(&T) -> Option<(&'a [BBox], f32)>
{ {