Index: /GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/scripts/TestKdTree.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/scripts/TestKdTree.vcproj	(revision 2121)
+++ /GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/scripts/TestKdTree.vcproj	(revision 2130)
@@ -102,5 +102,5 @@
 				OutputFile="$(OutDir)/$(ProjectName).exe"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;"
 				GenerateDebugInformation="TRUE"
 				SubSystem="2"
@@ -308,5 +308,5 @@
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine="copy $(OutDir)\$(TargetFileName) &quot;$(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)&quot;"/>
+				CommandLine="copy $(OutDir)\$(TargetFileName) &quot;$(OGRE_PATH)\Samples\Common\bin\Release"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
Index: /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2123)
+++ /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2130)
@@ -83,7 +83,7 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;..\..\Ogre\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include"
-				PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
-				RuntimeLibrary="2"
-				RuntimeTypeInfo="TRUE"
+				PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1"
+				RuntimeLibrary="2"
+				RuntimeTypeInfo="FALSE"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -258,6 +258,6 @@
 				OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCullingTerrain.exe"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\Lib\Release&quot;;&quot;$(OGRE_PATH)\OgreMain\Lib\Release&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\Release&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;..\..\Ogre\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib"
-				GenerateDebugInformation="TRUE"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\Lib\Release&quot;;&quot;$(OGRE_PATH)\OgreMain\Lib\Release&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\Release&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;..\..\Ogre\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib\Release;..\..\..\..\..\Lib\Vis\Preprocessing\lib\Release"
+				GenerateDebugInformation="FALSE"
 				SubSystem="2"
 				OptimizeReferences="2"
Index: /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp	(revision 2123)
+++ /GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp	(revision 2130)
@@ -646,6 +646,7 @@
 	}
 #else
-	
+
 	mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
+	
 	//mSceneMgr = mRoot->createSceneManager("TerrainSceneManager");
 	//mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj	(revision 2123)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj	(revision 2130)
@@ -73,5 +73,5 @@
 				Name="VCCLCompilerTool"
 				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;GAMETOOLS_ILLUMINATION_MODULE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1;USE_VERBOSE_PVS"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -219,6 +219,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
 			ConfigurationType="2"
 			CharacterSet="2">
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/terrainCulling.cfg
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/terrainCulling.cfg	(revision 2107)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/terrainCulling.cfg	(revision 2130)
@@ -26,5 +26,5 @@
 
 #Scene=../../../../../resources/media/house_test1.iv
-Scene=../../../../../resources/media/city1500_flat_1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv;../../../../../resources/media/CityPlane60.iv
+#Scene=../../../../../resources/media/city1500_flat_1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv;../../../../../resources/media/CityPlane60.iv
 #Scene=../../../../../resources/media/city1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv
 
@@ -33,5 +33,5 @@
 #
 
-ViewCells=../../../../../../../GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna-visibility.xml.gz
+#ViewCells=../../../../../../../GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna-visibility.xml.gz
 
 
@@ -40,5 +40,5 @@
 #
 
-FlushQueue=1
+#FlushQueue=true
 
 
@@ -50,5 +50,5 @@
 #
 
-#Scene=terrain
+Scene=terrain
 
 #
@@ -56,5 +56,5 @@
 #
 
