Index: trunk/VUT/GtpVisibility/include/HierarchyInterface.h
===================================================================
--- trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 112)
+++ trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 130)
@@ -3,8 +3,14 @@
 
 #include "DistanceQueue.h"
+#include "VisibilityMesh.h"
 
 namespace GtpVisibility {
 
 enum  CullingType {QUERY_CULLED, FRUSTUM_CULLED};
+
+typedef std::vector<HierarchyNode *> HierarchyNodeList;
+typedef std::vector<GtpVisibility::Mesh *> GeometryList;
+typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;
+typedef std::queue<QueryPair> QueryQueue;
 
 /**	Class which implements a hierarchy interface for a scene hierarchy.
@@ -26,6 +32,6 @@
 	*/
 	virtual void TraverseNode(HierarchyNode *node) = 0;
-	/** Renders current scene node .
-		@param node current scene node to be rendered
+	/** Renders current hierarchy node.
+		@param node current hierarchy node to be rendered
 	*/
 	virtual void RenderNode(HierarchyNode *node) = 0;
@@ -119,4 +125,27 @@
 		CullingType type) = NULL;
 
+	/** Returns vector of previously rendered hierarchy nodes.
+	*/
+	std::vector<HierarchyNode *> *GetRenderedNodes();
+	/** Returns vector of previoulsy rendered geometry.
+	*/
+	
+	/** Issue a occlusion query for this mesh.
+		@param node the current mesh
+		@returns occlusion query for this node
+	*/
+	virtual GtpVisibility::OcclusionQuery *IssueOcclusionQuery(GtpVisibility::Mesh *mesh) = 0;
+
+	/** Returns geometry of hierarchy node. 
+	*/
+	virtual void GetGeometry(GtpVisibility::HierarchyNode *node,	
+					 		 GeometryList *geometryList, 
+							 bool includeChildren) = 0;
+
+
+	/** Renders geometry.
+	*/
+	virtual void RenderGeometry(GtpVisibility::Mesh *geom) = 0;
+
 protected:
 	
@@ -128,5 +157,4 @@
 	//--- statistics
 	unsigned int mNumTraversedNodes;
-	unsigned int mNumRenderedNodes;
 
 	DistanceQueue *mDistanceQueue;
@@ -134,5 +162,5 @@
 	HierarchyNode *mPreviousNode;
 
-	
+	std::vector<HierarchyNode *> mRenderedNodes;
 };
 } // namespace GtpVisibility
Index: trunk/VUT/GtpVisibility/include/QueryManager.h
===================================================================
--- trunk/VUT/GtpVisibility/include/QueryManager.h	(revision 113)
+++ trunk/VUT/GtpVisibility/include/QueryManager.h	(revision 130)
@@ -11,4 +11,6 @@
 namespace GtpVisibility {
   
+typedef std::vector<OcclusionQuery *> QueryList;
+
 /** This abstract class defines interface for a specific visibility query
     algorithm. The interface supports two from point visibility queries and
@@ -23,5 +25,5 @@
 public:
     /** Constructor taking a hierarchy interface as an argument. This allows to operate
-	onm different hierarchy types, while reusing the implementation of the query methods.
+	on different hierarchy types, while reusing the implementation of the query methods.
      */
     QueryManager(HierarchyInterface *hierarchyInterface);
@@ -81,8 +83,8 @@
 	     );
   
-	/** Sets the scene traverser.
-      @remark the scene traverser depends on the type of hierarchyInterface the scene consists of.
+	/** Sets the hierarchy interface.
+      @remark the traversal depends on the type of hierarchyInterface the scene consists of.
 	*/
-	void SetSceneTraverser(HierarchyInterface *hierarchyInterface);
+	void SetHierarchyInterface(HierarchyInterface *hierarchyInterface);
 
 protected:
Index: trunk/VUT/GtpVisibility/include/VisibilityInfo.h
===================================================================
--- trunk/VUT/GtpVisibility/include/VisibilityInfo.h	(revision 71)
+++ trunk/VUT/GtpVisibility/include/VisibilityInfo.h	(revision 130)
@@ -16,4 +16,6 @@
     NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {}
 
+	float GetVisibiliy() const {return mVisibility;}
+
 protected:
     /** pointer to the scene node */
@@ -31,4 +33,6 @@
 public:
 	MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {}
+
+	float GetVisibiliy() const {return mVisibility;}
 
 protected:
Index: trunk/VUT/GtpVisibility/include/VisibilityMesh.h
===================================================================
--- trunk/VUT/GtpVisibility/include/VisibilityMesh.h	(revision 71)
+++ trunk/VUT/GtpVisibility/include/VisibilityMesh.h	(revision 130)
@@ -2,8 +2,9 @@
 #define _VisibilityMesh_H__
 
