Index: trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h	(revision 44)
+++ trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneManager.h	(revision 45)
@@ -10,5 +10,5 @@
 
 #include "OgrePrerequisites.h"
-#include "OgreOcclusionCullingTerrainSceneTraverser.h"
+#include "OgreOcclusionCullingOctreeSceneTraverser.h"
 //#include "OgreSolidHalfBoundingBox.h"
 
Index: trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneTraverser.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneTraverser.h	(revision 45)
+++ trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingOctreeSceneTraverser.h	(revision 45)
@@ -0,0 +1,90 @@
+#ifndef _OcclusionCullingOctreeSceneTraverser_H__
+#define _OcclusionCullingOctreeSceneTraverser_H__
+
+#include "OgreOctree.h"
+#include "OgreOcclusionCullingSceneTraverser.h"
+
+using namespace std;
+
+namespace Ogre {
+	/**
+		This class implements the compare operator for the priority queue
+		especially for octree hierarchies using getCullBounds for bounding
+		box computation. A lower distance has a higher value in the queue.
+	*/
+	template <typename T> class octreeless 
+	{
+	public:
+		octreeless(Camera *cam) { mCamera = cam; }
+		
+		bool operator() (T v1, T v2) const
+		{
+			AxisAlignedBox box1, box2;
+			v1->_getCullBounds(&box1);
+			v2->_getCullBounds(&box2);
+
+			return getSquaredViewDepth(mCamera, &box1) > getSquaredViewDepth(mCamera, &box2);
+		}
+
+	private:
+		Real getSquaredViewDepth(const Ogre::Camera* cam, const Ogre::AxisAlignedBox* box) const
+		{
+			Vector3 mid  = ((box->getMinimum() - box->getMaximum()) * 0.5) + box->getMinimum();
+			return (cam->getDerivedPosition() - mid).squaredLength();                                                                   
+		}
+
+		Camera *mCamera;
+		//AxisAlignedBox mBox1, mBox2;
+		//Ogre::Vector3 min, max, mid, dist;
+	};
+
+	typedef pair<Octree *, HardwareOcclusionQuery *> OctreeQueryPair;
+	typedef priority_queue<Octree *, vector<Octree *>, octreeless<vector<Octree *>::value_type> > OctreePriorityQueue;
+	typedef queue<OctreeQueryPair> OctreeQueryQueue;
+
+	class OcclusionCullingOctreeSceneTraverser: public OcclusionCullingSceneTraverser
+	{
+	public:
+		OcclusionCullingOctreeSceneTraverser(SceneManager *sm, RenderSystem *rsys);
+		~OcclusionCullingOctreeSceneTraverser();
+		//void renderScene( Camera *cam );
+		void setSceneRoot(Octree *root);
+		/** Sets the number of nodes in this octree 
+		@remark do not confuse this with the OctreeNode class 
+		which is derived from SceneNode
+		@param num number of nodes in the octree
+		*/
+		void setNumOctreeNodes( unsigned int num );
+	
+		/** Gets the given option for the scene traverser.
+	        @remarks
+		    See setOption
+		*/
+		bool getOption( const String &, void * );
+		bool getOptionKeys( StringVector &refKeys );
+		
+	protected:
+		/** Renders the scene with view frustum culling only. */
+		void renderCullFrustum( Camera *cam );
+		/** Renders the scene with the hierarchical stop and wait algorithm. */
+		void renderStopAndWait( Camera *cam );
+		/** Renders the scene with the coherent hierarchical algorithm and the query queye. */
+		void renderCoherentWithQueue( Camera *cam );
+		/** Issue a occlusion query for this node. */
+		
+		void initDistanceQueue(Camera *cam);
+		void pullUpVisibility( Camera *cam, Octree *octree );
+		void traverseOctant(Camera *cam, Octree *octant );
+		void renderOctant( Camera *cam, Octree *octant );
+		bool isLeaf(Octree *octant);
+
+	private:
+		OctreePriorityQueue *mOctreeDistanceQueue;
+		// the octree root
+		Octree *mOctreeSceneRoot;
+
+		unsigned int mNumOctreeNodes;
+	};
+
+}
+#endif // OcclusionCullingOctreeSceneTraverser_H
Index: trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h	(revision 42)
+++ trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h	(revision 45)
@@ -10,5 +10,5 @@
 
 #include "OgrePrerequisites.h"
