Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.sh	(revision 2540)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.sh	(revision 2625)
@@ -15,6 +15,6 @@
 SCENE_PATH=../data/vienna
 
-#SCENE=arena-high-lods
-#SCENE_PATH=../data/Arena
+SCENE=arena-high-lods
+SCENE_PATH=../data/Arena
 
 
@@ -29,11 +29,13 @@
 #######################################################
 
-METHOD=seq
+NODES=4000
+VIEWCELLS=5000
 
-NODES=4000
-VIEWCELLS=4000
 USE_HEUR=false
 OBJ_WEIGHT=20
+
 SAMPLES=1000000
+
+METHOD=$VIEWCELLS-viewcells.xml.gz
  
 echo "$SCENE $METHOD"
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env	(revision 2596)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env	(revision 2625)
@@ -126,4 +126,6 @@
 ViewCells {
 	
+	useKdPvs true
+
 	# samples used for view cell construction 
 	# (after the sampling used for the hierarchy)
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2596)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2625)
@@ -7,4 +7,7 @@
 SCENE=../data/Arena/arena-high-lods.obj
 VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
+VIEWCELLS=../data/Arena/arena-high-lods-10000-viewcells.xml.gz
+VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
+
 
 #-rss_distributions=mutation+object_direction+spatial \
Index: P/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells	(revision 2075)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#!/bin/sh
-
-PROGRAM=../bin/release/Preprocessor.exe
-#PROGRAM=../bin/Debug/Preprocessor.exe
-
-
-
-#SCENE=soda5
-#SCENE=soda
-#SCENE=cube
-#SCENE=atlanta
-SCENE=generate_viewcells
-
-LOG_PREFIX=../scripts/soda
-
-ENVIRONMENT=$SCENE.env
-
-
-###############################################
-
-METHOD=avs
-echo "$SCENE $METHOD"
-
-$PROGRAM $ENVIRONMENT \
--view_cells_type=vspOspTree \
--view_cells_construction_samples=0 \
--vsp_bsp_construction_samples=500000 \
--vsp_bsp_term_max_view_cells=1000 \
--view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
--view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
--vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
--view_cells_post_process_merge=false \
--view_cells_active=5000 \
--view_cells_filename=$LOG_PREFIX-viewcells.xml.gz \
--view_cells_export_pvs=true \
--view_cells_export_bounding_boxes=true \
--vsp_bsp_term_min_pvs=0 \
--view_cells_evaluate=false \
--vsp_bsp_use_cost_heuristics=true \
--vsp_bsp_max_poly_candidates=0 \
--vsp_bsp_use_split_cost_queue=true \
--view_cells_show_visualization=true \
--view_cells_construction_samples=0 \
--view_cells_evaluation_samples=2000000 \
--view_cells_evaluation_samples_per_pass=1000000
-
-
-mv debug.log $LOG_PREFIX-$METHOD-debug.log
-mv merged_view_cells.wrl $LOG_PREFIX-$METHOD-merged_view_cells.wrl
-mv merged_view_cells_pvs.wrl $LOG_PREFIX-$METHOD-merged_view_cells_pvs.wrl
-mv final_view_cells.x3d $LOG_PREFIX-$METHOD-final_view_cells.x3d
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.h	(revision 2615)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.h	(revision 2625)
@@ -84,5 +84,6 @@
 	based on heuristical sampling of view space.
 */
