]> OCCT Git - occt-copy.git/commitdiff
0028495: The maximal depth of the tree is used implicitly in type 'BVH_PrimitiveSet'
authorabk <abk@opencascade.com>
Wed, 1 Mar 2017 11:22:51 +0000 (14:22 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 16 Mar 2017 07:46:14 +0000 (10:46 +0300)
Type 'BVH_PrimitiveSet' was extended by a static constant to access the maximal depth of the tree.

src/BVH/BVH_PrimitiveSet.hxx
src/BVH/BVH_PrimitiveSet.lxx

index 93b08a2553828326f82897f57d40809d8e7dafff..265b402e903d562a6e6cdc30f1a5b1901a4bd1e9 100644 (file)
@@ -35,6 +35,7 @@ protected:
   using BVH_Set<T, N>::Box;
 
 public:
+  static const Standard_Integer MaxTreeDepth = 32;
 
   //! Creates set of abstract primitives.
   BVH_PrimitiveSet();
index a2c5f701e66f28291bbea7770abbd9499b1db831..00231a635a3b5d62a31fb25f1e8c4afc2027e7e3 100644 (file)
@@ -24,7 +24,7 @@ BVH_PrimitiveSet<T, N>::BVH_PrimitiveSet()
 : myBVH (new BVH_Tree<T, N>())
 {
   // Set default builder - binned SAH split
-  myBuilder = new BVH_BinnedBuilder<T, N, 48> (5, 32);
+  myBuilder = new BVH_BinnedBuilder<T, N, 48> (5, MaxTreeDepth);
 }
 
 // =======================================================================