Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj	(revision 2280)
@@ -228,6 +228,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="..\lib\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="2"
 			CharacterSet="2">
@@ -244,5 +244,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;..\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingLogManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingLogManager.h	(revision 2280)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingLogManager.h	(revision 2280)
@@ -0,0 +1,52 @@
+#ifndef _CullingLogManager_H__
+#define _CullingLogManager_H__
+
+
+#include <fstream>
+#include <iostream>
+
+
+namespace GtpVisibility {
+
+
+/** Log manager controlling the debug output.
+	This class defines the pattern of singleton to assure that
+	there is always only one log manager.
+*/
+class CullingLogManager {
+
+public:
+
+	/** Returns the resource manager as a singleton.
+	*/
+	static CullingLogManager *GetSingleton();
+
+	static void DelSingleton();
+
+	void LogMessage(const std::string &str);
+
+protected:
+
+	/** Default constructor. The constructor is protected
+		to have control over instantiation using the 
+		singleton pattern.
+	*/
+	CullingLogManager();
+
+	~CullingLogManager() {}
+	
+
+protected:
+
+	std::ofstream mOutStream;
+
+private:
+
+	static CullingLogManager *sLogManager;
+	
+};
+
+
+}
+
+#endif
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyPreprocessingManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyPreprocessingManager.h	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyPreprocessingManager.h	(revision 2280)
@@ -42,9 +42,9 @@
       Returns false if no viewcell was found.
     */
-  virtual bool LocateViewCellIds(const Vector3 &center,
-				 const float radius,
-				 vector<int> *viewCellIds
-				 );
-
+  /*virtual bool LocateViewCellIds(const Vector3 &center,
+								 const float radius,
+								 vector<int> *viewCellIds
+								);
+*/
 
   /**
@@ -52,7 +52,7 @@
      a union with visibleNodes and visibleMeshes. Returns the number of added entries.
   */
-  virtual int AddViewCellPVS(const int cellID,
-			     NodeInfoContainer *visibleNodes,
-			     MeshInfoContainer *visibleMeshes);
+  //virtual int AddViewCellPVS(const int cellID,
+//						 NodeInfoContainer *visibleNodes,
+//						 MeshInfoContainer *visibleMeshes);
 
 };
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h	(revision 2259)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h	(revision 2280)
@@ -3,5 +3,5 @@
 
 #include "DistanceQueue.h"
-#include "VisibilityMesh.h"
+//#include "VisibilityMesh.h"
 #include <stack>
 
@@ -11,6 +11,7 @@
 
 typedef std::vector<HierarchyNode *> NodeVector;
-typedef std::vector<GtpVisibility::Mesh *> GeometryVector;
-typedef std::vector<GtpVisibility::Patch *> PatchVector;
+//typedef std::vector<GtpVisibility::Mesh *> GeometryVector;
+//typedef std::vector<GtpVisibility::Patch *> PatchVector;
+
 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;
 typedef std::pair<HierarchyNode *, bool> PendingQuery;
@@ -139,13 +140,4 @@
 	*/
 	
-	/** Returns the geometry of a given hierarchy node. 
-		@param node the hierarchy node containing the geometry
-		@param geometryList geometry is returned in this list
-		@param includeChildren if the geometry of the children should be taken into account
-	*/
-	virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-					 				 GeometryVector *geometryList, 
-									 bool includeChildren) = 0;
-
 	
 	/** This is an optimization when issuing the occlusion test. 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h	(revision 2280)
@@ -5,10 +5,11 @@
 
 #include "VisibilityInfo.h"
-#include "VisibilityVector3.h"
-#include "VisibilityCamera.h"
-#include "VisibilityRay.h"
+//#include "VisibilityCamera.h"
+//#include "VisibilityRay.h"
+
 
 namespace GtpVisibility {
-  
+
+
 typedef std::vector<OcclusionQuery *> QueryList;
 
@@ -25,69 +26,62 @@
 public:
     /** Constructor taking a hierarchy interface as an argument. This allows to operate
-	on 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, int queryModes);
-    
-    /** 
-	Computes restricted visibility from point by using an explicit camera to execute
-	the visibility query.
-	@param camera The camera to be used
+    //QueryManager(HierarchyInterface *hierarchyInterface, int queryModes);
+    QueryManager(int queryModes);
 
-	@param visibleNodes Pointer to the container where visible nodes should be added.
-	This set is formed of visible leafs or fully visible interior nodes.
-	If NULL no visible nodes are not evaluated.
+    /** Computes restricted visibility from point by using an explicit camera to execute
+		the visibility query.
+		@param camera The camera to be used
 
-	@param visibleGeometry Pointer to the container where visible meshes should be added.
-	If NULL no visible meshes are not evaluated.
+		@param visibleNodes Pointer to the container where visible nodes should be added.
+		This set is formed of visible leafs or fully visible interior nodes.
+		If NULL no visible nodes are not evaluated.
 
-	@param visiblePatches Pointer to the container where visible patches should be added.
-	If NULL no visible meshes are not evaluated.
+		@param visibleGeometry Pointer to the container where visible meshes should be added.
+		If NULL no visible meshes are not evaluated.
 
-	@param relativeVisibility If true the visibility member for
-	NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible
-	pixels divided by the the number of projected pixels.
+		@param visiblePatches Pointer to the container where visible patches should be added.
+		If NULL no visible meshes are not evaluated.
 
-	@return true if the corresponding PVS exists.
+		@param relativeVisibility If true the visibility member for
+		NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible
+		pixels divided by the the number of projected pixels.
+
+		@return true if the corresponding PVS exists.
     */
-    virtual void
-    ComputeCameraVisibility(const Camera &camera,
-			    NodeInfoContainer *visibleNodes,
-			    MeshInfoContainer *visibleGeometry,
-				PatchInfoContainer *visiblePatches,
-			    const bool relativeVisibility,
-				const bool approximateVisibility
-			    ) = 0;
-    
+    /*virtual void ComputeCameraVisibility(const Camera &camera,
+										 NodeInfoContainer *visibleNodes,
+										 MeshInfoContainer *visibleGeometry,
+										 PatchInfoContainer *visiblePatches,
+										 const bool relativeVisibility,
+										 const bool approximateVisibility) = 0;
+    */
     /** 
 	Uses the specified point to execute the visibility query in all directions. 
 	@sa ComputeCameraVisibility()
     */
-    virtual void
+    /*virtual void
     ComputeFromPointVisibility(const Vector3 &point,
-			       NodeInfoContainer *visibleNodes,
-			       MeshInfoContainer *visibleGeometry,
-				   PatchInfoContainer *visiblePatches,
-			       const bool relativeVisibility,
-				   const bool approximateVisibility
-			       ) = 0;
-    
+							   NodeInfoContainer *visibleNodes,
+							   MeshInfoContainer *visibleGeometry,
+							   PatchInfoContainer *visiblePatches,
+							   const bool relativeVisibility,
+							   const bool approximateVisibility) = 0;
+    */
   /** 
       Ray shooting interface: finds an intersection with objects in the scene.
 
       @param ray The given input ray (assuming the ray direction is normalized)
-
       @param visibleMeshes List of meshes intersecting the ray
-
       @param isGlobalLine If false only first intersection with opaque object is returned.
       Otherwise all intersections of the ray with the scene are found.
 
-      @return true if there is any intersection. 
+	  @return true if there is any intersection. 
 	*/