-class GvsPreprocessor : public Preprocessor {
+class GvsPreprocessor : public Preprocessor 
+{
 
 public:
@@ -190,9 +191,12 @@
 						 Vector3 &newPoint) const;
 
-	bool NextViewCell();
+	ViewCell *NextViewCell();
 
 	void GlobalComputation();
 
+	/** Loops over aall view cellls.
+	*/
 	void PerViewCellComputation();
+	void PerViewCellComputation2();
 
 	void VisualizeViewCells();
@@ -205,20 +209,23 @@
 	void UpdatePvs(ViewCell *currentViewCell);
 
+	void ClearRayQueue();
+
+	void CompileViewCellsList();
+
+	void GetObjectPvs(ObjectContainer &trianglePvs) const;
+
+	bool HasContribution(VssRay &ray);
+
+	void IntersectWithViewCell();
+
+	void DeterminePvsObjects(VssRayContainer &rays);
+
+	void StorePvs(const ObjectContainer &objectPvs);
+
+	void ComputeViewCell(ViewCell *vc);
+	/** Runs gvs on the current view cell.
+	*/
 	void ProcessViewCell();
-	void ClearRayQueue();
-
-	void CompileViewCellsList();
-
-	void GetObjectPvs(ObjectContainer &trianglePvs) const;
-
-	bool HasContribution(VssRay &ray);
-
-	void IntersectWithViewCell();
-
-	void DeterminePvsObjects(VssRayContainer &rays);
-
-	//virtual void ComputeRenderError();
-
-	void StorePvs(const ObjectContainer &objectPvs);
+
 
 
@@ -266,4 +273,6 @@
 
 	bool mEvaluatePixelError;
+
+	Vector3 mCurrentViewPoint;
 };
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 2609)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 2625)
@@ -117,6 +117,8 @@
 	Environment::GetSingleton()->GetBoolValue("VspBspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis);
 	
+	
 	//////////////////////
 	//-- termination criteria for axis aligned split
+
 	Environment::GetSingleton()->GetFloatValue("VspBspTree.Termination.AxisAligned.maxRayContribution", 
 								mTermMaxRayContriForAxisAligned);
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h	(revision 2614)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h	(revision 2625)
@@ -584,4 +584,6 @@
 
 
+	void UpdateStatsForViewCell(ViewCell *viewCell, Intersectable *obj);
+
 
 	//////////////////////////////////////////////////////////////////
@@ -689,6 +691,4 @@
 	void EvaluateViewCellsStats();
 	
-
-	void UpdateStatsForViewCell(ViewCell *viewCell, Intersectable *obj);
 
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2622)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2625)
@@ -800,7 +800,5 @@
 		{
 			float dist = Magnitude(mSceneGraph->GetBox().Diagonal()) * mTopDistance;
-			Vector3 pos = mViewPoint  + dist*Vector3(0,
-				1,
-				0);
+			Vector3 pos = mViewPoint  + dist * Vector3(0,	1, 0);
 
 			Vector3 target = mViewPoint;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h	(revision 2621)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h	(revision 2625)
@@ -32,4 +32,5 @@
 class GlobalLinesRenderer;
 class SceneGraphLeaf;
+class GlRendererWidget;
 
 
@@ -258,4 +259,5 @@
 
 	GlRendererBuffer *renderer;
+	GlRendererWidget *mRendererWidget;
 
 	int mTotalSamples;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2619)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2625)
@@ -474,4 +474,7 @@
 inline void disposeRays(VssRayContainer &rays, VssRayContainer *outRays)
 {
+	// hack matt
+	return;
+
 	cout << "disposing samples ... ";
 	long startTime = GetTime();
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2615)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2625)
@@ -305,18 +305,19 @@
 
 	if (evalPixelError && (importRandomViewCells || frames))
-	  {
+	{
 		QGLFormat f;
 		f.setStencil(true);
 		QGLFormat::setDefaultFormat(f);
+
 		// NOTE: render texture should be power of 2 and square
 		// renderer must be initialised
 		// $$matt
 		preprocessor->renderer = 
-		  new QtGlRendererBuffer(512, 512,
-								 preprocessor->mSceneGraph,
-								 preprocessor->mViewCellsManager,
-								 preprocessor->mKdTree);
-		
-	  }
+			new QtGlRendererBuffer(512, 512,
+			preprocessor->mSceneGraph,
+			preprocessor->mViewCellsManager,
+			preprocessor->mKdTree);
+
+	}
 	
 	if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)
@@ -343,9 +344,11 @@
 			rendererWidget = 
 				new QtGlRendererWidget(preprocessor->mSceneGraph,
-				preprocessor->mViewCellsManager,
-				preprocessor->mKdTree);
+									   preprocessor->mViewCellsManager,
+									   preprocessor->mKdTree);
 
 			rendererWidget->Show();
 
+			// hack matt
+			preprocessor->mRendererWidget = rendererWidget;
 			//rendererWidget->SetWindowTitle("Global Visualization");
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 2620)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 2625)
@@ -208,4 +208,5 @@
   void SetViewDirection(const Vector3 &vd) { mViewDirection = vd; }
 