-#include "OgreMesh.h"
+//#include <OgreMesh.h>
+#include <OgreEntity.h>
 
 namespace GtpVisibility {
-  typedef Ogre::Mesh Mesh;
+  typedef Ogre::Entity Mesh;
 }
 
Index: trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h
===================================================================
--- trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h	(revision 74)
+++ trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h	(revision 130)
@@ -8,7 +8,4 @@
 namespace GtpVisibility
 {
-
-typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;
-typedef std::queue<QueryPair> QueryQueue;
 
 /** Renders the scene with the coherent hierarchical culling algorithm. 
Index: trunk/VUT/GtpVisibility/include/VisibilityManager.h
===================================================================
--- trunk/VUT/GtpVisibility/include/VisibilityManager.h	(revision 114)
+++ trunk/VUT/GtpVisibility/include/VisibilityManager.h	(revision 130)
@@ -55,4 +55,10 @@
 	*/
 	void SetUseChcOptimization(bool useOptimization);
+	/** Sets pointer to a query manager. 
+	*/
+	void SetQueryManager(QueryManager *queryManager);
+	/** see set 
+	*/
+	QueryManager *GetQueryManager();
 
 protected:
Index: trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
===================================================================
--- trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 120)
+++ trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 130)
@@ -64,4 +64,5 @@
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
 				RuntimeLibrary="2"
+				RuntimeTypeInfo="TRUE"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -107,7 +108,4 @@
 			</File>
 			<File
-				RelativePath="..\include\DistanceQueue.h">
-			</File>
-			<File
 				RelativePath="..\src\DummyPreprocessingManager.cpp">
 			</File>
@@ -148,4 +146,10 @@
 			</File>
 			<File
+				RelativePath="..\include\DistanceQueue.h">
+			</File>
+			<File
+				RelativePath="..\include\DummyQueryManager.h">
+			</File>
+			<File
 				RelativePath="..\include\FrustumCullingManager.h">
 			</File>
Index: trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp	(revision 119)
+++ trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp	(revision 130)
@@ -48,5 +48,5 @@
 
 			if (!mHierarchyInterface->CheckFrustumVisible(node, intersects))
-			{//if (mHierarchyInterface->mIsShadowPass)
+			{
 				mNumFrustumCulledNodes ++;
 				
Index: trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp	(revision 120)
+++ trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp	(revision 130)
@@ -7,6 +7,6 @@
 //-----------------------------------------------------------------------
 HierarchyInterface::HierarchyInterface(): 
-mFrameId(0), mNumTraversedNodes(0), mNumRenderedNodes(0), 
-mSceneRoot(0), mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false)
+mFrameId(0), mNumTraversedNodes(0), mSceneRoot(0), 
+mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false)
 //, mIsShadowPass(false)
 {	
@@ -26,8 +26,8 @@
 void HierarchyInterface::InitFrame(HierarchyNode *root)
 {
-	mFrameId ++;
+	++ mFrameId;
 	mCurrentTestIdx = 0;
 	mNumTraversedNodes = 0;
-	mNumRenderedNodes = 0;
+	mRenderedNodes.clear();
 
 	SetSceneRoot(root);
@@ -63,11 +63,16 @@
 unsigned int HierarchyInterface::GetNumRenderedNodes()
 {
-	return mNumRenderedNodes;
+	return (unsigned int)mRenderedNodes.size();
 }
-
+//-----------------------------------------------------------------------
 void HierarchyInterface::SetUseOptimization(bool useOptimization)
 {
 	mUseOptimization = useOptimization;
 }
+//-----------------------------------------------------------------------
+std::vector<HierarchyNode *> *HierarchyInterface::GetRenderedNodes()
+{
+	return &mRenderedNodes;
+}
 
 } // namespace GtpVisibility
Index: trunk/VUT/GtpVisibility/src/QueryManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/QueryManager.cpp	(revision 71)
+++ trunk/VUT/GtpVisibility/src/QueryManager.cpp	(revision 130)
@@ -5,4 +5,5 @@
  
 QueryManager::QueryManager(HierarchyInterface *hierarchyInterface)
+:mHierarchyInterface(hierarchyInterface)
 {
 }
Index: trunk/VUT/GtpVisibility/src/VisibilityManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 114)
+++ trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 130)
@@ -83,4 +83,13 @@
 	return mCullingManagerType;
 }
-
+//-----------------------------------------------------------------------
+void VisibilityManager::SetQueryManager(QueryManager *queryManager)
+{
+	mQueryManager = queryManager;
+}
+//-----------------------------------------------------------------------
+QueryManager *VisibilityManager::GetQueryManager()
+{
+	return mQueryManager;
+}
 } // namespace GtpVisibility
