Index: trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp	(revision 44)
+++ trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingOctreeSceneManager.cpp	(revision 45)
@@ -1,9 +1,7 @@
-#include "OgreOcclusionCullingTerrainSceneManager.h"
+#include "OgreOcclusionCullingOctreeSceneManager.h"
 #include "OgreMath.h"
 #include "OgreIteratorWrappers.h"
 #include "OgreRenderSystem.h"
 #include "OgreCamera.h"
-#include "OgreHardwareOcclusionQuery.h"
-#include "OgreSolidHalfBoundingBox.h"
 
 #include <windows.h>
@@ -11,8 +9,8 @@
 namespace Ogre {
 	//-----------------------------------------------------------------------
-	OcclusionCullingTerrainSceneManager::OcclusionCullingTerrainSceneManager()
+	OcclusionCullingOctreeSceneManager::OcclusionCullingOctreeSceneManager()
 	{
-		mOcclusionCullingTerrainSceneTraverser = 
-			new OcclusionCullingTerrainSceneTraverser(this, mDestRenderSystem);
+		mOcclusionCullingOctreeSceneTraverser = 
+			new OcclusionCullingOctreeSceneTraverser(this, mDestRenderSystem);
 
 		//mDisplayNodes = true;
@@ -22,10 +20,10 @@
 	}
 	//-----------------------------------------------------------------------
-	OcclusionCullingTerrainSceneManager::~OcclusionCullingTerrainSceneManager()
+	OcclusionCullingOctreeSceneManager::~OcclusionCullingOctreeSceneManager()
 	{
-		delete mOcclusionCullingTerrainSceneTraverser;
+		delete mOcclusionCullingOctreeSceneTraverser;
 	}
 	//-----------------------------------------------------------------------
-	void OcclusionCullingTerrainSceneManager::_renderVisibleObjects(void)
+	void OcclusionCullingOctreeSceneManager::_renderVisibleObjects(void)
 	{
 		//-- render background
@@ -43,6 +41,6 @@
 		setSpecialCaseRenderQueueMode(SceneManager::SCRQM_EXCLUDE);
 
-		mOcclusionCullingTerrainSceneTraverser->setSceneRoot(mOctree);
-		mOcclusionCullingTerrainSceneTraverser->renderScene(mCameraInProgress);
+		mOcclusionCullingOctreeSceneTraverser->setSceneRoot(mOctree);
+		mOcclusionCullingOctreeSceneTraverser->renderScene(mCameraInProgress);
 		
 		_deleteRenderedQueueGroups();
@@ -55,5 +53,5 @@
 	}
 	//-----------------------------------------------------------------------
-	void OcclusionCullingTerrainSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)
+	void OcclusionCullingOctreeSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)
 	{
 		// must be empty because objects are found and rendered in an interleaved fashion
@@ -62,38 +60,38 @@
 	}
 	//-----------------------------------------------------------------------
-	void OcclusionCullingTerrainSceneManager::_updateSceneGraph(Camera* cam)
+	void OcclusionCullingOctreeSceneManager::_updateSceneGraph(Camera* cam)
 	{
 		//char *msg = "now updating scenegraph\n"; OutputDebugString(msg);
-		//mOcclusionCullingTerrainSceneTraverser->preprocess();
+		//mOcclusionCullingOctreeSceneTraverser->preprocess();
 
-     	mOcclusionCullingTerrainSceneTraverser->setNumSceneNodes((int)mSceneNodes.size());
-		mOcclusionCullingTerrainSceneTraverser->setRenderSystem(mDestRenderSystem);
+     	mOcclusionCullingOctreeSceneTraverser->setNumSceneNodes((int)mSceneNodes.size());
+		mOcclusionCullingOctreeSceneTraverser->setRenderSystem(mDestRenderSystem);
         
-		mOcclusionCullingTerrainSceneTraverser->setNumOctreeNodes(mNumOctreeNodes);
+		mOcclusionCullingOctreeSceneTraverser->setNumOctreeNodes(mNumOctreeNodes);
 
-		TerrainSceneManager::_updateSceneGraph(cam);
+		OctreeSceneManager::_updateSceneGraph(cam);
 	}
 	//-----------------------------------------------------------------------
-	bool OcclusionCullingTerrainSceneManager::setOption( const String & key, const void * val )
+	bool OcclusionCullingOctreeSceneManager::setOption( const String & key, const void * val )
 	{
-		return mOcclusionCullingTerrainSceneTraverser->setOption( key, val) || TerrainSceneManager::setOption( key, val );
+		return mOcclusionCullingOctreeSceneTraverser->setOption( key, val) || OctreeSceneManager::setOption( key, val );
 	}
 	//-----------------------------------------------------------------------
-	bool OcclusionCullingTerrainSceneManager::getOption( const String & key, void *val )
+	bool OcclusionCullingOctreeSceneManager::getOption( const String & key, void *val )
 	{
-		return mOcclusionCullingTerrainSceneTraverser->getOption( key, val) || TerrainSceneManager::getOption( key, val ) ;
+		return mOcclusionCullingOctreeSceneTraverser->getOption( key, val) || OctreeSceneManager::getOption( key, val ) ;
 	}
 	//-----------------------------------------------------------------------
-	bool OcclusionCullingTerrainSceneManager::getOptionValues( const String & key, StringVector  &refValueList )
+	bool OcclusionCullingOctreeSceneManager::getOptionValues( const String & key, StringVector  &refValueList )
 	{
-		return TerrainSceneManager::getOptionValues( key, refValueList );
+		return OctreeSceneManager::getOptionValues( key, refValueList );
 	}
 	//-----------------------------------------------------------------------
-	bool OcclusionCullingTerrainSceneManager::getOptionKeys( StringVector & refKeys )
+	bool OcclusionCullingOctreeSceneManager::getOptionKeys( StringVector & refKeys )
 	{
-		return mOcclusionCullingTerrainSceneTraverser->getOptionKeys ( refKeys ) || TerrainSceneManager::getOptionKeys( refKeys );
+		return mOcclusionCullingOctreeSceneTraverser->getOptionKeys ( refKeys ) || OctreeSceneManager::getOptionKeys( refKeys );
 	}
 	//-----------------------------------------------------------------------
-	void OcclusionCullingTerrainSceneManager::_renderOctant(Camera *cam, Octree *octant)
+	void OcclusionCullingOctreeSceneManager::_renderOctant(Camera *cam, Octree *octant)
 	{
 		//Add stuff to be rendered;
@@ -131,18 +129,3 @@
 		_deleteRenderedQueueGroups();
 	}
-	//-----------------------------------------------------------------------
-	/*unsigned int OcclusionCullingTerrainSceneManager::countNumOctrees(Octree *root)
-	{
-		unsigned int result = 1;
-				
-		for(int i=0; i<8; ++i)
-		{
-			Octree *nextChild = root->mChildren[(i & 4) >> 2][(i & 2) >> 1][i & 1];
-		
-			if(nextChild != 0)
-				result += countNumOctrees(nextChild);
-		}
-		
-		return result;
-	}*/
 }	
