Index: GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2698)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2699)
@@ -4,5 +4,5 @@
 
 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+"
-COMMAND="../scripts/preprocessor-debug.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=1000000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=140"
+COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=1000000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=140"
 
 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2698)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2699)
@@ -527,5 +527,5 @@
 		cout << "finished loading" << endl;
 	}
-
+	
 	return result;
 }
@@ -1037,32 +1037,44 @@
 	GetIntValue("Preprocessor.rayCastMethod", rayCastMethod);
 
-#ifdef USE_HAVRAN_RAYCASTER
-
+  // first buildup the tree for havran ray caster if it is used
   if ((rayCastMethod == 2) || (rayCastMethod == 3)) 
-  {
-	  HavranRayCaster *hr = 0;
-
-	  if (rayCastMethod == 3)
-		  hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster);
-	  else
-		  hr = reinterpret_cast<HavranRayCaster*>(mRayCaster);
-
-	  string ktbFilename = internKdTree;
-	  int l = (int)ktbFilename.length();
-	  ktbFilename[l-1] = 't';
-	  ktbFilename[l-2] = 'b';
-	  ktbFilename[l-3] = 'k';
-
-	  cout << "Trying to load tree from file " << ktbFilename << endl;
-	  if (hr->ImportBinTree(ktbFilename, this->mObjects)) {
-		  cout << "Loading failed - building kd-tree" << endl;
-		  hr->Build(this->mObjects);
-		  cout << "Exporting kd-tree to file " << ktbFilename << endl;
-		  hr->ExportBinTree(ktbFilename);
-	  }
-	  else
-		  cout << " done." << endl;
-  }
-#endif
+	{
+ 	  HavranRayCaster *hr = 0;
+
+ 	  if (rayCastMethod == 3)
+		hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster);
+ 	  else
+		hr = reinterpret_cast<HavranRayCaster*>(mRayCaster);
+	  
+	  hr->Build(this->mObjects);
+	}
+  
+// #ifdef USE_HAVRAN_RAYCASTER
+//   if ((rayCastMethod == 2) || (rayCastMethod == 3)) 
+//   {
+// 	  HavranRayCaster *hr = 0;
+
+// 	  if (rayCastMethod == 3)
+// 		  hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster);
+// 	  else
+// 		  hr = reinterpret_cast<HavranRayCaster*>(mRayCaster);
+
+// 	  string ktbFilename = internKdTree;
+// 	  int l = (int)ktbFilename.length();
+// 	  ktbFilename[l-1] = 't';
+// 	  ktbFilename[l-2] = 'b';
+// 	  ktbFilename[l-3] = 'k';
+
+// 	  cout << "Trying to load tree from file " << ktbFilename << endl;
+// 	  if (hr->ImportBinTree(ktbFilename, this->mObjects)) {
+// 		  cout << "Loading failed - building kd-tree" << endl;
+// 		  hr->Build(this->mObjects);
+// 		  cout << "Exporting kd-tree to file " << ktbFilename << endl;
+// 		  hr->ExportBinTree(ktbFilename);
+// 	  }
+// 	  else
+// 		  cout << " done." << endl;
+//   }
+// #endif
 
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/common.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/common.h	(revision 2678)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/common.h	(revision 2699)
@@ -24,5 +24,5 @@
 
 #define DYNAMIC_OBJECTS_HACK 1
-#define USE_HAVRAN_RAYCASTER 0
+#define USE_HAVRAN_RAYCASTER 1
 
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp	(revision 2686)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp	(revision 2699)
@@ -60,8 +60,9 @@
   Environment::GetSingleton()->GetStringValue("Scene.filename", buff);
   string filename(buff);
+
   const string kdfile = ReplaceSuffix(filename, ".obj", ".kdh");
 
   if (!ImportBinTree(kdfile, objlist)) {
-        cout << "\nKd-tree for Havran ray caster imported."<<endl<<flush;
+	cout << "\nKd-tree for Havran ray caster imported."<<endl<<flush;
   }
   else {
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2698)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2699)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 22. V 11:01:58 2008
+# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 13:41:28 2008
 # Project:  preprocessor.pro
 # Template: app
@@ -7,7 +7,7 @@
 #############################################################################
 
-first: debug
-install: debug-install
-uninstall: debug-uninstall
+first: release
+install: release-install
+uninstall: release-uninstall
 MAKEFILE      = Makefile
 QMAKE         = qmake
@@ -27,7 +27,23 @@
 MKDIR         = mkdir
 SUBTARGETS    =  \
