From f63101c9845b807ccbf8ddeb66199e879a92244a Mon Sep 17 00:00:00 2001 From: dbp Date: Wed, 18 Jan 2017 11:30:08 +0300 Subject: [PATCH] 0028368: TKMath, BVH -- Fix invalid tree height in QBVH --- src/BVH/BVH_BinaryTree.lxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BVH/BVH_BinaryTree.lxx b/src/BVH/BVH_BinaryTree.lxx index 343288ebc7..54a036da80 100644 --- a/src/BVH/BVH_BinaryTree.lxx +++ b/src/BVH/BVH_BinaryTree.lxx @@ -293,7 +293,7 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree aNodeInfo = BVH_Vec4i (0 /* inner flag */, aNbNodes, aGrandChildNodes.Size() - 1, std::get<1> (aNode) /* level */); - aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode)); + aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode) + 1); aNbNodes += aGrandChildNodes.Size(); }