include/kdtree.h
branchpyrit
changeset 103 3b3257a410fe
parent 98 64638385798a
--- a/include/kdtree.h	Mon Sep 08 20:14:24 2014 +0200
+++ b/include/kdtree.h	Tue Jul 26 17:41:36 2016 +0200
@@ -84,19 +84,15 @@
  */
 class KdTree: public Container
 {
+	static const int MAX_DEPTH;
 	MemoryPool<KdNode> mempool;
 	KdNode *root;
-	const int max_depth;
 	bool built;
 
 	void recursive_build(KdNode *node, const BBox &bbox, int maxdepth);
 	void recursive_load(istream &st, KdNode *node);
 public:
-	/** default constructor, maximum depth is set to 32 */
-	KdTree(): Container(), mempool(64), root(NULL), max_depth(32), built(false) {};
-
-	/** constructor which allows to se maximum tree depth (cannot be changed later) */
-	KdTree(int maxdepth): Container(), mempool(64), root(NULL), max_depth(maxdepth), built(false) {};
+	KdTree(): Container(), mempool(64), root(NULL), built(false) {};
 	~KdTree() { if (root) delete root; };
 
 	/** add shape pointer to the container */