Index: trunk/VUT/GtpVisibility/include/HierarchyInterface.h
===================================================================
--- trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 155)
+++ trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 158)
@@ -14,5 +14,5 @@
 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;
 typedef std::queue<QueryPair> QueryQueue;
-typedef std::stack<HierarchyNode *> TraversalStack;
+
 
 /**	Class which implements a hierarchy interface for a scene hierarchy.
@@ -33,5 +33,5 @@
 		@param node the hierarchy node
 	*/
-	virtual void TraverseAndRenderNode(HierarchyNode *node) = 0;
+	virtual void TraverseNode(HierarchyNode *node) = 0;
 	/** Renders current hierarchy node.
 		@param node current hierarchy node to be rendered
@@ -56,11 +56,8 @@
 	*/
 	HierarchyNode *GetHierarchyRoot() const;
-	/** Sets the scene root and initialises this hierarchy interface for a traversal.
-		@param frontToBack 
-			if traversal is initialised for front-to-back rendering or
-			simple traversal of the nodes.
+	/** Sets the scene root and initialises this hierarchy interface for a traversal.		
 		@remark also resets the statistics evaluated in the last traversal
 	*/
-	void InitTraversal(bool frontToBack = true);
+	void InitTraversal();
 	/** Returns current frame id.
 		@returns frame id
@@ -152,14 +149,9 @@
 	virtual void RenderGeometry(GtpVisibility::Mesh *geom) = 0;
 
-	/** Sets node id to specified value. 
-	*/
-	virtual void SetNodeId(HierarchyNode *node, int id) = 0;
-	/** Returns id of given node. 
-	*/
-	virtual int GetNodeId(HierarchyNode *node) = 0;
-
+	
 	/** This is an optimization when issuing the occlusion test. 
 		The test is done with actual geometry rather than the bounding 
-		box of leave nodes previously marked as visible
+		box of leave nodes previously marked as visible.
+
 		@param testGeometry if this optimization should be used
 		@remark this option is only useful for the coherent hierarchical culling algorithm
@@ -167,31 +159,26 @@
 	void TestGeometryForVisibleLeaves(bool testGeometry);
 
-	/** 
-		Traverses hierarchy and returns next node.
-		@returns next node in hierarchy.
-	*/
-	virtual HierarchyNode *GetNextNode() = 0;
+
 
 protected:
 	/// chc optimization for testing geometry of leaves instead of bounding box
 	bool mTestGeometryForVisibleLeaves;
-
+	/// the current frame number
 	unsigned int mFrameId;
-
+	/// points to the last occlusion query in the query list
 	int mCurrentTestIdx;
 	
 	/// number of traversed nodes
 	unsigned int mNumTraversedNodes;
-	/// the distance queue used for rendering of nodes in front to back order.
+
+	/// The queue is useful for rendering hierarchy nodes in front to back order.
 	DistanceQueue *mDistanceQueue;
-	/// internal structure for traversal
-	TraversalStack *mTraversalStack;
 
 	/// the root of the hierarchy
 	HierarchyNode *mHierarchyRoot;
 	
-	// buffer for a node pointer
+	/// buffer for a node pointer
 	HierarchyNode *mSavedNode;
-
+	/// list of rendered hierarchy nodes (e.g., useful for exact visibility queries)
 	std::vector<HierarchyNode *> mRenderedNodes;
 };
Index: trunk/VUT/GtpVisibility/src/FrustumCullingManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/FrustumCullingManager.cpp	(revision 155)
+++ trunk/VUT/GtpVisibility/src/FrustumCullingManager.cpp	(revision 158)
@@ -28,5 +28,5 @@
 		{		
 			mHierarchyInterface->SetNodeVisible(node, true);
-			mHierarchyInterface->TraverseAndRenderNode(node);
+			mHierarchyInterface->TraverseNode(node);
 		}
 	}
Index: trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp	(revision 155)
+++ trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp	(revision 158)
@@ -40,5 +40,5 @@
 			{
 				mHierarchyInterface->PullUpVisibility(node);
-				mHierarchyInterface->TraverseAndRenderNode(node);
+				mHierarchyInterface->TraverseNode(node);
 			}
 			else
@@ -111,5 +111,5 @@
 				if (wasVisible)
 				{
-					mHierarchyInterface->TraverseAndRenderNode(node);
+					mHierarchyInterface->TraverseNode(node);
 				}
 			}
@@ -145,5 +145,5 @@
 
 	mHierarchyInterface->PullUpVisibility(node);			
-	mHierarchyInterface->TraverseAndRenderNode(node);
+	mHierarchyInterface->TraverseNode(node);
 }
 
Index: trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp	(revision 155)
+++ trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp	(revision 158)
@@ -11,5 +11,4 @@
 {	
 	mDistanceQueue = new DistanceQueue(GreaterDistance<HierarchyNode *>(this));
-	mTraversalStack = new std::stack<HierarchyNode *>;
 }
 //-----------------------------------------------------------------------
@@ -17,5 +16,4 @@
 {		
 	delete mDistanceQueue;
-	delete mTraversalStack;
 }
 //-----------------------------------------------------------------------
@@ -25,20 +23,14 @@
 }
 //-----------------------------------------------------------------------
-void HierarchyInterface::InitTraversal(bool frontToBack)
+void HierarchyInterface::InitTraversal()
 {
 	// initialise for front-to-back rendering
-	if (frontToBack)
-	{
-		++ mFrameId;
-		mCurrentTestIdx = 0;
-		mNumTraversedNodes = 0;
-		mRenderedNodes.clear();
 
-		mDistanceQueue->push(mHierarchyRoot);
-	}
- 	else
-	{	// initialise for simple node traversal
-		mTraversalStack->push(mHierarchyRoot);
-	}
+	++ mFrameId;
+	mCurrentTestIdx = 0;
+	mNumTraversedNodes = 0;
+	mRenderedNodes.clear();
+
+	mDistanceQueue->push(mHierarchyRoot);
 }
 //-----------------------------------------------------------------------
Index: trunk/VUT/GtpVisibility/src/StopAndWaitCullingManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/StopAndWaitCullingManager.cpp	(revision 155)
+++ trunk/VUT/GtpVisibility/src/StopAndWaitCullingManager.cpp	(revision 158)
@@ -31,5 +31,5 @@
 		{
 			mHierarchyInterface->SetNodeVisible(node, true);
-			mHierarchyInterface->TraverseAndRenderNode(node);
+			mHierarchyInterface->TraverseNode(node);
 		}
 		else
@@ -45,5 +45,5 @@
 			if (visiblePixels > mVisibilityThreshold)
 			{
-				mHierarchyInterface->TraverseAndRenderNode(node);
+				mHierarchyInterface->TraverseNode(node);
 			}
 			else
