Index: trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp	(revision 155)
+++ trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp	(revision 158)
@@ -17,5 +17,5 @@
 }
 //-----------------------------------------------------------------------
-void SceneNodeHierarchyInterface::TraverseAndRenderNode(GtpVisibility::HierarchyNode *node)
+void SceneNodeHierarchyInterface::TraverseNode(GtpVisibility::HierarchyNode *node)
 {
 	++ mNumTraversedNodes;
@@ -157,32 +157,4 @@
     }
 }
-//-----------------------------------------------------------------------
-void SceneNodeHierarchyInterface::SetNodeId(GtpVisibility::HierarchyNode *node, int id)
-{
-	static_cast<SceneNode *>(node)->setId(id);
-}
-//-----------------------------------------------------------------------
-int SceneNodeHierarchyInterface::GetNodeId(GtpVisibility::HierarchyNode *node)
-{
-	return static_cast<SceneNode *>(node)->getId();
-}
-//-----------------------------------------------------------------------
-GtpVisibility::HierarchyNode *SceneNodeHierarchyInterface::GetNextNode()
-{
-	if (mTraversalStack->empty())
-		return NULL;
-	
-	SceneNode *node = static_cast<SceneNode *>(mTraversalStack->top());
-	mTraversalStack->pop();
 
-	// internal node: add children to priority queue for further processing
-	Node::ChildNodeIterator it = node->getChildIterator();
-				
-	while (it.hasMoreElements())			
-	{ 
-		mTraversalStack->push(it.getNext());
-	}
-
-	return node;
-} 
 } // namespace Ogre	
Index: trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 157)
+++ trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 158)
@@ -31,7 +31,5 @@
 mEnableDepthWrite(true),
 mSkipTransparents(false),
-mSavedShadowTechnique(SHADOWTYPE_NONE),
-mRenderHierarchyNodes(false)
-//mRenderHierarchyNodes(true)
+mSavedShadowTechnique(SHADOWTYPE_NONE)
 {
 	mHierarchyInterface = new OctreeHierarchyInterface(this, mDestRenderSystem);
@@ -210,10 +208,4 @@
 void VisibilityTerrainSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)
 {
-	// clear list of solid boxes (used for item buffer hierarchy node rendering)
-	/*for (int i=0; i<(int)mSolidBoxes.size(); ++i)
-		delete mSolidBoxes[i];
-
-	mSolidBoxes.clear();*/
-
 	//-- show visible scene nodes and octree bounding boxes from last frame
 	if (mShowVisualization)
@@ -221,29 +213,4 @@
 		PrepareVisualization(cam);
 	}
-	else if (mRenderHierarchyNodes)
-	{
-		AxisAlignedBox aab;
-		
-
-		// get rendered hierarchy nodes from last frame
-		GtpVisibility::HierarchyNodeList *nodeList = mHierarchyInterface->GetRenderedNodes();
-		GtpVisibility::HierarchyNodeList::iterator nodeIt, nodeIt_end = nodeList->end();
-
-		for (nodeIt = nodeList->begin(); nodeIt != nodeIt_end; ++nodeIt)		
-		{
-			SolidBoundingBox *solidBox = new SolidBoundingBox();
-			solidBox->SetupBoundingBox(aab);
-
-			Octree *octree = static_cast<Octree *>(*nodeIt);
-			solidBox->setId(octree->getId());
-			mSolidBoxes.push_back(solidBox);
-
-			aab = octree->_getWorldAABB();
-			std::stringstream d; d << "bounding box with id: " << octree->getId() << ", " << aab << "\n";
-			LogManager::getSingleton().logMessage(d.str());
-
-			getRenderQueue()->addRenderable(solidBox);	
-		}
-	}
 	else 
 	{	
@@ -273,8 +240,7 @@
 	ColourValue savedAmbient = mAmbientLight;
 
-	// --- apply standard rendering for some cases 
-    // e.g., visualization, shadow pass
-
-	if (mShowVisualization || mRenderHierarchyNodes ||
+	// --- apply standard rendering for some cases (e.g., visualization, shadow pass)
+
+	if (mShowVisualization ||
 	   (mShadowTechnique == SHADOWTYPE_TEXTURE_MODULATIVE && 
 	    mIlluminationStage == IRS_RENDER_TO_TEXTURE))
@@ -282,6 +248,6 @@
 		IlluminationRenderStage savedStage = mIlluminationStage; 
 	
-		if (mShowVisualization || mRenderHierarchyNodes) 
-			// disable illumination stage because we want no shadows
+		if (mShowVisualization) 
+			// disable illumination stage to prevent rendering shadows
 			mIlluminationStage = IRS_NONE;
 
@@ -448,8 +414,5 @@
 		return true;
 	}
-	if (key == "RenderHierarchyNodes")
-	{
-		mRenderHierarchyNodes = (*static_cast<const bool *>(val));
-	}
+	
 	return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface).
 		setOption(key, val) || TerrainSceneManager::setOption(key, val);
Index: trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp	(revision 155)
+++ trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp	(revision 158)
@@ -10,9 +10,9 @@
 //-----------------------------------------------------------------------
 OctreeHierarchyInterface::OctreeHierarchyInterface(OctreeSceneManager *sm, RenderSystem *rsys): 