-#include "OgreOcclusionCullingTerrainSceneTraverser.h"
+#include "OgreOcclusionCullinOctreeSceneTraverser.h"
 //#include "OgreSolidHalfBoundingBox.h"
 
@@ -55,10 +55,6 @@
 
 	protected:
-		/** Recursively counts octree size (i.e., number of octree instances)
-		@param root current octree
-		*/
-		//unsigned int countOctreeSize(Octree *root);
 
-		OcclusionCullingTerrainSceneTraverser *mOcclusionCullingTerrainSceneTraverser;
+		OcclusionCullingOctreeSceneTraverser *mOcclusionCullingOctreeSceneTraverser;
 	};
 
Index: trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneTraverser.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneTraverser.h	(revision 42)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#ifndef _OcclusionCullingTerrainSceneTraverser_H__
-#define _OcclusionCullingTerrainSceneTraverser_H__
-
-#include "OgreOctree.h"
-#include "OgreOcclusionCullingSceneTraverser.h"
-
-using namespace std;
-
-namespace Ogre {
-	/**
-		This class implements the compare operator for the priority queue
-		especially for octree hierarchies using getCullBounds for bounding
-		box computation. A lower distance has a higher value in the queue.
-	*/
-	template <typename T> class octreeless 
-	{
-	public:
-		octreeless(Camera *cam) { mCamera = cam; }
-		
-		bool operator() (T v1, T v2) const
-		{
-			AxisAlignedBox box1, box2;
-			v1->_getCullBounds(&box1);
-			v2->_getCullBounds(&box2);
-
-			return getSquaredViewDepth(mCamera, &box1) > getSquaredViewDepth(mCamera, &box2);
-		}
-
-	private:
-		Real getSquaredViewDepth(const Ogre::Camera* cam, const Ogre::AxisAlignedBox* box) const
-		{
-			Vector3 mid  = ((box->getMinimum() - box->getMaximum()) * 0.5) + box->getMinimum();
-			return (cam->getDerivedPosition() - mid).squaredLength();                                                                   
-		}
-
-		Camera *mCamera;
-		//AxisAlignedBox mBox1, mBox2;
-		//Ogre::Vector3 min, max, mid, dist;
-	};
-
-	typedef pair<Octree *, HardwareOcclusionQuery *> OctreeQueryPair;
-	typedef priority_queue<Octree *, vector<Octree *>, octreeless<vector<Octree *>::value_type> > OctreePriorityQueue;
-	typedef queue<OctreeQueryPair> OctreeQueryQueue;
-
-	class OcclusionCullingTerrainSceneTraverser: public OcclusionCullingSceneTraverser
-	{
-	public:
-		OcclusionCullingTerrainSceneTraverser(SceneManager *sm, RenderSystem *rsys);
-		~OcclusionCullingTerrainSceneTraverser();
-		//void renderScene( Camera *cam );
-		void setSceneRoot(Octree *root);
-		/** Sets the number of nodes in this octree 
-		@remark do not confuse this with the OctreeNode class 
-		which is derived from SceneNode
-		@param num number of nodes in the octree
-		*/
-		void setNumOctreeNodes( unsigned int num );
-	
-		/** Gets the given option for the scene traverser.
-	        @remarks
-		    See setOption
-		*/
-		bool getOption( const String &, void * );
-		bool getOptionKeys( StringVector &refKeys );
-		
-	protected:
-		/** Renders the scene with view frustum culling only. */
-		void renderCullFrustum( Camera *cam );
-		/** Renders the scene with the hierarchical stop and wait algorithm. */
-		void renderStopAndWait( Camera *cam );
-		/** Renders the scene with the coherent hierarchical algorithm and the query queye. */
-		void renderCoherentWithQueue( Camera *cam );
-		/** Issue a occlusion query for this node. */
-		
-		void initDistanceQueue(Camera *cam);
-		void pullUpVisibility( Camera *cam, Octree *octree );
-		void traverseOctant(Camera *cam, Octree *octant );
-		void renderOctant( Camera *cam, Octree *octant );
-		bool isLeaf(Octree *octant);
-
-	private:
-		OctreePriorityQueue *mOctreeDistanceQueue;
-		// the octree root
-		Octree *mOctreeSceneRoot;
-
-		unsigned int mNumOctreeNodes;
-	};
-
-}
-#endif // OcclusionCullingTerrainSceneTraverser_H