-#FlushQueue=false
+FlushQueue=false
 
 #UseDepthPass=false
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp	(revision 2123)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp	(revision 2130)
@@ -364,8 +364,6 @@
 	else if (strKey == "UseViewCells")
 	{ 
-			Ogre::LogManager::getSingleton().logMessage("here44");
 		if (mViewCellsLoaded)
 		{
-				Ogre::LogManager::getSingleton().logMessage("here99");
 			mUseViewCells = *static_cast<const bool *>(pValue);
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj	(revision 2123)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj	(revision 2130)
@@ -20,5 +20,5 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				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"
+				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\ObjReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;..\..\..\Preprocessing\src\Timer"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE"
 				MinimalRebuild="TRUE"
@@ -41,5 +41,5 @@
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
-				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;$(CG_LIB_PATH)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;$(CG_LIB_PATH)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\$(ConfigurationName)&quot;"
 				ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def"
 				GenerateDebugInformation="TRUE"
@@ -87,8 +87,8 @@
 				OmitFramePointers="TRUE"
 				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="0"
+				OptimizeForProcessor="3"
 				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;..\..\..\Preprocessing\src\Timer;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
+				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;..\..\..\Preprocessing\src\Timer;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -297,5 +297,5 @@
 				OptimizeForProcessor="3"
 				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;..\IVReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include"
+				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"
 				StringPooling="TRUE"
@@ -318,5 +318,5 @@
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
-				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"
+				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="FALSE"
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2123)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2130)
@@ -176,6 +176,6 @@
 		float maxAxis = std::max(max_x, max_y);
 		maxAxis = std::max(maxAxis, max_z);
-		//resize(AxisAlignedBox( 0, 0, 0, maxAxis, maxAxis, maxAxis));
-		resize(AxisAlignedBox( 0, 0, 0, max_x, max_y, max_z ));
+		resize(AxisAlignedBox( 0, 0, 0, maxAxis, maxAxis, maxAxis));
+		//resize(AxisAlignedBox( 0, 0, 0, max_x, max_y, max_z ));
 
 		setupTerrainMaterial();
@@ -1844,5 +1844,5 @@
 	mTerrainPageSources.push_back(ps);
 	tsm->registerPageSource("Heightmap", ps);
-
+LogManager::getSingleton().logMessage("here4");
 	return tsm;
 }
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj	(revision 2123)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj	(revision 2130)
@@ -33,8 +33,8 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Preprocessor.lib xerces-c_2.lib zdll.lib zziplibd.lib"
-				OutputFile="$(OutDir)/ObjReader.dll"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib"
+				AdditionalDependencies="OgreMain_d.lib Preprocessor.lib xerces-c_2D.lib zdll.lib zziplibd.lib"
+				OutputFile="$(OutDir)/ObjReader.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\Preprocessing\src\GL"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
@@ -73,5 +73,5 @@
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="&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;GAMETOOLS_ILLUMINATION_MODULE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
@@ -86,5 +86,5 @@
 				OutputFile="$(OutDir)/ObjReader.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL"
 				GenerateDebugInformation="FALSE"
 				SubSystem="2"
@@ -219,6 +219,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
 			ConfigurationType="2"
 			CharacterSet="2">
@@ -232,7 +232,7 @@
 				OmitFramePointers="TRUE"
 				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="3"
+				OptimizeForProcessor="0"
 				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"
+				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"
 				StringPooling="TRUE"
@@ -246,9 +246,9 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib"
-				OutputFile="$(OutDir)/ObjReader.dll"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="&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;"
-				GenerateDebugInformation="TRUE"
+				AdditionalDependencies="OgreMain.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib RTScene.lib RTWorld.lib"
+				OutputFile="$(OutDir)/ObjReader.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\lib\Release&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\Release&quot;;..\..\GtpVisibility\lib\Release;..\..\lib\Release;..\lib\Release;..\..\..\Preprocessing\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTWorld\Release;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTScene\Release"
+				GenerateDebugInformation="FALSE"
 				SubSystem="2"
 				OptimizeReferences="2"
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2099)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2130)
@@ -13,5 +13,6 @@
 export PATH=$PATH:../bin
 
-NUM_SAMPLE_RAYS=1000000000
+#NUM_SAMPLE_RAYS=1000000000
+NUM_SAMPLE_RAYS=10000000
 
 $PREPROCESSOR -total_samples=$NUM_SAMPLE_RAYS \
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh	(revision 2130)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#PREPROCESSOR=../bin/release/preprocessor.exe
-PREPROCESSOR=../bin/debug/preprocessor.exe
+PREPROCESSOR=../bin/release/preprocessor.exe
+#PREPROCESSOR=../bin/debug/preprocessor.exe
 
 if [ $# -ne 3 ]
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2120)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2130)
@@ -81,5 +81,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\MultiLevelRayTracing;Timer"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT;USE_VERBOSE_PVS"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -199,5 +199,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_BIT_PVS"
 				ExceptionHandling="TRUE"
 				RuntimeLibrary="2"
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 2130)
@@ -2785,4 +2785,8 @@
 					"99990.0");
 	