+  Vector3 GetViewPoint() const { return mViewPoint; }
 public:
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp	(revision 2615)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp	(revision 2625)
@@ -35,5 +35,6 @@
 mSamplingType(SamplingStrategy::VIEWCELL_BASED_DISTRIBUTION),
 mProcessedViewCells(0),
-mCurrentViewCell(NULL)
+mCurrentViewCell(NULL),
+mCurrentViewPoint(Vector3(0.0f, 0.0f, 0.0f))
 {
 	Environment::GetSingleton()->GetIntValue("GvsPreprocessor.totalSamples", mTotalSamples);
@@ -96,5 +97,5 @@
 
 
-bool GvsPreprocessor::NextViewCell()
+ViewCell *GvsPreprocessor::NextViewCell()
 {
 	//if (mViewCellsManager->GetNumViewCells() == mProcessedViewCells)
@@ -102,18 +103,18 @@
 
 	if (mProcessedViewCells == (int)mViewCells.size())
-		return false; // no more view cells
-
-	mCurrentViewCell = mViewCells[mProcessedViewCells];
-
-   if (!mCurrentViewCell->GetMesh())
-		mViewCellsManager->CreateMesh(mCurrentViewCell);
-
-	mGvsStats.mViewCellId = mCurrentViewCell->GetId();
-
-	Debug << "vc: " << mCurrentViewCell->GetId() << endl;
+		return NULL; // no more view cells
+
+	ViewCell *vc = mViewCells[mProcessedViewCells];
+
+   if (!vc->GetMesh())
+		mViewCellsManager->CreateMesh(vc);
+
+	mGvsStats.mViewCellId = vc->GetId();
+
+	Debug << "vc: " << vc->GetId() << endl;
 
 	++ mProcessedViewCells;
     
-	return true;
+	return vc;
 }
 
@@ -178,5 +179,5 @@
 		result = ray.mPvsContribution > 0;
 	}