-    virtual bool
-		ShootRay(const Ray &ray,
-	     std::vector<Mesh *> *visibleMeshes,
-	     bool isGlobalLine = false
-	     );
-  
+    /*virtual bool ShootRay(const Ray &ray,
+						  std::vector<Mesh *> *visibleMeshes,
+						  bool isGlobalLine = false);
+*/
 	/** Sets the hierarchy interface.
       @remark the traversal depends on the type of hierarchyInterface the scene consists of.
@@ -101,5 +95,5 @@
 protected:
   
-	HierarchyInterface *mHierarchyInterface;
+	//HierarchyInterface *mHierarchyInterface;
 	int mQueryModes;  
 };
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityInfo.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityInfo.h	(revision 318)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityInfo.h	(revision 2280)
@@ -4,5 +4,5 @@
 #include <vector>
 
-#include "VisibilityMesh.h"
+//#include "VisibilityMesh.h"
 #include "HierarchyInterface.h"
 
@@ -132,9 +132,4 @@
 }
 
-typedef VisibilityInfo<Patch *> PatchInfo;
-typedef VisibilityInfo<Mesh *> MeshInfo;
-typedef VisibilityInfo<HierarchyNode *> NodeInfo;
-
-
 template<class T>
 struct InfoContainer
@@ -143,7 +138,4 @@
 };
 
-typedef std::vector<PatchInfo> PatchInfoContainer;
-typedef std::vector<MeshInfo> MeshInfoContainer;
-typedef std::vector<NodeInfo> NodeInfoContainer;
 
 } // namespace GtpVisibility
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyQueryManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyQueryManager.h	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyQueryManager.h	(revision 2280)
@@ -19,7 +19,6 @@
       QueryManager(hierarchyInterface, 0) {}
     
-    /**
-       @sa QueryManager::ComputeCameraVisibility()
-     */
+    /** @sa QueryManager::ComputeCameraVisibility()
+    */
     virtual void ComputeCameraVisibility(const Camera &camera,
 										 NodeInfoContainer *visibleNodes,
@@ -29,6 +28,5 @@
 										 const bool approximateVisibility);
     
-    /**
-       @sa QueryManager::ComputeFromPointVisibility()
+    /** @sa QueryManager::ComputeFromPointVisibility()
     */
     virtual void ComputeFromPointVisibility(const Vector3 &point,
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/PreprocessingManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/PreprocessingManager.h	(revision 316)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/PreprocessingManager.h	(revision 2280)
@@ -7,5 +7,5 @@
 #include "HierarchyInterface.h"
 #include "VisibilityInfo.h"
-#include "VisibilityVector3.h"
+//#include "VisibilityVector3.h"
 
 namespace GtpVisibility {
@@ -80,9 +80,9 @@
 	added to the container. Returns true if the corresponding PVS exists.
     */
-    virtual bool GetPVS(const Vector3 &point,
+ /*   virtual bool GetPVS(const Vector3 &point,
 			const float radius,
 			NodeInfoContainer *visibleNodes,
 			MeshInfoContainer *visibleMeshes);
-    
+   */ 
     
   
@@ -115,17 +115,17 @@
 	Returns false if no viewcell was found.
     */
-    virtual bool LocateViewCellIds(const Vector3 &center,
+/*    virtual bool LocateViewCellIds(const Vector3 &center,
 				   const float radius,
 				   vector<int> *viewCellIds
 				   ) = 0;
-    
+  */  
     /**
        Add a PVS of the given viewcell to the already evaluated PVS by computing
        a union with visibleNodes and visibleMeshes. Returns the number of added entries.
     */
-    virtual int AddViewCellPVS(const int cellID,
+   /* virtual int AddViewCellPVS(const int cellID,
 							   NodeInfoContainer *visibleNodes,
 							   MeshInfoContainer *visibleMeshes ) = 0;
-    
+    */
     HierarchyInterface *mSceneTraverser;
   };
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h	(revision 2280)
@@ -68,4 +68,5 @@
 	VisibilityEnvironment *GetVisibilityEnvironment();
 
+
 protected:
 	
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingManager.h	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingManager.h	(revision 2280)
@@ -2,5 +2,8 @@
 #define _CullingManager_H__
 
+#include <iostream>
+#include <fstream>
 #include "HierarchyInterface.h"
+
 
 
@@ -8,6 +11,5 @@
 
 /** This abstract class implements an interface for a specific culling 
-	algorithm. The algorithm is either used to render a scene 
-	or to make a visibility query.
+	algorithm. The algorithm is either used to render a scene or to make a visibility query.
 */
 class CullingManager
@@ -54,4 +56,5 @@
 	void SetVisualizeCulledNodes(bool visualizeCulledNodes);
 
+
 protected:
 	
@@ -63,5 +66,7 @@
 	HierarchyInterface *mHierarchyInterface;
 	bool mVisualizeCulledNodes;
+
 };
+
 } // namespace GtpVisibility
 #endif // CullingManager
Index: P/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityMesh.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityMesh.h	(revision 159)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#ifndef _VisibilityMesh_H__
-#define _VisibilityMesh_H__
-
-//#include <OgreMesh.h>
-#include <OgreEntity.h>
-
-namespace GtpVisibility {
-  typedef Ogre::Entity Mesh;
-  typedef Ogre::SubEntity Patch;
-}
-
-
-#endif // VisibilityMesh.h
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp	(revision 174)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp	(revision 2280)
@@ -4,5 +4,5 @@
 namespace GtpVisibility {
  
-QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes):
+/*QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes):
 mHierarchyInterface(hierarchyInterface),
 mQueryModes(queryModes)
@@ -15,4 +15,9 @@
     return false;
 }
-  
+*/
+QueryManager::QueryManager(int queryModes):
+mQueryModes(queryModes)
+{
+}
+
 } // namespace GtpVisibility
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp	(revision 951)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "BatchedQueriesCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
@@ -21,6 +21,4 @@
 	QueryQueue queryQueue;
 	unsigned int visiblePixels = 0;
-
-	//Ogre::LogManager::getSingleton().logMessage("Batched Culling");
 
 	PendingQueue pendingQueue;
@@ -90,7 +88,4 @@
 					DecideVisible(node) && mHierarchyInterface->HasGeometry(node);
 
-				//if (mHierarchyInterface->LastVisited(node) >= mHierarchyInterface->GetFrameId())
-				//	Ogre::LogManager::getSingleton().logMessage("error");
-				
 				if (skipQuery)
 				{
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp	(revision 2171)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "StopAndWaitCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp	(revision 2280)
@@ -15,5 +15,5 @@
 VisibilityEnvironment::~VisibilityEnvironment()
 {
-	//GtpVisibilityPreprocessor::Environment::DelSingleton();
+//	GtpVisibilityPreprocessor::Environment::DelSingleton();
 }
 //-----------------------------------------------------------------------
@@ -21,5 +21,6 @@
 {		
 	//-- parse environment
-	return false;//GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
+	//return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
+	return false;
 }
 //-----------------------------------------------------------------------
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp	(revision 925)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "FrustumCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
@@ -6,7 +6,7 @@
 //-----------------------------------------------------------------------
 void FrustumCullingManager::RenderScene()
-{
+{	
 	while (!mHierarchyInterface->GetQueue()->empty())
-	{
+	{;
 		HierarchyNode *node = mHierarchyInterface->GetQueue()->top();
 		mHierarchyInterface->GetQueue()->pop();
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp	(revision 316)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp	(revision 2280)
@@ -11,5 +11,5 @@
 }
 
-bool PreprocessingManager::GetPVS(const Vector3 &center,
+/*bool PreprocessingManager::GetPVS(const Vector3 &center,
 								  const float radius,
 								  NodeInfoContainer *visibleNodes,
@@ -27,5 +27,5 @@
     }
     return false;
-  }
-  
+}
+  */
 };
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2258)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "CoherentHierarchicalCullingManager.h"
-#include <OgreLogManager.h>
+#include <time.h>
 
 namespace GtpVisibility {
@@ -143,12 +143,9 @@
 			mThreshold = RAND_MAX;
 	}
-	//std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str());
+	
 }
 //-----------------------------------------------------------------------
 inline bool CoherentHierarchicalCullingManager::DecideVisible(HierarchyNode *node) const
 {
-	//bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;
-	//Ogre::LogManager::getSingleton().logMessage(d.str()); return result;
-	
 	return rand() < mThreshold;
 }
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 2280)
@@ -4,6 +4,7 @@
 #include "FrustumCullingManager.h"
 #include "DummyPreprocessingManager.h"
-#include "DummyQueryManager.h"
 #include "RandomUpdateCullingManager.h"
+#include "CullingLogManager.h"
+
 
 namespace GtpVisibility {
@@ -33,4 +34,5 @@
 	delete mCullingManager;
 	delete mPreprocessingManager;
+	CullingLogManager::DelSingleton();
 }
 //-----------------------------------------------------------------------
@@ -65,11 +67,12 @@
 
 		default:
-			mCullingManager = new StopAndWaitCullingManager();
+			mCullingManager = new CoherentHierarchicalCullingManager(mAssumedVisibilityForChc);
 			break;
 
 		}
 
+		/////////
 		//-- set threshold
-		mCullingManager->SetVisibilityThreshold(mVisibilityThreshold);		
+		mCullingManager->SetVisibilityThreshold(mVisibilityThreshold);	
 	}
 }
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj	(revision 2280)
@@ -189,6 +189,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="..\lib\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="4"
 			CharacterSet="2">
