Index: /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2627)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2634)
@@ -2,6 +2,7 @@
 
 
+
 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+"
-COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=500000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3"
+COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=500000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_ray_cast_method=2 -preprocessor_detect_empty_viewspace-"
 
 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d"
@@ -29,6 +30,7 @@
 
 SCENE=../data/Arena/arena-high-lods.obj
+VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
 #VIEWCELLS=../data/Arena/viewcells-5000.xml.gz
-VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
+#VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
 
 
@@ -57,5 +59,5 @@
 
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=direction \
+-rss_distributions=mutation+object_direction+spatial \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_filter_width=1.0 \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2629)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2634)
@@ -1206,5 +1206,5 @@
 
 	// !!!!!!!!!!!!!!!! VH no sorting
-	if ( 
+	if (
 		rays.size() > 10000
 		)
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2633)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2634)
@@ -19,4 +19,5 @@
 
 
+
 #define USE_CG 1
 
@@ -150,5 +151,5 @@
 
 	if (!evaluateFilter) 
-		pvs = viewcell->GetPvs();
+	  pvs = viewcell->GetPvs();
 	else 
 	  mViewCellsManager->ApplyFilter2(viewcell,
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2633)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2634)
@@ -3369,6 +3369,6 @@
 			// $$ warning collect objects takes only unmailed ones!
 			if (mUseKdPvs) {
-			  			  GetPreprocessor()->mKdTree->CollectKdObjects(box, objects);
-			  //GetPreprocessor()->mKdTree->CollectSmallKdObjects(box, objects, 0.1f);
+			  GetPreprocessor()->mKdTree->CollectKdObjects(box, objects);
+			  //GetPreprocessor()->mKdTree->CollectSmallKdObjects(box, objects, 0.02f);
 
 			} else
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2629)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2634)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (2.00a) (Qt 4.1.2) on: út 22. I 23:58:58 2008
+# Generated by qmake (2.00a) (Qt 4.1.2) on: st 23. I 01:44:33 2008
 # Project:  preprocessor.pro
 # Template: app
@@ -63,5 +63,5 @@
 	$(MAKE) -f $(MAKEFILE).Debug uninstall
 
-Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \
+Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \
 		C:\Qt\4.1.2\mkspecs\features\qt_config.prf \
 		C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp	(revision 2618)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp	(revision 2634)
@@ -1098,8 +1098,8 @@
     nodeStack.pop();
 	if (!node->Mailed()) {
-	  node->Mail();
 	  if (node->IsLeaf() || GetSurfaceArea(node) <= maxArea)  {
 		Intersectable *object = GetOrCreateKdIntersectable(node);
 		if (!node->Mailed()) {
+		  node->Mail();
 		  objects.push_back(object);
 		}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2629)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2634)
@@ -6,5 +6,5 @@
 
 #define NOMINMAX
-#ifdef __WINDOWS__
+#ifdef _WIN32
 #include <windows.h>
 #ifdef _CRT_SET
@@ -316,10 +316,10 @@
 		// $$matt
 		preprocessor->renderer = 
-			new QtGlRendererBuffer(512, 512,
-			preprocessor->mSceneGraph,
-			preprocessor->mViewCellsManager,
-			preprocessor->mKdTree);
-
-	}
+		  new QtGlRendererBuffer(1024, 1024,
+								 preprocessor->mSceneGraph,
+								 preprocessor->mViewCellsManager,
+								 preprocessor->mKdTree);
+		
+	  }
 	
 	if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/havran/ktbconf.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/havran/ktbconf.h	(revision 2629)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/havran/ktbconf.h	(revision 2634)
@@ -24,5 +24,5 @@
 
 // If we support the use of SSE instructions for ray shooting
-#define _USE_HAVRAN_SSE
+//#define _USE_HAVRAN_SSE
 
 namespace GtpVisibilityPreprocessor {
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2629)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2634)
@@ -81,5 +81,5 @@
 
 LIBS += RTScene.lib RTWorld.lib
-DEFINES += GTP_INTERNAL
+DEFINES += GTP_INTERNAL NDEBUG
 INCLUDEPATH += ../MultiLevelRayTracing
 }
@@ -125,5 +125,5 @@
 Intersectable.cpp TraversalTree.cpp ObjectPvs.cpp ObjectsParser.cpp \
 FilterBasedDistribution.cpp DifferenceSampling.cpp HavranRayCaster.cpp \
-HavranDynRayCaster.cpp OcclusionQuery.cpp 
+HavranDynRayCaster.cpp OcclusionQuery.cpp RandomViewCellsHandler.cpp
 
 
@@ -133,5 +133,6 @@
 SOURCES += havran/allocgo2.cpp havran/ktbai.cpp havran/ktbtrav.cpp \
 havran/ktb.cpp havran/ktball.cpp havran/sbbox.cpp \
-havran/ktb8b.cpp havran/ktbftrav.cpp havran/timer.cpp 
+havran/ktb8b.cpp havran/ktbftrav.cpp havran/timer.cpp havran/ktbs.cpp \
+havran/ktbf2trv.cpp
 
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2627)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2634)
@@ -9,5 +9,5 @@
 //$$ 19.1. 2008 test for speed
 //#define USE_BIT_PVS
-//#define USE_HASH_PVS
+#define USE_HASH_PVS
 
 