-	else
+	else // original per view cell gvs
 	{
 		Intersectable *obj = ray.mTerminationObject;
@@ -187,4 +188,5 @@
 			mTrianglePvs.push_back(obj);
 		
+			// if using kd pvs, exchange the triangle with the node in the pvs
 			if (mUseKdPvs)
 			{
@@ -194,5 +196,7 @@
 				{
 					node->Mail();
-					mKdPvs.push_back(mKdTree->GetOrCreateKdIntersectable(node));
+					KdIntersectable *kdInt = mKdTree->GetOrCreateKdIntersectable(node);
+					mCurrentViewCell->GetPvs().AddSampleDirty(kdInt, 1.0f);
+					mViewCellsManager->UpdateStatsForViewCell(mCurrentViewCell, kdInt);
 				}			
 			}
@@ -478,11 +482,7 @@
 	// the point is chosen to be on the side closer to the original ray
 	if (Distance(pt1, pt3) < Distance(pt2, pt3))
-	{
 		newPoint = pt1 + eps * (pt1 - pt2);
-	}	
 	else
-	{
 		newPoint = pt2 + eps * (pt2 - pt1);
-	}
 
 	//cout << "passing point: " << newPoint << endl << endl;
@@ -874,6 +874,13 @@
         KdLeaf *leaf = *lit;
 		
+		// add to kdnode pvs
 		if (mUseKdPvs)
-			mKdPvs.push_back(mKdTree->GetOrCreateKdIntersectable(leaf));
+		{
+			leaf->Mail();
+			KdIntersectable *kdInt = mKdTree->GetOrCreateKdIntersectable(leaf);
+			mCurrentViewCell->GetPvs().AddSampleDirty(kdInt, 1.0f);
+	
+			mViewCellsManager->UpdateStatsForViewCell(mCurrentViewCell, kdInt);
+		}
 
 		ObjectContainer::const_iterator oit, oit_end = leaf->mObjects.end();
@@ -898,106 +905,51 @@
 void GvsPreprocessor::PerViewCellComputation()
 {
-	// hack: reset counter
-	ObjectContainer::const_iterator oit, oit_end = mObjects.end();
-
-	for (oit = mObjects.begin(); oit != oit_end; ++ oit)
-	{
-		(*oit)->mCounter = 0;
-	}
-	
-	
-	while (NextViewCell())// && (dummy < 3))
-	{
-		//++ dummy;
-		//if (mProcessedViewCells < 53) continue;
-	
-		if (mUseKdPvs)
-		{
-			KdNode::NewMail();
-			mKdPvs.clear();
-		}
-
-		long startTime = GetTime();
-		cout << "\n***********************\n" 
-			 << "processing view cell " << mProcessedViewCells 
-			 << " (id: " << mCurrentViewCell->GetId() << ")" << endl;
-
-		// compute the pvs of the current view cell
-		ProcessViewCell();
-
-		//mGvsStats.mTrianglePvs = mCurrentViewCell->GetPvs().GetSize();
-		mGvsStats.mTrianglePvs = (int)mTrianglePvs.size();
-		mGvsStats.mTotalTrianglePvs += mGvsStats.mTrianglePvs;
-
-		if (!mUseKdPvs)
-		{
-			ObjectContainer objectPvs;
-
-			// optain object pvs
-			GetObjectPvs(objectPvs);
-
-			// add pvs
-			ObjectContainer::const_iterator it, it_end = objectPvs.end();
-
-			for (it = objectPvs.begin(); it != it_end; ++ it)
-			{
-				mCurrentViewCell->GetPvs().AddSampleDirty(*it, 1.0f);
-			}
-
-			cout << "triangle pvs of " << (int)mTrianglePvs.size() 
-				<< " was converted to object pvs of " << (int)objectPvs.size() << endl;
-
-			mGvsStats.mPerViewCellPvs = (int)objectPvs.size();
-		}
-		else
-		{
-			// add pvs
-			ObjectContainer::const_iterator it, it_end = mKdPvs.end();
-
-			for (it = mKdPvs.begin(); it != it_end; ++ it)
-			{
-				mCurrentViewCell->GetPvs().AddSampleDirty(*it, 1.0f);
-			}
-
-			mGvsStats.mPerViewCellPvs = mKdPvs.size();
-		}
-
-		////////
-		//-- stats
-		
-		mGvsStats.mViewCells = mProcessedViewCells;//mPass;
-		
-
-		mGvsStats.mTotalPvs += mGvsStats.mPerViewCellPvs;
-		mGvsStats.mTotalSamples += mGvsStats.mPerViewCellSamples;
-
-		// timing
-		const long currentTime = GetTime();
-        
-		mGvsStats.mTimePerViewCell = TimeDiff(startTime, currentTime) * 1e-3f;
-		mGvsStats.mTotalTime += mGvsStats.mTimePerViewCell;
-
-		//lastTime = currentTime;
-
-		mGvsStats.Stop();
-		mGvsStats.Print(mGvsStatsStream);
-
-        mTrianglePvs.clear();
-#if 0
-		if (GVS_DEBUG)
-		{
-			//VisualizeViewCell(mCurrentViewCell);
-			VisualizeViewCell(objectPvs);
-			CLEAR_CONTAINER(mVssRays);
-		}
-		cout << "finished" << endl;
-
-		if (mEvaluatePixelError || mExportVisibility)
-		{
-			StorePvs(objectPvs);
-		}
-#endif
-	}
-}
+	ViewCell *vc;
+
+	while (vc = NextViewCell())
+	{
+		// hack: reset counters
+		ObjectContainer::const_iterator oit, oit_end = mObjects.end();
+
+		for (oit = mObjects.begin(); oit != oit_end; ++ oit)
+			(*oit)->mCounter = 0;
+
+		ComputeViewCell(vc);
+	}
+}
+
+
+void GvsPreprocessor::PerViewCellComputation2()
+{
+	ViewCell *vc;
+
+	while (1)
+	{
+		if (!mRendererWidget)
+			continue;
+
+        //ViewCell *vc = mViewCellsManager->GetViewCell(mCurrentViewPoint);
+        ViewCell *vc = mViewCellsManager->GetViewCell(mRendererWidget->GetViewPoint());
+
+		//cout << "v " << mRendererWidget->GetViewPoint() << " ";
+
+		// no valid view cell or view cell already computed
+		if (!vc || !vc->GetPvs().Empty())
+			continue;
+
+		//cout << "computing new view cell: " << vc->GetId() << endl;
+
+		// hack: reset counters
+		ObjectContainer::const_iterator oit, oit_end = mObjects.end();
+
+		for (oit = mObjects.begin(); oit != oit_end; ++ oit)
+			(*oit)->mCounter = 0;
+
+		ComputeViewCell(vc);
+		++ mProcessedViewCells;
+	}
+}
+
+
 
 
@@ -1155,5 +1107,6 @@
 		cout << "finished view cell construction" << endl;
 	}