@@ -204,6 +204,6 @@
 				OptimizeForProcessor="3"
 				OptimizeForWindowsApplication="TRUE"
-				AdditionalIncludeDirectories="..\include;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\..\Preprocessing\src"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -297,4 +297,7 @@
 			</File>
 			<File
+				RelativePath=".\CullingLogManager.cpp">
+			</File>
+			<File
 				RelativePath="..\src\CullingManager.cpp">
 			</File>
@@ -338,4 +341,7 @@
 			</File>
 			<File
+				RelativePath="..\include\CullingLogManager.h">
+			</File>
+			<File
 				RelativePath="..\include\CullingManager.h">
 			</File>
@@ -347,7 +353,4 @@
 			</File>
 			<File
-				RelativePath="..\include\DummyQueryManager.h">
-			</File>
-			<File
 				RelativePath="..\include\FrustumCullingManager.h">
 			</File>
@@ -378,7 +381,4 @@
 			<File
 				RelativePath="..\include\VisibilityManager.h">
-			</File>
-			<File
-				RelativePath="..\include\VisibilityMesh.h">
 			</File>
 		</Filter>
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp	(revision 112)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp	(revision 2280)
@@ -1,13 +1,21 @@
 #include "CullingManager.h"
+
 
 namespace GtpVisibility {
 
+
+
 //-----------------------------------------------------------------------
 CullingManager::CullingManager():
-mHierarchyInterface(NULL), mVisibilityThreshold(0), mNumQueryCulledNodes(0), 
-mNumFrustumCulledNodes(0), mNumQueriesIssued(0),
+mHierarchyInterface(NULL), 
+mVisibilityThreshold(0), 
+mNumQueryCulledNodes(0), 
+mNumFrustumCulledNodes(0), 
+mNumQueriesIssued(0),
 mVisualizeCulledNodes(false)
 {
 }
+
+
 //-----------------------------------------------------------------------
 void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface)
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp	(revision 2280)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp	(revision 2280)
@@ -0,0 +1,44 @@
+#include "CullingLogManager.h"
+
+
+using namespace std;
+
+
+namespace GtpVisibility {
+
+CullingLogManager *CullingLogManager::sLogManager = NULL;
+
+
+CullingLogManager::CullingLogManager()
+{
+	mOutStream.open("culling.log");
+}
+
+
+CullingLogManager *CullingLogManager::GetSingleton()
+{
+	if (!sLogManager)
+	{
+		sLogManager = new CullingLogManager();
+	}
+
+	return sLogManager;
+}
+
+
+void CullingLogManager::DelSingleton()
+{
+	if (sLogManager)
+	{
+		delete sLogManager;
+		sLogManager = NULL;
+	}
+}
+
+
+void CullingLogManager::LogMessage(const string &str)
+{
+	mOutStream << str.c_str() << endl;
+}
+
+}
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp	(revision 316)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp	(revision 2280)
@@ -1,3 +1,5 @@
 #include "DummyPreprocessingManager.h"
+#include <iostream>
+#include <fstream>
 
 namespace GtpVisibility {
@@ -25,19 +27,13 @@
 
   
-  /** 
-      Find viewcells intersecting a spherical neighborhood of a point.
-      Returns false if no viewcell was found.
-    */
-bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 &center,
+  
+/*bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 &center,
 												  const float radius,
 												  vector<int> *viewCellIds)
 {
   return false;
-}
+}*/
   
-/** 
-    Uses the specified viewcell to find its PVS
-*/
-int DummyPreprocessingManager::AddViewCellPVS(const int cellID,
+/*int DummyPreprocessingManager::AddViewCellPVS(const int cellID,
 					  NodeInfoContainer *visibleNodes,
 					  MeshInfoContainer *visibleMeshes )
@@ -47,4 +43,4 @@
   return false;
 }
-
+*/
 }
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2280)
@@ -1,4 +1,6 @@
 #include "RandomUpdateCullingManager.h"
-#include <OgreLogManager.h>
+#include <time.h>
+#include "CullingLogManager.h"
+
 
 namespace GtpVisibility {
@@ -31,5 +33,5 @@
 	/////////////
 	//-- PART 1: process finished occlusion queries
-
+	CullingLogManager::GetSingleton()->LogMessage("here55");
 	while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty())
 	{
@@ -113,5 +115,5 @@
 						Ogre::LogManager::getSingleton().logMessage("g");
 				}
-
+				
 				if (mHierarchyInterface->IsNodeFullyVisible(node))
 				{Ogre::LogManager::getSingleton().logMessage("here8");
@@ -183,12 +185,9 @@
 			mThreshold = RAND_MAX;
 	}
-	//std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str());
+
 }
 //-----------------------------------------------------------------------
 inline bool RandomUpdateCullingManager::DecideVisible(HierarchyNode *node) const
 {
-	//bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;
-	//Ogre::LogManager::getSingleton().logMessage(d.str()); return result;
-	
 	return rand() < mThreshold;
 }
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h	(revision 1312)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h	(revision 2280)
@@ -31,4 +31,5 @@
 #include "OgreKdTreeCamera.h"
 #include "HierarchyInterface.h"
+#include "VisibilityMesh.h"
 
 
@@ -228,5 +229,5 @@
 
 			// add contained geometry (Entities) to list
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) = 0;
+			virtual void getGeometryList(GeometryVector *geometryList) = 0;
 			
 			// create (when necessary), setup and return wire bounding box representing the node
@@ -351,5 +352,5 @@
 
 			// a branch has no geometry, do nothing
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) { }
+			virtual void getGeometryList(GeometryVector *geometryList) { }
 
 			// branches do not posses geometry => just merge child aabbs
@@ -412,5 +413,5 @@
 				Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false);
 
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList);
+			virtual void getGeometryList(GeometryVector *geometryList);
 
 			// update the world aabb based on the contained geometry
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdRenderable.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdRenderable.h	(revision 1195)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdRenderable.h	(revision 2280)
@@ -35,5 +35,5 @@
 
 		// place all entities in geometry queue (for CHC)
-		virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) = 0;
+		virtual void getGeometryList(GeometryVector *geometryList) = 0;
 
 		// return a bounding box enclosing all objects
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2280)
@@ -14,4 +14,5 @@
 #include "ViewCellsManager.h"
 #include "VisibilityInfo.h"
+#include "VisibilityMesh.h"
 
 
@@ -26,7 +27,6 @@
 
 
-/**
-	This class extends the terrain scene manager,
-	using occlusion queries for visibility culling.
+/** This class extends the terrain scene manager, using occlusion queries for 
+	visibility culling.
 */
 class __declspec(dllexport) OcclusionCullingSceneManager: public TerrainSceneManager
@@ -196,7 +196,8 @@
 								 const bool nodeVisibility);	
 
-	void AddVisibleMeshGeometryToQueue(const GtpVisibility::MeshInfoContainer &visibleGeometry, 
+	void AddVisibleMeshGeometryToQueue(const MeshInfoContainer &visibleGeometry, 
 									   Camera *cam);
-	void AddVisibleNodeGeometryToQueue(const GtpVisibility::NodeInfoContainer &visibleNodes, 
+
+	void AddVisibleNodeGeometryToQueue(const NodeInfoContainer &visibleNodes, 
 									   Camera *cam);
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h	(revision 2280)
@@ -49,5 +49,5 @@
 
 	void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,
-							 GtpVisibility::GeometryVector *geometryList, 
+							 GeometryVector *geometryList, 
 							 bool includeChildren);
 	
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h	(revision 1203)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h	(revision 2280)
@@ -35,5 +35,5 @@
 
 		// place all entities in geometry queue (for CHC)
-		virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList);
+		virtual void getGeometryList(GeometryVector *geometryList);
 
 		// return a bounding box enclosing all objects
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h	(revision 938)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h	(revision 2280)
@@ -6,10 +6,11 @@
 #include <OgreCamera.h>
 #include <OgreRenderSystem.h>
