Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2287)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2288)
@@ -144,5 +144,6 @@
 	{
 		mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility;
-		if (mAssumedVisibility > 100) // fix visibility
+		 // fix visibility
+		if (mAssumedVisibility > 100)
 			mThreshold = RAND_MAX;
 	}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2255)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2288)
@@ -201,5 +201,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;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV;USE_SSE"
 				StringPooling="TRUE"
 				MinimalRebuild="TRUE"
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2255)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2288)
@@ -224,5 +224,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;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV;USE_SSE"
 				StringPooling="TRUE"
 				MinimalRebuild="TRUE"
@@ -1174,8 +1174,8 @@
 			</File>
 			<File
+				RelativePath=".\sparsehash\src\windows\hash_fun.h">
+			</File>
+			<File
 				RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h">
-			</File>
-			<File
-				RelativePath=".\sparsehash\src\windows\hash_fun.h">
 			</File>
 			<File
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h	(revision 2237)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h	(revision 2288)
@@ -13,4 +13,9 @@
 #include "HierarchyManager.h"
 #include "Timer/PerfTimer.h"
+
+#ifdef USE_SSE
+#include <xmmintrin.h>
+#endif
+
 
 
@@ -954,5 +959,7 @@
 	void EvalMinMaxDepth(int &minDepth, int &maxDepth);
 
-	/////////////////////////////////////////////////////////////////////////////
+
+
+	/////////////////////////////////////////////////////////////
 
 
@@ -972,11 +979,11 @@
 				  RayInfoContainer &backRays) const;
 
-	inline void UpdatePvsEntriesContribution(
-		const VssRay &ray,
-		const bool isTermination,
-		const int cf,
-		float &frontPvs,
-		float &backPvs,
-		float &totalPvs) const;
+
+	inline void UpdatePvsEntriesContribution(const VssRay &ray,
+											 const bool isTermination,
+											 const int cf,
+											 float &frontPvs,
+											 float &backPvs,
+											 float &totalPvs) const;
 
 	/** Classfifies the object with respect to the 
@@ -990,44 +997,44 @@
 	
 	*/
-	inline void UpdateContributionsToPvs(
-		const VssRay &ray,
-		const bool isTermination,
-		const int cf,
-		float &frontPvs,
-		float &backPvs,
-		float &totalPvs) const;
+	inline void UpdateContributionsToPvs(const VssRay &ray,
+										 const bool isTermination,
+										 const int cf,
+										 float &frontPvs,
+										 float &backPvs,
+										 float &totalPvs) const;
 
 	/** Evaluates the contribution for objects.
 	*/
-	inline void UpdateContributionsToPvs(
-		Intersectable *obj, 
-		const int cf, 
-		float &frontPvs, 
-		float &backPvs, 
-		float &totalPvs) const;
+	inline void UpdateContributionsToPvs(Intersectable *obj, 
+										 const int cf, 
+										 float &frontPvs, 
+										 float &backPvs, 
+										 float &totalPvs) const;
 
 	/** Evaluates the contribution for bounding volume leaves.
 	*/
-	inline void UpdateContributionsToPvs(
-		BvhLeaf *leaf,
-		const int cf,
-		float &frontPvs,
-		float &backPvs,
-		float &totalPvs,
-		const bool countEntries) const;
-
 	inline void UpdateContributionsToPvs(BvhLeaf *leaf,
 										 const int cf,
-										 float &frontPvs, float &backPvs, float &totalPvs,
-										 int &frontSize, int &backSize, int &totalSize) const;
+										 float &frontPvs,
+										 float &backPvs,
+										 float &totalPvs,
+										 const bool countEntries) const;
+
+	inline void UpdateContributionsToPvs(BvhLeaf *leaf,
+										 const int cf,
+										 float &frontPvs, 
+										 float &backPvs, 
+										 float &totalPvs,
+										 int &frontSize, 
+										 int &backSize, 
+										 int &totalSize) const;
 
 	/** Evaluates the contribution for kd leaves.
 	*/
-	inline void UpdateContributionsToPvs(
-		KdLeaf *leaf,
-		const int cf,
-		float &frontPvs,
-		float &backPvs,
-		float &totalPvs) const;
+	inline void UpdateContributionsToPvs(KdLeaf *leaf,
+										 const int cf,
+										 float &frontPvs,
+										 float &backPvs,
+										 float &totalPvs) const;
 
 	/** Returns true if tree can be terminated.
@@ -1114,4 +1121,17 @@
 	void TraverseRayPacket();
 
+#ifdef USE_SSE
+
+	struct RayPacket
+	{
+		union { float ox[4]; __m128 ox4; };
+		union { float oy[4]; __m128 oy4; };
+		union { float oz[4]; __m128 oz4; };
+		union { float dx[4]; __m128 dx4; };
+		union { float dy[4]; __m128 dy4; };
+		union { float dz[4]; __m128 dz4; };
+	};
+#endif
+
 protected:
 
@@ -1141,4 +1161,5 @@
 
 
+	/////////
 	//-- local termination
 
@@ -1158,6 +1179,7 @@
 	int mTermMissTolerance;
 
-
+	////////////
 	//-- global criteria
+
 	float mTermMinGlobalCostRatio;
 	int mTermGlobalCostMissTolerance;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp	(revision 2239)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp	(revision 2288)
@@ -22,7 +22,4 @@
 #include "OspTree.h"
 
-#if USE_SSE
-#include <xmmintrin.h>
-#endif
 
 
@@ -3930,18 +3927,10 @@
 }
 #endif
-/*
-struct RayPacket
-{
-	union { float ox[4]; __m128 ox4; };
-	union { float oy[4]; __m128 oy4; };
-	union { float oz[4]; __m128 oz4; };
-	union { float dx[4]; __m128 dx4; };
-	union { float dy[4]; __m128 dy4; };
-	union { float dz[4]; __m128 dz4; };
-};
-*/
+
+
+
 void VspTree::TraverseRayPacket()//RayBundle &rays)
 {
-#if USE_SSE
+#ifdef USE_SSE
 	VspNode *node;
 