+	RegisterOption("Hierarchy.useTraversalTree",
+					optBool,
+					"hierarchy_use_traversal_tree=",
+					"false");
 
 	///////////////////////////////////////////////////////
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2123)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2130)
@@ -222,5 +222,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_BIT_PVS"
 				ExceptionHandling="TRUE"
 				RuntimeLibrary="2"
@@ -383,7 +383,4 @@
 			</File>
 			<File
-				RelativePath=".\BitVectorPvs.cpp">
-			</File>
-			<File
 				RelativePath=".\BitVectorPvs.h">
 			</File>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h	(revision 2130)
@@ -612,4 +612,6 @@
 	BvHierarchy *mBvHierarchy;
 	
+	bool mUseTraversalTree;
+
 protected:
 
@@ -682,6 +684,4 @@
 
 	ViewCellContainer mOldViewCells;
-
-	//ObjectPvs mOldPvs;
 };
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 2066)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 2130)
@@ -137,5 +137,5 @@
 	  
 
-	  rssSamples += vssRays.size();
+	  rssSamples += (int)vssRays.size();
 	  for (int j=0; j < vssRays.size(); j++)
 		if (vssRays[j]->mFlags & VssRay::Valid) {
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2130)
@@ -389,5 +389,5 @@
 			if (IsValidViewSpace(viewCell) && 
 				GenerateViewPoints(viewCell, nViewPoints, viewPoints))
-			{cout << "here99" << endl;
+			{
 				Debug << "vc: " << viewCell->GetId() << endl;
 
@@ -1289,5 +1289,5 @@
 	ViewCellContainer viewCells;
 #ifdef USE_BIT_PVS
-	cout << "objects size: " << ObjectPvsIterator::sObjects.size() << endl;
+	cout << "objects size: " << (int)ObjectPvsIterator::sObjects.size() << endl;
 	cout << "pvs size: " <<  ObjectPvs::sPvsSize << endl;
 #endif
@@ -7022,9 +7022,13 @@
 
 	if (1)
-	{	// create a traversal tree for optimal view cell casting
-		mHierarchyManager->CreateTraversalTree();
-	}
-}
-
-
-}
+	{	
+		if (mHierarchyManager->mUseTraversalTree)
+		{
+			// create a traversal tree for optimal view cell casting
+			mHierarchyManager->CreateTraversalTree();
+		}
+	}
+}
+
+
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/TraversalTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/TraversalTree.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/TraversalTree.cpp	(revision 2130)
@@ -640,5 +640,5 @@
 			// hack: assume that we use vsp tree, 
 			//P so we can just test intersection with bounding boxes
-			if (viewCell->GetBox().Intersects(lStart, lEnd));
+			if (viewCell->GetBox().Intersects(lStart, lEnd))
 			{
 				hitViewCells.push_back(viewCell);
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp	(revision 2119)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp	(revision 2130)
@@ -403,5 +403,5 @@
   cout<<"Dirr Bbox = "<<dirBBox<<endl;
   
-  stat.rays = rays.size();
+  stat.rays = (int)rays.size();
   stat.initialPvsSize = 0;
   for (int i=0; i < mRoots.size(); i++) {
@@ -862,5 +862,5 @@
 	info.axis = axis;
 	info.costRatio = 0.5f; // not true but good for speeding up the subdivision at the top levels!
-	info.raysBack = info.raysFront = leaf->rays.size()/2;
+	info.raysBack = info.raysFront = (int)leaf->rays.size()/2;
 	return;
   }
@@ -953,5 +953,5 @@
 
   currInfo.raysBack = 0;
-  currInfo.raysFront = leaf->rays.size();
+  currInfo.raysFront = (int)leaf->rays.size();
   
   currInfo.pvsBack = 0;
@@ -1135,5 +1135,5 @@
   splitCandidates->clear();
   
-  int requestedSize = 2*(node->rays.size());
+  int requestedSize = 2*((int)node->rays.size());
   // creates a sorted split candidates array
   if (splitCandidates->capacity() > 500000 &&
@@ -1195,6 +1195,6 @@
   }
 
-  if ( (int)(leaf->rays.size()) > stat.maxRayRefs)
-    stat.maxRayRefs = leaf->rays.size();
+  if ((int)leaf->rays.size() > stat.maxRayRefs)
+    stat.maxRayRefs = (int)leaf->rays.size();
 
 }