-
-//#include "OgreSolidHalfBoundingBox.h"
 #include "OgreSolidBoundingBox.h"
 #include "HierarchyInterface.h"
 #include "VisibilityInfo.h"
 #include "OgrePlatformOcclusionQuery.h"
+#include "VisibilityMesh.h"
+
+
 
 /** This namespace contains the Ogre dependent classes.
@@ -114,4 +115,13 @@
 	void ResetQueries();
 
+	/** Returns the geometry of a given hierarchy node. 
+		@param node the hierarchy node containing the geometry
+		@param geometryList geometry is returned in this list
+		@param includeChildren if the geometry of the children should be taken into account
+	*/
+	virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
+					 				 GeometryVector *geometryList, 
+									 bool includeChildren) = 0;
+
 protected:
 	/** Renders the given geometry 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchy.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchy.h	(revision 1344)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchy.h	(revision 2280)
@@ -228,5 +228,5 @@
 
 			// add contained geometry (Entities) to list
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) = 0;
+			virtual void getGeometryList(GeometryVector *geometryList) = 0;
 			
 			// create (when necessary), setup and return wire bounding box representing the node
@@ -355,5 +355,5 @@
 
 			// a branch has no geometry, do nothing
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) { }
+			virtual void getGeometryList(GeometryVector *geometryList) { }
 
 			// branches do not posses geometry => just merge child aabbs
@@ -416,5 +416,5 @@
 				Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false);
 
-			virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList);
+			virtual void getGeometryList(GeometryVector *geometryList);
 
 			// update the world aabb based on the contained geometry
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionQueriesQueryManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionQueriesQueryManager.h	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionQueriesQueryManager.h	(revision 2280)
@@ -2,10 +2,14 @@
 #define _OcclusionQueriesQueryManager_H__
 
+
 #include "OgrePlatformQueryManager.h"
+
 
 namespace Ogre {
   
-/**
-	Class which implements a query manager for Ogre scene queries using occlusion queries.
+class OgrePlatformHierarchyInterface;
+class Viewport;
+
+/** Class which implements a query manager for Ogre scene queries using occlusion queries.
 */
 class __declspec(dllexport) OcclusionQueriesQueryManager: public PlatformQueryManager
@@ -15,24 +19,26 @@
 		on different hierarchy types, while reusing the implementation of the query methods.
     */
-	OcclusionQueriesQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, 
+	OcclusionQueriesQueryManager(PlatformHierarchyInterface *hierarchyInterface, 
 								 Viewport *vp,
 								 int queryModes, 
-								 int itemBufferMode);
-    
+								 int itemBufferMode):  
+	PlatformQueryManager(hierarchyInterface, vp, queryModes), 
+	mItemBufferMode(itemBufferMode)
+	{}
+
     void ComputeCameraVisibility(const Camera &camera,
-								 GtpVisibility::NodeInfoContainer *visibleNodes,
-								 GtpVisibility::MeshInfoContainer *visibleGeometry,
-								 GtpVisibility::PatchInfoContainer *visiblePatches,
+								 NodeInfoContainer *visibleNodes,
+								 MeshInfoContainer *visibleGeometry,
+								 PatchInfoContainer *visiblePatches,
 								 const bool relativeVisibility,
 								 const bool approximateVisibility);
     
-    /** 
-	Uses the specified point to execute the visibility query in all directions. 
-	@sa ComputeCameraVisibility()
+    /** Uses the specified point to execute the visibility query in all directions. 
+		@sa ComputeCameraVisibility()
     */
     void ComputeFromPointVisibility(const Vector3 &point,
-									GtpVisibility::NodeInfoContainer *visibleNodes,
-									GtpVisibility::MeshInfoContainer *visibleGeometry,
-									GtpVisibility::PatchInfoContainer *visiblePatches,
+									NodeInfoContainer *visibleNodes,
+									MeshInfoContainer *visibleGeometry,
+									PatchInfoContainer *visiblePatches,
 									const bool relativeVisibility,
 									const bool approximateVisibility);
@@ -43,6 +49,6 @@
 	void CollectGeometryVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 
 								   GtpVisibility::QueryList::iterator &projQueryIt,
-								   GtpVisibility::GeometryVector *geometryList, 
-								   GtpVisibility::MeshInfoContainer *visibleGeometry,
+								   GeometryVector *geometryList, 
+								   MeshInfoContainer *visibleGeometry,
 								   bool relativeVisibility);
 
@@ -50,25 +56,24 @@
 							   GtpVisibility::QueryList::iterator &projQueryIt,
 							   GtpVisibility::NodeVector *nodeList, 
-							   GtpVisibility::NodeInfoContainer *visibleNodes,
+							   NodeInfoContainer *visibleNodes,
 							   bool relativeVisibility);
 
 	void CollectRelativeGeometryVisibilityForItemBuffer(GtpVisibility::QueryList::iterator &projQueryIt,
-												GtpVisibility::GeometryVector *geometryList, 
-												GtpVisibility::MeshInfoContainer *visibleGeometry);
+														GeometryVector *geometryList, 
+														MeshInfoContainer *visibleGeometry);
 
-	void CollectRelativePatchVisibilityForItemBuffer(
-									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::PatchVector *patchList, 
-									GtpVisibility::PatchInfoContainer *visiblePatches);
+	void CollectRelativePatchVisibilityForItemBuffer(GtpVisibility::QueryList::iterator &projQueryIt,
+													 PatchVector *patchList, 
+													 PatchInfoContainer *visiblePatches);
 
 	void CollectPatchVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 
 								GtpVisibility::QueryList::iterator &projQueryIt,
-								GtpVisibility::PatchVector *patchList, 
-								GtpVisibility::PatchInfoContainer *visiblePatches,
+								PatchVector *patchList, 
+								PatchInfoContainer *visiblePatches,
 								bool relativeVisibility);
 
-	void RemoveDuplicateNodes(GtpVisibility::NodeInfoContainer *visibleNodes);
-	void RemoveDuplicateGeometry(GtpVisibility::MeshInfoContainer *visibleMesh);
-	void RemoveDuplicatePatches(GtpVisibility::PatchInfoContainer *visiblePatches);
+	void RemoveDuplicateNodes(NodeInfoContainer *visibleNodes);
+	void RemoveDuplicateGeometry(MeshInfoContainer *visibleMesh);
+	void RemoveDuplicatePatches(PatchInfoContainer *visiblePatches);
 
 	/** Returns the patches of the geometry of a given node. 
@@ -77,5 +82,5 @@
 	*/
 	virtual void GetNodePatchList(GtpVisibility::HierarchyNode *node,	
-					 			  GtpVisibility::PatchVector *patchList);
+					 			  PatchVector *patchList);
 
 	int mItemBufferMode;
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h	(revision 2259)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h	(revision 2280)
@@ -43,6 +43,6 @@
 	
 	void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-					 GtpVisibility::GeometryVector *geometryList, 
-					 bool includeChildren);
+							 GeometryVector *geometryList, 
+							 bool includeChildren);
 
 	void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const {}
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/VisibilityMesh.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/VisibilityMesh.h	(revision 2280)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/VisibilityMesh.h	(revision 2280)
@@ -0,0 +1,28 @@
+#ifndef _VisibilityMesh_H__
+#define _VisibilityMesh_H__
+
+
+#include <OgreEntity.h>
+#include "VisibilityInfo.h"
+
+namespace GtpVisibility {
+  typedef Ogre::Entity Mesh;
+  typedef Ogre::SubEntity Patch;
+}
+
+
+typedef std::vector<GtpVisibility::Mesh *> GeometryVector;
+typedef std::vector<GtpVisibility::Patch *> PatchVector;
+
+
+typedef GtpVisibility::VisibilityInfo<GtpVisibility::Patch *> PatchInfo;
+typedef GtpVisibility::VisibilityInfo<GtpVisibility::Mesh *> MeshInfo;
+typedef GtpVisibility::VisibilityInfo<GtpVisibility::HierarchyNode *> NodeInfo;
+
+
+typedef std::vector<PatchInfo> PatchInfoContainer;
+typedef std::vector<MeshInfo> MeshInfoContainer;
+typedef std::vector<NodeInfo> NodeInfoContainer;
+
+
+#endif // VisibilityMesh.h
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h	(revision 2259)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h	(revision 2280)
@@ -91,5 +91,5 @@
 	*/
 	virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-									 GtpVisibility::GeometryVector *geometryList, 
