Index: trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 268)
+++ trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 275)
@@ -65,6 +65,6 @@
 #	splitPlaneStrategy leastSplits
 #	splitPlaneStrategy balancedTree
-	splitPlaneStrategy nextPolygon
-#	splitPlaneStrategy combined
+#	splitPlaneStrategy nextPolygon
+	splitPlaneStrategy combined
 #       constructionMethod rays
 	constructionMethod viewCells
Index: trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp	(revision 271)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp	(revision 275)
@@ -149,8 +149,7 @@
 								int &splits, bool storePolys)
 {
-//#ifdef _Debug
-	if (BspTree::displayDebug)
-	Debug << "Splitting polygons of node " << this << " with plane " << mPlane << endl;
-//#endif
+#ifdef _Debug
+	//if (BspTree::displayDebug)Debug << "Splitting polygons of node " << this << " with plane " << mPlane << endl;
+#endif
 	bool inside = false;
 
@@ -160,5 +159,5 @@
 		polys->pop_back();
 
-		if (BspTree::displayDebug) Debug << "New polygon with plane: " << poly->GetSupportingPlane() << "\n";
+		//if (BspTree::displayDebug) Debug << "New polygon with plane: " << poly->GetSupportingPlane() << "\n";
 
 		// test if split is neccessary
@@ -175,16 +174,14 @@
 					// same surface normal
 					inside = (DotProd(mPlane.mNormal, poly->GetSupportingPlane().mNormal) > 0);
-					if (BspTree::displayDebug)	
-				Debug << "coincident" << endl;
+					//if (BspTree::displayDebug)	Debug << "coincident" << endl;
 				// discard polygons or saves them in node
 				ProcessPolygon(poly, storePolys);
 				break;
-			case Polygon3::FRONT_SIDE:	if (BspTree::displayDebug)
-				Debug << "front" << endl;
+			case Polygon3::FRONT_SIDE:	
+				//if (BspTree::displayDebug)Debug << "front" << endl;
 				frontPolys->push_back(poly);
 				break;
 			case Polygon3::BACK_SIDE:
-				inside = true;	if (BspTree::displayDebug)
-				Debug << "back" << endl;
+				inside = true;	//if (BspTree::displayDebug)Debug << "back" << endl;
 				backPolys->push_back(poly);
 				break;
@@ -201,7 +198,7 @@
 				backPolys->push_back(back_piece);
 
-//#ifdef _DEBUG
+#ifdef _DEBUG
 				if (BspTree::displayDebug)Debug << "split " << *poly << endl << *front_piece << endl << *back_piece << endl;
-//#endif
+#endif
 				// save or discard polygons
 				ProcessPolygon(poly, storePolys);
@@ -213,5 +210,5 @@
 		}
 	}
-	if (BspTree::displayDebug) Debug << "inside: " << inside << endl;
+	//if (BspTree::displayDebug) Debug << "inside: " << inside << endl;
 	// contains nothing
 	delete polys;
@@ -262,5 +259,6 @@
 mRoot(NULL), 
 mIsIncremential(false),
-mStorePolys(true)
+//mStorePolys(true)
+mStorePolys(false)
 {
 	Randomize(); // initialise random generator for heuristics
@@ -449,6 +447,5 @@
 		Polygon3 *poly = new Polygon3((*fi), mesh);
 		polys.push_back(poly);
-		if (displayDebug)
-			Debug << *poly << endl;
+		//if (displayDebug)Debug << *poly << endl;
 		polysNum ++;
 	}
@@ -461,5 +458,5 @@
   
 	for (int i = 0; i < limit; ++i)
-	{if((i == 12) || (i == 14))
+	{//if ((i == 12) ||(i==14))
 		if (viewCells[i]->GetMesh()) // copy the mesh data to polygons
 		{
@@ -519,5 +516,5 @@
 	// view cells are inserted one after another => 
 	// global tree optimization possible
-	if (!mIsIncremential)
+	if (!mIsIncremential) // todo: not incremential does not work
 	{
 		// copy view cell meshes into one big polygon soup
@@ -542,13 +539,13 @@
 
 	long startTime = GetTime();
-displayDebug = true;
+//displayDebug = true;
 	counter = 0;
 	Debug << "**** Starting view cell insertion ****" << endl;
 	for (it = viewCells.begin(); it != viewCells.end(); ++ it)
 	{
-		if ((counter == 12) || (counter == 14))
-		{Debug << "** inserting view cell " << counter << " **" << endl;
-		InsertViewCell(*it);}
-		counter ++;
+		//if ((counter == 12) || (counter == 14)){
+		//Debug << "** inserting view cell " << counter << " **" << endl;
+		InsertViewCell(*it);
+	//}	counter ++;
 	}
 
@@ -621,8 +618,7 @@
 		//&& !(viewCell && tData.mIsInside && dynamic_cast<BspLeaf *>(tData.mNode)->GetViewCell()))  
 	{
-//#ifdef _DEBUG
-		if (displayDebug)
-			Debug << "subdivision terminated at depth " << tData.mDepth << ", #polys: " << (int)tData.mPolygons->size() << endl;
-//#endif
+#ifdef _DEBUG
+		if (displayDebug)Debug << "subdivision terminated at depth " << tData.mDepth << ", #polys: " << (int)tData.mPolygons->size() << endl;
+#endif
 
 		EvaluateLeafStats(tData);
@@ -634,8 +630,8 @@
 
 			if (leaf->GetViewCell())
-				Debug << "ERROR: leaf already has view cell " << leaf->mViewCellIdx << endl;
-
-			leaf->mViewCellIdx = counter;
-			Debug << "insert view cell" << endl;
+				Debug << "ERROR: leaf already has view cell " << endl;//leaf->mViewCellIdx << endl;
+
+			//leaf->mViewCellIdx = counter;
+			//Debug << "insert view cell" << endl;
 			leaf->SetViewCell(viewCell);
 		}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp	(revision 265)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp	(revision 275)
@@ -45,9 +45,9 @@
           p->LoadViewCells(vcFilename);
 		  
-		  /*Exporter *exporter = Exporter::GetExporter("viewcells.x3d");
+		  Exporter *exporter = Exporter::GetExporter("viewcells.x3d");
 		  if (exporter) 
 		  {	  exporter->ExportViewCells(&p->mViewCells);
 			  delete exporter;  
-		  }*/
+		  }
 	  }
 	  else
