--- a/include/octree.h Mon Sep 08 20:14:24 2014 +0200
+++ b/include/octree.h Tue Jul 26 17:41:36 2016 +0200
@@ -73,18 +73,13 @@
*/
class Octree: public Container
{
+ static const int MAX_DEPTH;
OctreeNode *root;
- const int max_depth;
bool built;
public:
- /** default constructor,
- * maximum depth of tree is set to 10 */
- Octree() : Container(), root(NULL), max_depth(10), built(false) {};
+ Octree() : Container(), root(NULL), built(false) {};
+ ~Octree() { if (root) delete root; };
- /** constructor
- * @param[in] maxdepth maximum depth of the tree */
- Octree(int maxdepth) : Container(), root(NULL), max_depth(maxdepth), built(false) {};
- ~Octree() { if (root) delete root; };
void addShape(const Shape* aShape) { Container::addShape(aShape); built = false; };
const Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray,
Float &nearest_distance);