clray
diff src/scene.h @ 26:c740ae431d51
continuing with the kdtree construction
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 17 Aug 2010 01:19:43 +0100 |
parents | 58642a8316b7 |
children | 8b2f2ad14ae7 |
line diff
1.1 --- a/src/scene.h Sat Aug 14 07:00:04 2010 +0100 1.2 +++ b/src/scene.h Tue Aug 17 01:19:43 2010 +0100 1.3 @@ -56,9 +56,13 @@ 1.4 int axis; 1.5 float pt; 1.6 AABBox aabb; 1.7 + float cost; 1.8 1.9 KDNode *left, *right; 1.10 + int num_faces; // cause on some implementations list::size() is O(n) 1.11 std::list<const Face*> faces; 1.12 + 1.13 + KDNode(); 1.14 }; 1.15 1.16 struct KDNodeGPU { 1.17 @@ -97,4 +101,15 @@ 1.18 void build_kdtree(); 1.19 }; 1.20 1.21 +enum { 1.22 + ACCEL_PARAM_MAX_TREE_DEPTH, 1.23 + ACCEL_PARAM_MAX_NODE_ITEMS, 1.24 + ACCEL_PARAM_COST_TRAVERSE, 1.25 + ACCEL_PARAM_COST_INTERSECT, 1.26 + 1.27 + NUM_ACCEL_PARAMS 1.28 +}; 1.29 + 1.30 +void set_accel_param(int p, int v); 1.31 + 1.32 #endif /* MESH_H_ */