From ad53aa78cc4200b4d31cb53e8b98dc597517eae5 Mon Sep 17 00:00:00 2001 From: kearwood Date: Sat, 27 Oct 2012 01:29:05 +0000 Subject: [PATCH] Corrected major octree generation bug, which resulted in incorrect culling --HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%40147 --- KREngine/KREngine/Classes/KROctree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KREngine/KREngine/Classes/KROctree.cpp b/KREngine/KREngine/Classes/KROctree.cpp index d8bb385..fb03d5a 100644 --- a/KREngine/KREngine/Classes/KROctree.cpp +++ b/KREngine/KREngine/Classes/KROctree.cpp @@ -43,7 +43,7 @@ void KROctree::add(KRNode *pNode) if(nodeBounds.min.x < rootBounds.min.x || nodeBounds.min.y < rootBounds.min.y || nodeBounds.min.z < rootBounds.min.z) { m_pRootNode = new KROctreeNode(KRAABB(rootBounds.min - rootSize, rootBounds.max), 7, m_pRootNode); } else if(nodeBounds.max.x > rootBounds.max.x || nodeBounds.max.y > rootBounds.max.y || nodeBounds.max.z > rootBounds.max.z) { - m_pRootNode = new KROctreeNode(KRAABB(rootBounds.max, rootBounds.max + rootSize), 0, m_pRootNode); + m_pRootNode = new KROctreeNode(KRAABB(rootBounds.min, rootBounds.max + rootSize), 0, m_pRootNode); } else { bInsideRoot = true; }