diff --git a/src/accel/bvh.rs b/src/accel/bvh.rs index 373209c..075df2f 100644 --- a/src/accel/bvh.rs +++ b/src/accel/bvh.rs @@ -18,7 +18,7 @@ pub struct BVH<'a> { } #[derive(Copy, Clone, Debug)] -enum BVHNode<'a> { +pub enum BVHNode<'a> { Internal { bounds: &'a [BBox], children: (&'a BVHNode<'a>, &'a BVHNode<'a>), diff --git a/src/accel/bvh4.rs b/src/accel/bvh4.rs index 88f5a64..c5311f7 100644 --- a/src/accel/bvh4.rs +++ b/src/accel/bvh4.rs @@ -29,7 +29,7 @@ pub struct BVH4<'a> { } #[derive(Copy, Clone, Debug)] -enum BVH4Node<'a> { +pub enum BVH4Node<'a> { Internal { bounds: &'a [BBox4], children: &'a [BVH4Node<'a>], diff --git a/src/accel/mod.rs b/src/accel/mod.rs index 3bde84d..34b8a41 100644 --- a/src/accel/mod.rs +++ b/src/accel/mod.rs @@ -8,8 +8,8 @@ mod objects_split; use math::{Vector, Point, Normal}; use shading::surface_closure::SurfaceClosure; -pub use self::bvh::BVH; -pub use self::bvh4::BVH4; +pub use self::bvh::{BVH, BVHNode}; +pub use self::bvh4::{BVH4, BVH4Node}; pub use self::light_tree::LightTree; diff --git a/src/main.rs b/src/main.rs index 6db9bb1..87b9a01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,6 +58,10 @@ use mem_arena::MemArena; use parse::{parse_scene, DataTree}; use ray::{Ray, AccelRay}; use renderer::LightPath; +use bbox::BBox; +use bbox4::BBox4; +use accel::BVHNode; +use accel::BVH4Node; use timer::Timer; @@ -121,6 +125,10 @@ fn main() { println!("Ray size: {} bytes", mem::size_of::()); println!("AccelRay size: {} bytes", mem::size_of::()); println!("LightPath size: {} bytes", mem::size_of::()); + println!("BBox size: {} bytes", mem::size_of::()); + println!("BBox4 size: {} bytes", mem::size_of::()); + println!("BVHNode size: {} bytes", mem::size_of::()); + println!("BVH4Node size: {} bytes", mem::size_of::()); return; }