-	else if (0)
+#if 0
+	else
 	{	
 		//-- test successful view cells loading by exporting them again
@@ -1162,4 +1115,5 @@
 		mViewCellsManager->ExportViewCells("test.xml.gz", mViewCellsManager->GetExportPvs(), mObjects);
 	}
+#endif
 
 	mGvsStats.Stop();
@@ -1168,4 +1122,5 @@
 	if (mPerViewCell)
 	{
+#if 0
 		// provide list of view cells to compute
 		CompileViewCellsList();
@@ -1178,4 +1133,8 @@
 			ComputeRenderError();
 		}
+#else
+		PerViewCellComputation2();
+
+#endif
 	}
 	else
@@ -1272,3 +1231,94 @@
 
 
-}
+void GvsPreprocessor::ComputeViewCell(ViewCell *vc)
+{
+	mCurrentViewCell = vc;
+
+	if (mUseKdPvs)
+	{
+		KdNode::NewMail();
+		//mKdPvs.clear();
+	}
+
+	long startTime = GetTime();
+	cout << "\n***********************\n" 
+		<< "processing view cell " << mProcessedViewCells 
+		<< " (id: " << mCurrentViewCell->GetId() << ")" << endl;
+
+	// compute the pvs of the current view cell
+	ProcessViewCell();
+
+	//mGvsStats.mTrianglePvs = mCurrentViewCell->GetPvs().GetSize();
+	mGvsStats.mTrianglePvs = (int)mTrianglePvs.size();
+	mGvsStats.mTotalTrianglePvs += mGvsStats.mTrianglePvs;
+
+	if (!mUseKdPvs)
+	{
+		ObjectContainer objectPvs;
+
+		// optain object pvs
+		GetObjectPvs(objectPvs);
+
+		// add pvs
+		ObjectContainer::const_iterator it, it_end = objectPvs.end();
+
+		for (it = objectPvs.begin(); it != it_end; ++ it)
+		{
+			mCurrentViewCell->GetPvs().AddSampleDirty(*it, 1.0f);
+		}
+
+		cout << "triangle pvs of " << (int)mTrianglePvs.size() 
+			<< " was converted to object pvs of " << (int)objectPvs.size() << endl;
+
+		mGvsStats.mPerViewCellPvs = (int)objectPvs.size();
+	}
+	else
+	{
+		/*// add pvs
+		ObjectContainer::const_iterator it, it_end = mKdPvs.end();
+
+		for (it = mKdPvs.begin(); it != it_end; ++ it)
+			mCurrentViewCell->GetPvs().AddSampleDirty(*it, 1.0f);
+		*/
+		mGvsStats.mPerViewCellPvs = mCurrentViewCell->GetPvs().GetSize();;
+	}
+
+
+	////////
+	//-- stats
+
+	mGvsStats.mViewCells = mProcessedViewCells;//mPass;
+
+
+	mGvsStats.mTotalPvs += mGvsStats.mPerViewCellPvs;
+	mGvsStats.mTotalSamples += mGvsStats.mPerViewCellSamples;
+
+	// timing
+	const long currentTime = GetTime();
+
+	mGvsStats.mTimePerViewCell = TimeDiff(startTime, currentTime) * 1e-3f;
+	mGvsStats.mTotalTime += mGvsStats.mTimePerViewCell;
+
+	//lastTime = currentTime;
+
+	mGvsStats.Stop();
+	mGvsStats.Print(mGvsStatsStream);
+
+	mTrianglePvs.clear();
+#if 0
+	if (GVS_DEBUG)
+	{
+		//VisualizeViewCell(mCurrentViewCell);
+		VisualizeViewCell(objectPvs);
+		CLEAR_CONTAINER(mVssRays);
+	}
+	cout << "finished" << endl;
+
+	if (mEvaluatePixelError || mExportVisibility)
+	{
+		StorePvs(objectPvs);
+	}
+#endif
+}
+
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2617)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2625)
@@ -8,5 +8,5 @@
 //-- typedefs
 //$$ 19.1. 2008 test for speed
-#define USE_BIT_PVS
+//#define USE_BIT_PVS
 
 
