Index: /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2700)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2701)
@@ -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 2700)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2701)
@@ -1053,21 +1053,8 @@
 	  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;
+	  
+	  hr->Build(this->mObjects);
   }
+
 #endif
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2700)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2701)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 14:49:37 2008
+# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 15:20:40 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,20 +62,4 @@
 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 \
@@ -68,5 +68,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 \
@@ -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/havran/ktbs.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/havran/ktbs.cpp	(revision 2686)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/havran/ktbs.cpp	(revision 2701)
@@ -1167,5 +1167,5 @@
     int axis = d->axis;
     AxisAlignedBox3 obox;
-    for (ObjectContainer::iterator it = d->objlist->begin(); it != endit; it++) {
+    for (ObjectContainer::iterator it = d->objlist->begin(); it != endit; ) {
       Intersectable *obj = *it;
       obox = obj->GetBox();
@@ -1179,6 +1179,6 @@
 	// we simply shorten the list - this object belongs only to the right list
 	(*it) = *(endit-1);
-	it--;
 	endit--;
+	continue;
       }
       else {
@@ -1187,4 +1187,5 @@
 	d->tightbox.Include(obox);
       }
+	  it++;
     } // for
   }
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2700)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2701)
@@ -1,4 +1,4 @@
-#CONFIG += release
-CONFIG += debug
+CONFIG += release
+#CONFIG += debug
 CONFIG += console warn_off thread mlrt qt
 