+									 GeometryVector *geometryList, 
 									 bool includeChildren);
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchySceneNode.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchySceneNode.h	(revision 1320)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchySceneNode.h	(revision 2280)
@@ -35,5 +35,5 @@
 
 		// place all entities in geometry queue (for CHC)
-		virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList);
+		virtual void getGeometryList(GeometryVector *geometryList);
 
 		// return a bounding box enclosing all objects
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h	(revision 2259)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h	(revision 2280)
@@ -91,5 +91,5 @@
 	*/
 	virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-									 GtpVisibility::GeometryVector *geometryList, 
+									 GeometryVector *geometryList, 
 									 bool includeChildren);
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvhRenderable.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvhRenderable.h	(revision 1320)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvhRenderable.h	(revision 2280)
@@ -35,5 +35,5 @@
 
 		// place all entities in geometry queue (for CHC)
-		virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) = 0;
+		virtual void getGeometryList(GeometryVector *geometryList) = 0;
 
 		// return a bounding box enclosing all objects
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h	(revision 2280)
@@ -4,10 +4,11 @@
 #include "VisibilityInfo.h"
 #include "QueryManager.h"
-#include "HierarchyInterface.h"
+#include "OgrePlatformHierarchyInterface.h"
+#include "VisibilityMesh.h"
+
 
 namespace Ogre {
   
-/**
-	Class which implements the QueryManager for Ogre scene queries.
+/** Class which implements the QueryManager for Ogre scene queries.
 */
 class __declspec(dllexport) PlatformQueryManager: public GtpVisibility::QueryManager
@@ -17,27 +18,31 @@
 	    on different hierarchy types, while reusing the implementation of the query methods.
     */
-	PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, 
+	PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, 
 		                 Viewport *vp, 
-						 int queryModes);
+						 int queryModes)
+	: QueryManager(queryModes),
+	  mViewport(vp), 
+	  mWasInitialised(false),
+	  mHierarchyInterface(hierarchyInterface)
+	{}
     
-    /** 
-	Uses the specified point to execute the visibility query in all directions. 
-	@sa ComputeCameraVisibility()
+    /** Uses the specified point to execute the visibility query in all directions. 
+		@sa ComputeCameraVisibility()
     */
-    void ComputeFromPointVisibility(const Vector3 &point,
-									GtpVisibility::NodeInfoContainer *visibleNodes,
-									GtpVisibility::MeshInfoContainer *visibleGeometry,
-									GtpVisibility::PatchInfoContainer *visiblePatches,
-									const bool relativeVisibility,
-									const bool approximateVisibility);
+    virtual void ComputeFromPointVisibility(const Vector3 &point,
+											NodeInfoContainer *visibleNodes,
+											MeshInfoContainer *visibleGeometry,
+											PatchInfoContainer *visiblePatches,
+											const bool relativeVisibility,
+											const bool approximateVisibility);
   
-	void ComputeCameraVisibility(const Camera &camera,
-								 GtpVisibility::NodeInfoContainer *visibleNodes,
-								 GtpVisibility::MeshInfoContainer *visibleGeometry,
-								 GtpVisibility::PatchInfoContainer *visiblePatches,
-								 const bool relativeVisibility,
-								 const bool approximateVisibility);
+	virtual void ComputeCameraVisibility(const Camera &camera,
+										 NodeInfoContainer *visibleNodes,
+										 MeshInfoContainer *visibleGeometry,
+										 PatchInfoContainer *visiblePatches,
+										 const bool relativeVisibility,
+										 const bool approximateVisibility);
   
