Added some dev printing info.

This commit is contained in:
Nathan Vegdahl 2017-04-13 22:50:47 -07:00
parent 573c5da5ab
commit 8b1e3a3cdb
4 changed files with 12 additions and 4 deletions

View File

@ -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>),

View File

@ -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>],

View File

@ -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;

View File

@ -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::<Ray>());
println!("AccelRay size: {} bytes", mem::size_of::<AccelRay>());
println!("LightPath size: {} bytes", mem::size_of::<LightPath>());
println!("BBox size: {} bytes", mem::size_of::<BBox>());
println!("BBox4 size: {} bytes", mem::size_of::<BBox4>());
println!("BVHNode size: {} bytes", mem::size_of::<BVHNode>());
println!("BVH4Node size: {} bytes", mem::size_of::<BVH4Node>());
return;
}