Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DistanceQueue.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DistanceQueue.h	(revision 316)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DistanceQueue.h	(revision 722)
@@ -25,5 +25,5 @@
 	bool operator() (T v1, T v2) const
 	{
-		return mHierarchyInterface->GetSquaredDistance(v1) > mHierarchyInterface->GetSquaredDistance(v2);
+		return false;//mHierarchyInterface->GetSquaredDistance(v1) > mHierarchyInterface->GetSquaredDistance(v2);
 	}
 		
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 720)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 722)
@@ -11,5 +11,6 @@
 //-----------------------------------------------------------------------
 VisibilityManager::VisibilityManager(VisibilityEnvironment *visEnvironment):
-mVisibilityThreshold(0), mCullingManager(NULL),
+mVisibilityThreshold(0), 
+mCullingManager(NULL),
 mQueryManager(NULL),
 mPreprocessingManager(new DummyPreprocessingManager(NULL)),
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 675)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj	(revision 722)
@@ -266,4 +266,7 @@
 			</Filter>
 		</Filter>
+		<File
+			RelativePath=".\VTune\Plugin_VisibilitySceneManager.vpj">
+		</File>
 	</Files>
 	<Globals>
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 370)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 722)
@@ -51,11 +51,13 @@
 bool OctreeHierarchyInterface::HasGeometry(GtpVisibility::HierarchyNode *node) const
 {
-	return static_cast<Octree *>(node)->mNodes.size() > 0;
+	return !(static_cast<Octree *>(node))->mNodes.empty();
 }
 //-----------------------------------------------------------------------
 float OctreeHierarchyInterface::GetSquaredDistance(GtpVisibility::HierarchyNode *node) const
 {
-	AxisAlignedBox *box = &static_cast<Octree *>(node)->mBox;
-	Vector3 pos = ((box->getMaximum() - box->getMinimum()) * 0.5) + box->getMinimum();
+	LogManager::getSingleton().logMessage("here4");
+
+	const AxisAlignedBox &box = static_cast<Octree *>(node)->mBox;
+	const Vector3 pos = ((box.getMaximum() - box.getMinimum()) * 0.5) + box.getMinimum();
 	
 	return (mCullCamera->getDerivedPosition() - pos).squaredLength();
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp	(revision 118)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp	(revision 722)
@@ -9,4 +9,5 @@
 #include <OgrePass.h>
 #include <OgreTechnique.h>
+#include <OgreLogManager.h>
 
 namespace Ogre {
@@ -157,10 +158,9 @@
 Real SolidBoundingBox::getSquaredViewDepth(const Camera* cam) const
 {
-	Vector3 min, max, mid, dist;
-
-	min = mBox.getMinimum();
-	max = mBox.getMaximum();
-	mid = ((min - max) * 0.5) + min;
-	dist = cam->getDerivedPosition() - mid;
+	Ogre::LogManager::getSingleton().logMessage("here3");
+	const Vector3 &min = mBox.getMinimum();
+	const Vector3 &max = mBox.getMaximum();
+	const Vector3 &mid = ((min - max) * 0.5) + min;
+	const Vector3 &dist = cam->getDerivedPosition() - mid;
 
 	return dist.squaredLength();
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 712)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 722)
@@ -495,4 +495,7 @@
 			</File>
 		</Filter>
+		<File
+			RelativePath=".\VTune\Preprocessor.vpj">
+		</File>
 	</Files>
 	<Globals>
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h	(revision 720)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h	(revision 722)
@@ -549,4 +549,5 @@
 
 	int mSamplingType;
+	int mEvaluationSamplingType;
 	int mNumActiveViewCells;
 	bool mCompressViewCells;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 712)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 722)
@@ -1279,4 +1279,9 @@
 					"8000000");
 
+	RegisterOption("ViewCells.Evaluation.samplingType",
+			optString,
+			"view_cells_evaluation_sampling_type=",
+			"box");
+
 	RegisterOption("ViewCells.Evaluation.samplesPerPass",
 					optInt,
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 720)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 722)
@@ -97,7 +97,11 @@
 	
 	if (strcmp(buf, "box") == 0)
+	{
 		mSamplingType = Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION;
+	}
 	else if (strcmp(buf, "directional") == 0)
+	{
 		mSamplingType = Preprocessor::DIRECTION_BASED_DISTRIBUTION;
+	}
 	else 
 	{
@@ -106,5 +110,21 @@
 	}
 
-	environment->GetStringValue("ViewCells.Visualization.colorCode", buf);
+	environment->GetStringValue("ViewCells.Evaluation.samplingType", buf);
+	
+	if (strcmp(buf, "box") == 0)
+	{
+		mEvaluationSamplingType = Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION;
+	}
+	else if (strcmp(buf, "directional") == 0)
+	{
+		mEvaluationSamplingType = Preprocessor::DIRECTION_BASED_DISTRIBUTION;
+	}
+	else 
+	{
+		Debug << "error! wrong sampling type" << endl;
+		exit(0);
+	}
+
+    environment->GetStringValue("ViewCells.Visualization.colorCode", buf);
 
 	if (strcmp(buf, "PVS") == 0)
@@ -492,5 +512,5 @@
 	//VssRayContainer outRays;
 	// should directional sampling be used?
-	bool dirSamples = mSamplingType == Preprocessor::DIRECTION_BASED_DISTRIBUTION;
+	bool dirSamples = (mEvaluationSamplingType == Preprocessor::DIRECTION_BASED_DISTRIBUTION);
 
 	cout << "Evaluating view cell partition" << endl;
@@ -521,5 +541,5 @@
 		VssRayContainer evaluationSamples;
 
-		const int samplingType = mSamplingType;
+		const int samplingType = mEvaluationSamplingType;
 		/*	dirSamples ? 
 						Preprocessor::DIRECTION_BASED_DISTRIBUTION :
Index: GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.vcproj	(revision 656)
+++ GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.vcproj	(revision 722)
@@ -146,4 +146,7 @@
 		</Filter>
 		<File
+			RelativePath=".\VTune\EvalStats.vpj">
+		</File>
+		<File
 			RelativePath=".\ReadMe.txt">
 		</File>