-		debug \
-		release
+		release \
+		debug
 
+release: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release
+release-make_default: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release 
+release-make_first: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release first
+release-all: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release all
+release-clean: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release clean
+release-distclean: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release distclean
+release-install: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release install
+release-uninstall: $(MAKEFILE).Release FORCE
+	$(MAKE) -f $(MAKEFILE).Release uninstall
 debug: $(MAKEFILE).Debug FORCE
 	$(MAKE) -f $(MAKEFILE).Debug
@@ -46,27 +62,11 @@
 debug-uninstall: $(MAKEFILE).Debug FORCE
 	$(MAKE) -f $(MAKEFILE).Debug uninstall
-release: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release
-release-make_default: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release 
-release-make_first: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release first
-release-all: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release all
-release-clean: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release clean
-release-distclean: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release distclean
-release-install: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release install
-release-uninstall: $(MAKEFILE).Release FORCE
-	$(MAKE) -f $(MAKEFILE).Release 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 \
 		C:\Qt\4.1.2\mkspecs\features\default_pre.prf \
 		C:\Qt\4.1.2\mkspecs\features\win32\default_pre.prf \
-		C:\Qt\4.1.2\mkspecs\features\debug.prf \
+		C:\Qt\4.1.2\mkspecs\features\release.prf \
 		C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf \
 		C:\Qt\4.1.2\mkspecs\features\default_post.prf \
@@ -89,5 +89,5 @@
 C:\Qt\4.1.2\mkspecs\features\default_pre.prf:
 C:\Qt\4.1.2\mkspecs\features\win32\default_pre.prf:
-C:\Qt\4.1.2\mkspecs\features\debug.prf:
+C:\Qt\4.1.2\mkspecs\features\release.prf:
 C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf:
 C:\Qt\4.1.2\mkspecs\features\default_post.prf:
@@ -109,29 +109,25 @@
 qmake_all: FORCE
 
-make_default: debug-make_default release-make_default FORCE
-make_first: debug-make_first release-make_first FORCE
-all: debug-all release-all FORCE
-clean: debug-clean release-clean FORCE
+make_default: release-make_default debug-make_default FORCE
+make_first: release-make_first debug-make_first FORCE
+all: release-all debug-all FORCE
+clean: release-clean debug-clean FORCE
 	-$(DEL_FILE) "..\bin\release"\preprocessor.exp
-	-$(DEL_FILE) "..\bin\release"\preprocessor.pdb
-	-$(DEL_FILE) "..\bin\release"\preprocessor.ilk
-	-$(DEL_FILE) vc*.pdb
-	-$(DEL_FILE) vc*.idb
-distclean: debug-distclean release-distclean FORCE
+distclean: release-distclean debug-distclean FORCE
 	-$(DEL_FILE) Makefile
 
+release-mocclean: $(MAKEFILE).Release
+	$(MAKE) -f $(MAKEFILE).Release mocclean
 debug-mocclean: $(MAKEFILE).Debug
 	$(MAKE) -f $(MAKEFILE).Debug mocclean
-release-mocclean: $(MAKEFILE).Release
-	$(MAKE) -f $(MAKEFILE).Release mocclean
-mocclean: debug-mocclean release-mocclean
+mocclean: release-mocclean debug-mocclean
 
+release-mocables: $(MAKEFILE).Release
+	$(MAKE) -f $(MAKEFILE).Release mocables
 debug-mocables: $(MAKEFILE).Debug
 	$(MAKE) -f $(MAKEFILE).Debug mocables
-release-mocables: $(MAKEFILE).Release
-	$(MAKE) -f $(MAKEFILE).Release mocables
-mocables: debug-mocables release-mocables
+mocables: release-mocables debug-mocables
 FORCE:
 
+$(MAKEFILE).Release: Makefile
 $(MAKEFILE).Debug: Makefile
-$(MAKEFILE).Release: Makefile
Index: GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2695)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2699)
@@ -222,5 +222,4 @@
 	////////////
 	//-- initialize external ray caster
-
 	if (preprocessor->LoadInternKdTree(internKdTree))
 	{
@@ -234,4 +233,6 @@
 	}
 
+	
+	
 	// export objects as obj
 	if (preprocessor->mExportObj)
Index: GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2698)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2699)
@@ -1,4 +1,4 @@
-#CONFIG += release
-CONFIG += debug
+CONFIG += release
+#CONFIG += debug
 CONFIG += console warn_off thread mlrt qt
 