-	bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);  
+	//virtual bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);  
 
 	/** Sets a viewport for rendering.
@@ -46,16 +51,17 @@
 
 protected:
+
 #ifdef ITEM_BUFFER
-	void CollectItemBufferResults(
-				GtpVisibility::MeshInfoContainer *visibleGeometry,
-				GtpVisibility::PatchInfoContainer *visiblePatches);
+	void CollectItemBufferResults(MeshInfoContainer *visibleGeometry,
+								  PatchInfoContainer *visiblePatches);
 
-	void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry,
-						GtpVisibility::PatchInfoContainer *visiblePatches);
+	void InitItemBuffer(MeshInfoContainer *visibleGeometry,
+						PatchInfoContainer *visiblePatches);
 #endif // ITEM_BUFFER
 
 	Viewport *mViewport;
-	
 	bool mWasInitialised;
+
+	PlatformHierarchyInterface *mHierarchyInterface;
 };
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneNodeHierarchyInterface.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneNodeHierarchyInterface.cpp	(revision 370)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneNodeHierarchyInterface.cpp	(revision 2280)
@@ -137,6 +137,6 @@
 //-----------------------------------------------------------------------
 void SceneNodeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-											  GtpVisibility::GeometryVector *geometryList, 
-											  bool includeChildren)
+													  GeometryVector *geometryList, 
+													  bool includeChildren)
 {
 	SceneNode::ObjectIterator objIt = 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchyInterface.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchyInterface.cpp	(revision 2258)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchyInterface.cpp	(revision 2280)
@@ -138,5 +138,5 @@
 
 void BvHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 
-												   GtpVisibility::GeometryVector *geometryList, 
+												   GeometryVector *geometryList, 
 												   bool includeChildren) 
 {
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchySceneNode.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchySceneNode.cpp	(revision 1320)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchySceneNode.cpp	(revision 2280)
@@ -136,5 +136,5 @@
 	}
 
-	void BvHierarchySceneNode::getGeometryList(GtpVisibility::GeometryVector *geometryList)
+	void BvHierarchySceneNode::getGeometryList(GeometryVector *geometryList)
 	{
 		SceneNode::ObjectIterator objIt = getAttachedObjectIterator();
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp	(revision 2066)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp	(revision 2280)
@@ -136,5 +136,5 @@
 
 void KdTreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 
-												   GtpVisibility::GeometryVector *geometryList, 
+												   GeometryVector *geometryList, 
 												   bool includeChildren) 
 {
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp	(revision 2280)
@@ -54,5 +54,5 @@
 					 const Quaternion &orientation, const String& objName)
 {
-	char name[25];
+	char name[300];
 
 	sprintf(name, "%s Entity%d", objName.c_str(), GetObjectCount());
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp	(revision 2280)
@@ -8,17 +8,22 @@
 #include "OgrePlatformHierarchyInterface.h"
 
+
+
 namespace Ogre {
 
 //----------------------------------------------------------------------- 
-PlatformQueryManager::PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, 
+/*
+PlatformQueryManager::PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, 
 										   Viewport *vp, 
 										   int queryModes):
-QueryManager(hierarchyInterface, queryModes), 
+//QueryManager(hierarchyInterface, queryModes), 
+QueryManager(queryModes),
 mViewport(vp), 
-mWasInitialised(false)
-{
-}
-//-----------------------------------------------------------------------
-bool PlatformQueryManager::ShootRay(const Ray &ray, 
+mWasInitialised(false),
+mHierarchyInterface(hierarchyInterface)
+{
+}*/
+//-----------------------------------------------------------------------
+/*bool PlatformQueryManager::ShootRay(const Ray &ray, 
 									std::vector<Mesh *> *visibleMeshes, 
 									bool isGlobalLine)
@@ -26,13 +31,13 @@
     // run OGRE ray shooting query
     return false;
-}
+}*/
 //-----------------------------------------------------------------------
 void PlatformQueryManager::ComputeFromPointVisibility(
-					const Vector3 &point,
-					GtpVisibility::NodeInfoContainer *visibleNodes,
-					GtpVisibility::MeshInfoContainer *visibleGeometry,
-					GtpVisibility::PatchInfoContainer *visiblePatches,
-					const bool relativeVisibility,
-					const bool approximateVisibility)
+											const Vector3 &point,
+											NodeInfoContainer *visibleNodes,
+											MeshInfoContainer *visibleGeometry,
+											PatchInfoContainer *visiblePatches,
+											const bool relativeVisibility,
+											const bool approximateVisibility)
 {
 	SceneManager *sm =
@@ -105,7 +110,7 @@
 void PlatformQueryManager::ComputeCameraVisibility(
 									const Camera &camera,
-									GtpVisibility::NodeInfoContainer *visibleNodes,
-									GtpVisibility::MeshInfoContainer *visibleGeometry,
-									GtpVisibility::PatchInfoContainer *visiblePatches,
+									NodeInfoContainer *visibleNodes,
+									MeshInfoContainer *visibleGeometry,
+									PatchInfoContainer *visiblePatches,
 									const bool relativeVisibility,
 									const bool approximateVisibility)
@@ -162,6 +167,6 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::CollectItemBufferResults(
-				GtpVisibility::MeshInfoContainer *visibleGeometry,
-				GtpVisibility::PatchInfoContainer *visiblePatches)
+				MeshInfoContainer *visibleGeometry,
+				PatchInfoContainer *visiblePatches)
 {
 	int dimx = 0;
@@ -205,6 +210,6 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::InitItemBuffer(
-				GtpVisibility::MeshInfoContainer *visibleGeometry,
-				GtpVisibility::PatchInfoContainer *visiblePatches)
+				MeshInfoContainer *visibleGeometry,
+				PatchInfoContainer *visiblePatches)
 {
 	if (mWasInitialised)
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp	(revision 2069)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp	(revision 2280)
@@ -1707,5 +1707,5 @@
 
 //-------------------------------------------------------------------------
-void KdTree::Leaf::getGeometryList(GtpVisibility::GeometryVector *geometryList)
+void KdTree::Leaf::getGeometryList(GeometryVector *geometryList)
 {
 	KdRenderableList::iterator it = mKdRenderables.begin();
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj	(revision 2280)
@@ -282,6 +282,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="..\lib\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="2"
 			CharacterSet="2"
@@ -293,5 +293,5 @@
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="TRUE"
-				ImproveFloatingPointConsistency="TRUE"
+				ImproveFloatingPointConsistency="FALSE"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
@@ -300,5 +300,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE;PLUGIN_KD_TERRAIN_EXPORTS"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE;PLUGIN_KD_TERRAIN_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -322,5 +322,5 @@
 				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\Release&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\Release&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;..\..\GtpVisibility\lib\Release;..\..\lib\Release;..\lib\Release;&quot;$(OGRE_PATH)\Dependencies\lib\Release&quot;;..\..\..\Preprocessing\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;&quot;$(CG_LIB_PATH)&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTWorld\Release;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTScene\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\Release"
 				ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def"
-				GenerateDebugInformation="TRUE"
+				GenerateDebugInformation="FALSE"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -635,4 +635,7 @@
 				RelativePath="..\include\OgreVisibilityOptionsManager.h">
 			</File>
+			<File
+				RelativePath="..\include\VisibilityMesh.h">
+			</File>
 		</Filter>
 		<Filter
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2280)
@@ -12,10 +12,8 @@
 #include <OgreIteratorWrappers.h>
 #include <OgreHeightmapTerrainPageSource.h>
-//#include "Containers.h"
 #include "ViewCellsManager.h"
 #include <OgreConfigFile.h>
 #include "OgreTypeConverter.h"
 #include "OgreMeshInstance.h"
-//#include "common.h"
 #include "OgreBoundingBoxConverter.h"
 #include <OgreManualObject.h>
@@ -1160,5 +1158,5 @@
 	if (key == "HierarchyInterface")
 	{
-		* static_cast<GtpVisibility::HierarchyInterface **>(val) = mHierarchyInterface;
+		* static_cast<PlatformHierarchyInterface **>(val) = mHierarchyInterface;
 		return true;
 	}
@@ -1643,5 +1641,5 @@
 			LoadViewCells(filename, mObjects, false, &bconverter);
 	
-	Ogre::LogManager::getSingleton().logMessage("******** view cells loaded *********");
+	LogManager::getSingleton().logMessage("******** view cells loaded *********");
 
 	// objects are set to invisible initially
@@ -2027,5 +2025,5 @@
 		return;
 	}
-
+Ogre::LogManager::getSingleton().logMessage("here99");
     Root::getSingleton()._setCurrentSceneManager(this);
 	mActiveQueuedRenderableVisitor->targetSceneMgr = this;
@@ -2227,7 +2225,7 @@
 	mVisibilityManager->SetQueryManager(queryManager);
 
-	GtpVisibility::NodeInfoContainer visibleNodes;
-	GtpVisibility::MeshInfoContainer visibleGeometry;
-	GtpVisibility::PatchInfoContainer visiblePatches;
+	NodeInfoContainer visibleNodes;
+	MeshInfoContainer visibleGeometry;
+	PatchInfoContainer visiblePatches;
 
 	if (fromPoint)
@@ -2271,5 +2269,5 @@
 	if (!nodeVisibility)
 	{
-		GtpVisibility::MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end();
+		MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end();
 
 		for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt)
@@ -2294,5 +2292,5 @@
 		//-- apply queries on node level
 
-		GtpVisibility::NodeInfoContainer::iterator nodesIt, nodesIt_end = visibleNodes.end();
+		NodeInfoContainer::iterator nodesIt, nodesIt_end = visibleNodes.end();
 
 		for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++ nodesIt)
@@ -2433,8 +2431,8 @@
 //-----------------------------------------------------------------------
 void OcclusionCullingSceneManager::AddVisibleMeshGeometryToQueue(
-						const GtpVisibility::MeshInfoContainer &visibleGeometry,
+						const MeshInfoContainer &visibleGeometry,
 						Camera *cam)
 {
-	GtpVisibility::MeshInfoContainer::const_iterator geomIt, geomIt_end = visibleGeometry.end();
+	MeshInfoContainer::const_iterator geomIt, geomIt_end = visibleGeometry.end();
 
 	for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt)
@@ -2456,5 +2454,5 @@
 //-----------------------------------------------------------------------
 void OcclusionCullingSceneManager::AddVisibleNodeGeometryToQueue(
-						const GtpVisibility::NodeInfoContainer &visibleNodes,
+						const NodeInfoContainer &visibleNodes,
 						Camera *cam)
 {
@@ -2462,5 +2460,5 @@
 	//-- apply queries on node level
 
-	GtpVisibility::NodeInfoContainer::const_iterator nodesIt, nodesIt_end = visibleNodes.end();
+	NodeInfoContainer::const_iterator nodesIt, nodesIt_end = visibleNodes.end();
 
 	for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++ nodesIt)
@@ -2529,7 +2527,7 @@
 	mVisibilityManager->SetQueryManager(queryManager);
 
-	GtpVisibility::NodeInfoContainer visibleNodes;
-	GtpVisibility::MeshInfoContainer visibleGeometry;
-	GtpVisibility::PatchInfoContainer visiblePatches;
+	NodeInfoContainer visibleNodes;
+	MeshInfoContainer visibleGeometry;
+	PatchInfoContainer visiblePatches;
 
 	if (mUseFromPointQueries)
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp	(revision 1320)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp	(revision 2280)
@@ -29,9 +29,12 @@
 #include <OgreRoot.h>
 #include <OgreLogManager.h>
+#include <fstream>
 
 #include "OgreBvHierarchySceneManager.h"
 #include "VisibilityManager.h"
 #include "VisibilityEnvironment.h"
-		
+#include "CullingManager.h"
+
+
 GtpVisibility::VisibilityEnvironment *visEnv;
 GtpVisibility::VisibilityManager *visManager;
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2280)
@@ -189,5 +189,5 @@
 		int y = (i & 2) / 2;
 		int z = i & 1;
-
+		Ogre::LogManager::getSingleton().logMessage("y");
 		//std::stringstream d; d << "x " << x << " y " << y << " z " << z;
 		//LogManager::getSingleton().logMessage(d.str());