-SceneNodeHierarchyInterface(sm, rsys), mCurrentOctreePosition(0)
+SceneNodeHierarchyInterface(sm, rsys)
 {
 }
 //-----------------------------------------------------------------------
-void OctreeHierarchyInterface::TraverseAndRenderNode(GtpVisibility::HierarchyNode *node)
+void OctreeHierarchyInterface::TraverseNode(GtpVisibility::HierarchyNode *node)
 {
 	++ mNumTraversedNodes;
@@ -168,36 +168,3 @@
 	}
 }
-//-----------------------------------------------------------------------
-void OctreeHierarchyInterface::SetNodeId(GtpVisibility::HierarchyNode *node, int id)
-{
-	static_cast<Octree *>(node)->setId(id);
-}
-//-----------------------------------------------------------------------
-int OctreeHierarchyInterface::GetNodeId(GtpVisibility::HierarchyNode *node)
-{
-	return static_cast<Octree *>(node)->getId();
-}
-//-----------------------------------------------------------------------
-GtpVisibility::HierarchyNode *OctreeHierarchyInterface::GetNextNode()
-{
-	if (mTraversalStack->empty())
-		return NULL;
-	
-	Octree *octree = static_cast<Octree *>(mTraversalStack->top());
-	mTraversalStack->pop();
-		
-	for(int i=0; i<8; ++i)
-	{
-		Octree *nextChild = 
-			octree->mChildren[(i & 4) >> 2][(i & 2) >> 1][i & 1];
-
-		if (nextChild)
-		{
-			mTraversalStack->push(nextChild);
-		}
-	}
-
-	return octree;
-} 
-		
 } // namespace Ogre
Index: trunk/VUT/Ogre/src/OgreBspHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreBspHierarchyInterface.cpp	(revision 155)
+++ trunk/VUT/Ogre/src/OgreBspHierarchyInterface.cpp	(revision 158)
@@ -12,5 +12,5 @@
 }
 //-----------------------------------------------------------------------
-void BspHierarchyInterface::TraverseAndRenderNode(GtpVisibility::HierarchyNode *node)
+void BspHierarchyInterface::TraverseNode(GtpVisibility::HierarchyNode *node)
 {
 }
Index: trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 155)
+++ trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 158)
@@ -130,5 +130,6 @@
 }
 //-----------------------------------------------------------------------
-void PlatformHierarchyInterface::InitTraversal(Camera *cam, Camera *cullCam, int leavePassesInQueue)
+void PlatformHierarchyInterface::InitTraversal(Camera *cam, Camera *cullCam, 
+											   int leavePassesInQueue)
 {
 	GtpVisibility::HierarchyInterface::InitTraversal();
Index: trunk/VUT/Ogre/src/OgreItemBufferQueryManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreItemBufferQueryManager.cpp	(revision 156)
+++ trunk/VUT/Ogre/src/OgreItemBufferQueryManager.cpp	(revision 158)
@@ -77,49 +77,17 @@
 	}
 
-	delete [] buf;
-
-	// ---- render visible nodes and collect node visibility
-	bool renderBoxes = true;
-	sm->setOption("RenderHierarchyNodes", &renderBoxes);
-
-
-	// --- render item buffer for visible nodes only
-	pfHierarchyInterface->GetSceneManager()->_renderScene(pCam, mViewport, false);
-
-
-	// get frame buffer for node visibility
-	buf = mViewport->getTarget()->getBufferContents(dimx, dimy);
-
-	
-	// loop through frame buffer & collect visible pixels
-	for (int idx = 0; idx < dimy * dimx * 3; idx += 3)
-	{
-		// -- decode color code to receive id
-		int id = buf[idx] << 16;
-		id += buf[idx + 1] << 8;
-		id += buf[idx + 2];
-
-		// if valid id <= add visibility (id values start at 1
-		if ((id > 0) && (id < (int)visibleNodes->size()))
-		{
-			((*visibleNodes)[id]).AddVisibility(1, 1);
-		}
-	}
+	//-- reset options
 
 	// don't need item buffer anymore
 	useItemBuffer = false;
-	//sm->setOption("UseItemBuffer", &useItemBuffer);
-
-	renderBoxes = false;
-	//sm->setOption("RenderHierarchyNodes", &renderBoxes);
-
+	sm->setOption("UseItemBuffer", &useItemBuffer);
 	// reset initialised - flag
 	mWasInitialised = false;
-
 	// reset old overlay status
 	mViewport->setOverlaysEnabled(overlayEnabled);
-	
+	// reset background color
 	mViewport->setBackgroundColour(bg);
 
+	// delete array storing the frame buffer
 	delete [] buf;
 }
@@ -146,17 +114,4 @@
 		visibleGeometry->push_back(GtpVisibility::MeshInfo(it.getNext(), 0, 0));
 	}
-
-	// -- initialise hierarchy interface for simple node traversal
-	mHierarchyInterface->InitTraversal(false);
-
-	GtpVisibility::HierarchyNode *node = NULL;
-	
-	int i = 1;
-
-	while (node = mHierarchyInterface->GetNextNode())
-	{
-		mHierarchyInterface->SetNodeId(node, i++);
-		visibleNodes->push_back(GtpVisibility::NodeInfo(node, 0, 0));
-	}
 }
 
