clray

diff src/scene.h @ 25:58642a8316b7

continuing with the kdtree
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Aug 2010 07:00:04 +0100
parents 13091c00d7ca
children c740ae431d51
line diff
     1.1 --- a/src/scene.h	Sat Aug 14 03:02:52 2010 +0100
     1.2 +++ b/src/scene.h	Sat Aug 14 07:00:04 2010 +0100
     1.3 @@ -33,6 +33,13 @@
     1.4  	int matid;
     1.5  };
     1.6  
     1.7 +class AABBox {
     1.8 +public:
     1.9 +	float min[4], max[4];
    1.10 +
    1.11 +	float calc_surface_area() const;
    1.12 +};
    1.13 +
    1.14  enum {
    1.15  	KDAXIS_X,
    1.16  	KDAXIS_Y,
    1.17 @@ -48,9 +55,10 @@
    1.18  struct KDNode {
    1.19  	int axis;
    1.20  	float pt;
    1.21 +	AABBox aabb;
    1.22  
    1.23  	KDNode *left, *right;
    1.24 -	std::list<Face*> faces;
    1.25 +	std::list<const Face*> faces;
    1.26  };
    1.27  
    1.28  struct KDNodeGPU {