@@ -304,5 +304,5 @@
 //-----------------------------------------------------------------------
 void OctreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node,
-												   GtpVisibility::GeometryVector *geometryList, 
+												   GeometryVector *geometryList, 
 												   bool includeChildren)
 {
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp	(revision 1203)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp	(revision 2280)
@@ -136,5 +136,5 @@
 	}
 
-	void KdTreeSceneNode::getGeometryList(GtpVisibility::GeometryVector *geometryList)
+	void KdTreeSceneNode::getGeometryList(GeometryVector *geometryList)
 	{
 		SceneNode::ObjectIterator objIt = getAttachedObjectIterator();
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchy.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchy.cpp	(revision 2069)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchy.cpp	(revision 2280)
@@ -1713,5 +1713,5 @@
 
 //-------------------------------------------------------------------------
-void BvHierarchy::Leaf::getGeometryList(GtpVisibility::GeometryVector *geometryList)
+void BvHierarchy::Leaf::getGeometryList(GeometryVector *geometryList)
 {
 	BvhRenderableList::iterator it = mBvhRenderables.begin();
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp	(revision 2255)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp	(revision 2280)
@@ -1,8 +1,9 @@
-#include "OgreOcclusionQueriesQueryManager.h"
 #include <OgreLogManager.h>
 #include <OgreStringConverter.h>
 #include <vector>
 #include <OgreSubEntity.h>
-#include "OgrePlatformHierarchyInterface.h"
+
+#include "OgreOcclusionQueriesQueryManager.h"
+//#include "OgrePlatformHierarchyInterface.h"
 #include "OgreOcclusionCullingSceneManager.h"
 #include "VisibilityEnvironment.h"
@@ -13,19 +14,19 @@
 
 //----------------------------------------------------------------------- 
-OcclusionQueriesQueryManager::OcclusionQueriesQueryManager(
-							GtpVisibility::HierarchyInterface *hierarchyInterface, 
+/*OcclusionQueriesQueryManager::OcclusionQueriesQueryManager(
+							PlatformHierarchyInterface *hierarchyInterface, 
 							Viewport *vp,
 							int queryModes,
-							int itemBufferMode):
-PlatformQueryManager(hierarchyInterface, vp, queryModes), 
+							int itemBufferMode)
+:PlatformQueryManager(hierarchyInterface, vp, queryModes), 
 mItemBufferMode(itemBufferMode)
 {
-}
+}*/
 //-----------------------------------------------------------------------
 void OcclusionQueriesQueryManager::ComputeCameraVisibility(
 											const Camera &camera,
-											GtpVisibility::NodeInfoContainer *visibleNodes,
-											GtpVisibility::MeshInfoContainer *visibleGeometry,
-											GtpVisibility::PatchInfoContainer *visiblePatches,
+											NodeInfoContainer *visibleNodes,
+											MeshInfoContainer *visibleGeometry,
+											PatchInfoContainer *visiblePatches,
 											const bool relativeVisibility,
 											const bool approximateVisibility)
@@ -119,5 +120,5 @@
 
 	// vector for storing entities of meshes
-	GtpVisibility::GeometryVector geometryList;
+	GeometryVector geometryList;
 	
 	// store geometry of the hierarchy nodes in a geometry list
@@ -131,8 +132,8 @@
 	
 	// geometry list iterator
-	GtpVisibility::GeometryVector::iterator geometryIt, geometryIt_end = geometryList.end();
+	GeometryVector::iterator geometryIt, geometryIt_end = geometryList.end();
 
 	// vector for storing subentities of meshes
-	GtpVisibility::PatchVector patchList;
+	PatchVector patchList;
 
 	// store patchges of the geometries in a patch list
@@ -145,5 +146,5 @@
 	}
 
-	GtpVisibility::PatchVector::iterator patchIt, patchIt_end = patchList.end();
+	PatchVector::iterator patchIt, patchIt_end = patchList.end();
 
 	// to obtain the correct number of projected pixels, depth write must be disabled
@@ -183,5 +184,5 @@
 				const int projPixels = 1;
 
-				visibleNodes->push_back(GtpVisibility::NodeInfo(*nodeIt, visPixels, projPixels));
+				visibleNodes->push_back(NodeInfo(*nodeIt, visPixels, projPixels));
 				queryList[i].push_back(NULL);
 			}
@@ -207,5 +208,5 @@
 					const int projPixels = 1;
 
-					visibleGeometry->push_back(GtpVisibility::MeshInfo(*geometryIt, visPixels, projPixels));
+					visibleGeometry->push_back(MeshInfo(*geometryIt, visPixels, projPixels));
 				}
 				else
@@ -229,5 +230,5 @@
 					const int projPixels = 1;
 
-					visiblePatches->push_back(GtpVisibility::PatchInfo(*patchIt, visPixels, projPixels));
+					visiblePatches->push_back(PatchInfo(*patchIt, visPixels, projPixels));
 				}
 				else
@@ -304,7 +305,7 @@
 void OcclusionQueriesQueryManager::ComputeFromPointVisibility(
 								const Vector3 &point,
-								GtpVisibility::NodeInfoContainer *visibleNodes,
-								GtpVisibility::MeshInfoContainer *visibleGeometry,
-								GtpVisibility::PatchInfoContainer *visiblePatches,
+								NodeInfoContainer *visibleNodes,
+								MeshInfoContainer *visibleGeometry,
+								PatchInfoContainer *visiblePatches,
 								const bool relativeVisibility,
 								const bool approximateVisibility)
@@ -336,5 +337,5 @@
 						GtpVisibility::QueryList::iterator &projQueryIt,
 						GtpVisibility::NodeVector *nodeList,  
-						GtpVisibility::NodeInfoContainer *visibleNodes,
+						NodeInfoContainer *visibleNodes,
 						bool relativeVisibility)
 {
@@ -368,6 +369,5 @@
 		if (visiblePixels > 0)
 		{
-			visibleNodes->push_back(
-				GtpVisibility::NodeInfo(*nodeIt, visiblePixels, projectedPixels));
+			visibleNodes->push_back(NodeInfo(*nodeIt, visiblePixels, projectedPixels));
 		}
 	}
@@ -376,8 +376,8 @@
 void OcclusionQueriesQueryManager::CollectRelativeGeometryVisibilityForItemBuffer(
 									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::GeometryVector *geometryList, 
-									GtpVisibility::MeshInfoContainer *visibleGeometry)
-{
-	GtpVisibility::GeometryVector::iterator geometryIt;
+									GeometryVector *geometryList, 
+									MeshInfoContainer *visibleGeometry)
+{
+	GeometryVector::iterator geometryIt;
 
 	//-- queries for geometry
@@ -400,8 +400,8 @@
 void OcclusionQueriesQueryManager::CollectRelativePatchVisibilityForItemBuffer(
 									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::PatchVector *patchList, 
-									GtpVisibility::PatchInfoContainer *visiblePatches)
-{
-	GtpVisibility::PatchVector::iterator patchIt;
+									PatchVector *patchList, 
+									PatchInfoContainer *visiblePatches)
+{
+	PatchVector::iterator patchIt;
 
 	//-- queries for geometry
@@ -425,9 +425,9 @@
 							GtpVisibility::QueryList::iterator &visQueryIt, 
 							GtpVisibility::QueryList::iterator &projQueryIt,
-							GtpVisibility::GeometryVector *geometryList, 
-							GtpVisibility::MeshInfoContainer *visibleGeometry,
+							GeometryVector *geometryList, 
+							MeshInfoContainer *visibleGeometry,
 							bool relativeVisibility)
 {
-	GtpVisibility::GeometryVector::iterator geometryIt;
+	GeometryVector::iterator geometryIt;
 
 	//-- queries for geometry
@@ -451,6 +451,5 @@
 		if (visiblePixels > 0)
 		{			 
-			visibleGeometry->push_back(GtpVisibility::MeshInfo(*geometryIt, visiblePixels, 
-				projectedPixels));
+			visibleGeometry->push_back(MeshInfo(*geometryIt, visiblePixels, projectedPixels));
 		}
 	}
@@ -460,9 +459,9 @@
 							GtpVisibility::QueryList::iterator &visQueryIt, 
 							GtpVisibility::QueryList::iterator &projQueryIt,
-							GtpVisibility::PatchVector *patchList, 
-							GtpVisibility::PatchInfoContainer *visiblePatches,
+							PatchVector *patchList, 
+							PatchInfoContainer *visiblePatches,
 							bool relativeVisibility)
 {
-	GtpVisibility::PatchVector::iterator patchIt;
+	PatchVector::iterator patchIt;
 
 	//-- queries for patch
@@ -486,6 +485,6 @@
 		if (visiblePixels > 0)
 		{			 
-			visiblePatches->push_back(GtpVisibility::PatchInfo(*patchIt, visiblePixels, 
-				projectedPixels));
+			visiblePatches->push_back(
+				PatchInfo(*patchIt, visiblePixels, projectedPixels));
 		}
 	}
