Index: trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 87)
+++ trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 91)
@@ -17,5 +17,6 @@
 	mHierarchyInterface = 
 		new OctreeHierarchyInterface(this, mDestRenderSystem);
-//	visManager->SetCullingManager(GtpVisibility::VisibilityEnvironment::STOP_AND_WAIT_CULLING);
+	//visManager->SetCullingManager(GtpVisibility::VisibilityEnvironment::STOP_AND_WAIT_CULLING);
+	
 	//mDisplayNodes = true;
 	//mShowBoundingBoxes = true;
Index: trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 89)
+++ trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 91)
@@ -50,5 +50,5 @@
 		halfbox->getRenderOperation(ro);
 		ro.srcRenderable = halfbox;
-		mRenderSystem->_render(ro);	
+		mRenderSystem->_render(ro);
 	}
 }
@@ -105,6 +105,5 @@
 	query->BeginQuery();
 			
-	// if node is leaf and was visible => 
-	// will be rendered anyway.
+	// if node is leaf and was visible => will be rendered anyway.
 	// In this case we can also test with the real geometry.
 	if(mUseOptimization && wasVisible && IsLeaf(node))
Index: trunk/VUT/Ogre/src/OgreSolidHalfBoundingBox.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreSolidHalfBoundingBox.cpp	(revision 86)
+++ trunk/VUT/Ogre/src/OgreSolidHalfBoundingBox.cpp	(revision 91)
@@ -23,24 +23,12 @@
 													const bool isFirstHalf) 
 {
-	Vector3 vmax = aab.getMaximum();
-	Vector3 vmin = aab.getMinimum();
-		
-	//Real sqLen = std::max(vmax.squaredLength(), vmin.squaredLength());
-    //mRadius = Math::Sqrt(sqLen);
-	
-	Real maxx = vmax.x;
-	Real maxy = vmax.y;
-	Real maxz = vmax.z;
-	
-	Real minx = vmin.x;
-	Real miny = vmin.y;
-	Real minz = vmin.z;
-	
+	const Vector3& min = aab.getMinimum();
+    const Vector3& max = aab.getMaximum();
+
 	// fill the vertex buffer: 12 lines with 2 endpoints each make up a box
     HardwareVertexBufferSharedPtr vbuf =
         mRenderOp.vertexData->vertexBufferBinding->getBuffer(POSITION_BINDING);     
 
-    float* pPos = static_cast<float*>(
-        vbuf->lock(HardwareBuffer::HBL_DISCARD));
+    float* pPos = static_cast<float*>(vbuf->lock(HardwareBuffer::HBL_DISCARD));
 
 	//     5+------+7
@@ -56,26 +44,26 @@
 	if(isFirstHalf)
 	{
-		*pPos++ = minx; *pPos++ = maxy; *pPos++ = maxz; //011
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
-		*pPos++ = maxx; *pPos++ = miny; *pPos++ = maxz; //101
-		*pPos++ = maxx; *pPos++ = maxy; *pPos++ = maxz; //111
+		*pPos++ = min.x; *pPos++ = max.y; *pPos++ = max.z; //011
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = max.z; //001
+		*pPos++ = max.x; *pPos++ = min.y; *pPos++ = max.z; //101
+		*pPos++ = max.x; *pPos++ = max.y; *pPos++ = max.z; //111
 		
-		*pPos++ = maxx; *pPos++ = maxy; *pPos++ = minz; //110
-		*pPos++ = minx; *pPos++ = maxy; *pPos++ = minz; //010
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
+		*pPos++ = max.x; *pPos++ = max.y; *pPos++ = min.z; //110
+		*pPos++ = min.x; *pPos++ = max.y; *pPos++ = min.z; //010
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = min.z; //000
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = max.z; //001
 	}
 	else
 	// fan 2
 	{
-		*pPos++ = maxx; *pPos++ = miny; *pPos++ = minz; //100
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000 					
-		*pPos++ = minx; *pPos++ = maxy; *pPos++ = minz; //010
-		*pPos++ = maxx; *pPos++ = maxy; *pPos++ = minz; //110
+		*pPos++ = max.x; *pPos++ = min.y; *pPos++ = min.z; //100
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = min.z; //000 					
+		*pPos++ = min.x; *pPos++ = max.y; *pPos++ = min.z; //010
+		*pPos++ = max.x; *pPos++ = max.y; *pPos++ = min.z; //110
 
-		*pPos++ = maxx; *pPos++ = maxy; *pPos++ = maxz; //111
-		*pPos++ = maxx; *pPos++ = miny; *pPos++ = maxz; //101
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
-		*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000
+		*pPos++ = max.x; *pPos++ = max.y; *pPos++ = max.z; //111
+		*pPos++ = max.x; *pPos++ = min.y; *pPos++ = max.z; //101
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = max.z; //001
+		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = min.z; //000
 	}
 
@@ -83,12 +71,16 @@
 }
 //-----------------------------------------------------------------------
-void SolidHalfBoundingBox::SetupBoundingBox(const AxisAlignedBox& aabb, 
+void SolidHalfBoundingBox::SetupBoundingBox(const AxisAlignedBox& aab, 
 											const bool isFirstHalf) 
 {
 	// init the vertices to the aabb
-	SetupBoundingBoxVertices(aabb, isFirstHalf);
+	SetupBoundingBoxVertices(aab, isFirstHalf);
+
+	Real sqLen = std::max(aab.getMaximum().squaredLength(), 
+						  aab.getMinimum().squaredLength());
+    mRadius = Math::Sqrt(sqLen);
 
     // setup the bounding box of this SimpleRenderable
-	//setBoundingBox(aabb);
+	setBoundingBox(aab);
 }
 //-----------------------------------------------------------------------