@@ -1321,5 +1321,5 @@
   // update stats
   stat.rayRefs -= (int)leaf->rays.size();
-  stat.rayRefs += back->rays.size() + front->rays.size();
+  stat.rayRefs += (int)(back->rays.size() + front->rays.size());
 
   
@@ -1461,5 +1461,5 @@
   Debug<<"done."<<endl<<flush;
 
-  stat.rayRefs += add.size() - remove.size();
+  stat.rayRefs += (int)add.size() - (int)remove.size();
 
   Debug<<"Updating statistics..."<<endl<<flush;
@@ -1817,5 +1817,5 @@
 	}
   }
-  return pvs.size();
+  return (int)pvs.size();
 }
 
@@ -2021,5 +2021,5 @@
 					  )
 {
-  int nrays = leaf->rays.size();
+  int nrays = (int)leaf->rays.size();
 
   if (nrays == 2) {
@@ -2040,5 +2040,5 @@
 
   if (r1 == r2)
-	r2 = (r1+1)%leaf->rays.size();
+	r2 = (r1+1)%(int)leaf->rays.size();
 
 #else
@@ -2158,5 +2158,5 @@
   int indices[3];
 
-  int size = rays.size();
+  int size = (int)rays.size();
   // use russian roulete selection for the tripple
   // number of free positions for the bullet
@@ -2230,5 +2230,5 @@
 	for (; ri != rays.end(); ++ri, ++rayIndex) {
 	  RssTreeNode::RayInfo *ray = *ri;
-	  int tries = rays.size();
+	  int tries = (int)rays.size();
 	  for (int i = 0; i < tries; i++) {
 		int r1, r2, r3;
@@ -2648,5 +2648,5 @@
   }
   
-  return rays.size();
+  return (int)rays.size();
   
 }
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ObjectsParser.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ObjectsParser.cpp	(revision 2123)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ObjectsParser.cpp	(revision 2130)
@@ -364,5 +364,4 @@
 
 			GzFileInputSource isource(myFilePath);
-			Debug<<"here93" << endl;
 			parser->parse(isource);
 #else
@@ -370,5 +369,5 @@
 
 #endif
-Debug<<"here932" << endl;
+
 			const unsigned long endMillis = XMLPlatformUtils::getCurrentMillis();
 			duration = endMillis - startMillis;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 2130)
@@ -160,4 +160,7 @@
 		"Hierarchy.Construction.minAvgRayContri", mMinAvgRayContri);
 
+	Environment::GetSingleton()->GetBoolValue(
+		"Hierarchy.useTraversalTree", mUseTraversalTree);
+
 	// for comparing it with byte - value
 	mTermMaxMemory *= (1024.0f * 1024.0f);
@@ -399,5 +402,5 @@
 
 	// create a traversal tree which is optimized for view cell casting 
-	if (1) 
+	if (mUseTraversalTree) 
 	{
 		CreateTraversalTree();
Index: /GTP/trunk/Lib/Vis/GtpVisibility.sln
===================================================================
--- /GTP/trunk/Lib/Vis/GtpVisibility.sln	(revision 2123)
+++ /GTP/trunk/Lib/Vis/GtpVisibility.sln	(revision 2130)
@@ -16,4 +16,5 @@
 		{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}