@@ -493,12 +492,12 @@
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicateNodes(
-					GtpVisibility::NodeInfoContainer *visibleNodes)
+					NodeInfoContainer *visibleNodes)
 {
 	sort(visibleNodes->begin(), visibleNodes->end());
 
-	GtpVisibility::NodeInfoContainer::iterator visibleNodesIt,
+	NodeInfoContainer::iterator visibleNodesIt,
 		visibleNodesIt_end = visibleNodes->end();
 	
-	GtpVisibility::NodeInfo *nodeInfo = NULL;
+	NodeInfo *nodeInfo = NULL;
 
 	for (visibleNodesIt = visibleNodes->begin(); visibleNodesIt != visibleNodesIt_end; 
@@ -521,12 +520,12 @@
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicateGeometry(
-				GtpVisibility::MeshInfoContainer *visibleGeometry)
+				MeshInfoContainer *visibleGeometry)
 {
 	sort(visibleGeometry->begin(), visibleGeometry->end());
 	
-	GtpVisibility::MeshInfoContainer::iterator visibleGeomIt,
+	MeshInfoContainer::iterator visibleGeomIt,
 			visibleGeomIt_end = visibleGeometry->end();
 
-	GtpVisibility::MeshInfo *geomInfo = NULL;
+	MeshInfo *geomInfo = NULL;
 
 	for (visibleGeomIt = visibleGeometry->begin(); visibleGeomIt != visibleGeomIt_end; 
@@ -549,12 +548,12 @@
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicatePatches(
-				GtpVisibility::PatchInfoContainer *visiblePatches)
+				PatchInfoContainer *visiblePatches)
 {
 	sort(visiblePatches->begin(), visiblePatches->end());
 	
-	GtpVisibility::PatchInfoContainer::iterator visiblePatchIt,
+	PatchInfoContainer::iterator visiblePatchIt,
 			visiblePatchIt_end = visiblePatches->end();
 
-	GtpVisibility::PatchInfo *patchInfo = NULL;
+	PatchInfo *patchInfo = NULL;
 
 	for (visiblePatchIt = visiblePatches->begin(); visiblePatchIt != visiblePatchIt_end; 
@@ -577,11 +576,11 @@
 //-----------------------------------------------------------------------
 void OcclusionQueriesQueryManager::GetNodePatchList(GtpVisibility::HierarchyNode *node,	
-					 			 					GtpVisibility::PatchVector *patchList)
-{
-	GtpVisibility::GeometryVector geomList;
+					 			 					PatchVector *patchList)
+{
+	GeometryVector geomList;
 	mHierarchyInterface->GetNodeGeometryList(node, &geomList, false);
 
 	// geometry list iterator
-	GtpVisibility::GeometryVector::iterator geomIt, geomIt_end = geomList.end();
+	GeometryVector::iterator geomIt, geomIt_end = geomList.end();
 
 	for (geomIt = geomList.begin(); geomIt != geomIt_end; ++geomIt)
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj	(revision 2278)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj	(revision 2280)
@@ -227,6 +227,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			OutputDirectory="..\lib\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="2"
 			CharacterSet="2">
@@ -243,5 +243,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;..\include;..\..\..\Preprocessing\src"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.cpp	(revision 2280)
@@ -31,4 +31,5 @@
 {
 	GtpVisibilityPreprocessor::Debug.open("debug.log");
+
 	// HACK: get any preprocessor to load file
 	// note should be preserved to allow manual mesh reloading,
Index: /GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj	(revision 2100)
+++ /GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj	(revision 2280)
@@ -199,6 +199,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="..\bin\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="1"
 			CharacterSet="2">
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.sh	(revision 2255)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.sh	(revision 2280)
@@ -31,5 +31,5 @@
 
 
-#$PROGRAM $ENVIRONMENT \
+$PROGRAM $ENVIRONMENT \
   -scene_filename=$SCENE_FILENAME \
   -view_cells_sampling_type=object_directional \
@@ -46,5 +46,29 @@
   -vsp_use_cost_heuristics=$USE_HEUR
 
-#sh movefiles.sh $LOG_PREFIX-$METHOD
+sh movefiles.sh $LOG_PREFIX-$METHOD
+
+#######################################################
+
+USE_HEUR=true
+ METHOD=int-2
+ echo "$SCENE $METHOD"
+
+
+$PROGRAM $ENVIRONMENT \
+  -scene_filename=$SCENE_FILENAME \
+  -view_cells_sampling_type=object_directional \
+  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+  -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \
+  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+  -hierarchy_construction_type=2 \
+  -hierarchy_construction_min_avg_rays_per_object=1 \
+  -hierarchy_construction_max_avg_rays_per_object=10 \
+  -bvh_use_sah=false \
+  -vsp_use_cost_heuristics=$USE_HEUR
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
 
 #######################################################
@@ -58,5 +82,5 @@
 echo "$SCENE $METHOD"
 
-$PROGRAM $ENVIRONMENT \
+#$PROGRAM $ENVIRONMENT \
   -scene_filename=$SCENE_FILENAME \
   -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
@@ -71,5 +95,5 @@
   -bvh_term_max_leaves=$NODES
 
-sh movefiles.sh $LOG_PREFIX-$METHOD
+#sh movefiles.sh $LOG_PREFIX-$METHOD
 
 
@@ -83,5 +107,5 @@
 echo "$SCENE $METHOD"
 
-$PROGRAM $ENVIRONMENT \
+#$PROGRAM $ENVIRONMENT \
   -scene_filename=$SCENE_FILENAME \
   -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
@@ -96,3 +120,3 @@
   -bvh_term_max_leaves=$NODES
 
-sh movefiles.sh $LOG_PREFIX-$METHOD
+#sh movefiles.sh $LOG_PREFIX-$METHOD
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2258)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2280)
@@ -1030,4 +1030,6 @@
 {
 	ObjectContainer preprocessorObjects;
+
+	if (!Debug.is_open()) Debug.open("debug.log");
 
 	return LoadViewCells(filename, 
Index: /GTP/trunk/Lib/Vis/GtpVisibility.sln
===================================================================
--- /GTP/trunk/Lib/Vis/GtpVisibility.sln	(revision 2278)
+++ /GTP/trunk/Lib/Vis/GtpVisibility.sln	(revision 2280)
@@ -14,4 +14,5 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VisibilitySceneManager", "OnlineCullingCHC\OGRE\src\Plugin_VisibilitySceneManager.vcproj", "{80DECC17-BDDD-4412-8CF8-F7C1C17A7436}"
 	ProjectSection(ProjectDependencies) = postProject
+		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
 		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
 		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
@@ -19,4 +20,12 @@
 		{101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900}
 		{EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
+		{7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}
 	EndProjectSection
 EndProject
@@ -32,4 +41,5 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\..\App\Demos\Vis\HillyTerrain\OGRE\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}"
 	ProjectSection(ProjectDependencies) = postProject
+		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
 		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}
 		{101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900}
@@ -38,5 +48,4 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestKdTree", "..\..\App\Demos\Vis\KdTreeDemo\OGRE\scripts\TestKdTree.vcproj", "{17F2C6F9-6101-430E-ABF4-71383868EF24}"
 	ProjectSection(ProjectDependencies) = postProject
-		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
 		{5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638}
 		{80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}
