Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp	(revision 2172)
@@ -765,5 +765,5 @@
 #ifdef GTP_INTERNAL
   int rayCaster;
-  Environment::GetSingleton()->GetIntValue("Mutation.radiusTermination",
+  Environment::GetSingleton()->GetIntValue("Preprocessor.rayCastMethod",
 										   rayCaster);
   useEnhancedFeatures = (rayCaster ==
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2164)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2172)
@@ -22,5 +22,4 @@
 #include "InternalRayCaster.h"
 #include "GlobalLinesRenderer.h"
-#include "ObjectsParser.h"
 
 
@@ -266,5 +265,5 @@
 
 
-bool Preprocessor::LoadBinaryObj(const string &filename,
+bool Preprocessor::LoadBinaryObj(const string filename,
 								 SceneGraphNode *root,
 								 vector<FaceParentInfo> *parents)
@@ -278,4 +277,12 @@
 	cout << "binary obj dump available, loading " << filename.c_str() << endl;
 	
+	// table for vertices
+	VertexContainer vertices; 
+	
+	if (parents)
+		cout << "using face parents" << endl;
+	else
+		cout << "not using face parents" << endl;
+
 	// read in triangle size
 	int numTriangles;
@@ -302,5 +309,7 @@
 		root->mGeometry.push_back(obj);
 		
-		if ((i ++) % 500000 == 499999)
+		i ++;
+	
+		if (i % 500000 == 499999)
 			 cout<<"\r"<<i<<"/"<<numTriangles<<"\r";
 	}
@@ -479,5 +488,4 @@
 	const int files = SplitFilenames(filename, filenames);
 	cout << "number of input files: " << files << endl;
-
 	bool result = false;
 	bool isObj = false;
@@ -534,21 +542,22 @@
 		
 				result = parser->ParseFile(filename, 
-										   mSceneGraph->GetRoot(),
-										   mLoadMeshes,
-										   fi);
-
+								   mSceneGraph->GetRoot(),
+								   mLoadMeshes,
+								   fi);
+						
 				cout << "loaded " << (int)mSceneGraph->GetRoot()->mGeometry.size() << " entities" << endl;
-
 				// only works for triangles
 				if (result && !mLoadMeshes)
 				{
 					cout << "exporting binary obj to " << bnFile << "... " << endl;
-
 					ExportBinaryObj(bnFile, mSceneGraph->GetRoot());
-				
 					cout << "finished" << endl;
 				}
 
 				delete parser;
+			}
+			else if (0)
+			{
+				ExportBinaryObj("../data/test.bn", mSceneGraph->GetRoot());
 			}
 		}
@@ -729,30 +738,10 @@
 	char buf[100];
 
-    if (mLoadViewCells)
+	if (mLoadViewCells)
 	{	
-		
-#ifdef USE_BIT_PVS
-		// HACK: for kd pvs, set pvs size to maximal number of kd nodes
-		vector<KdLeaf *> leaves;
-		preprocessor->mKdTree->CollectLeaves(leaves);
-
-		ObjectPvs::SetPvsSize((int)leaves.size());
-#endif
-
-        Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf);
-		cout << "loading objects from " << buf << endl;
-
-		// load objects which will be used as pvs entries
-		ObjectContainer pvsObjects;
-		if (0) LoadObjects(buf, pvsObjects, mObjects);
-
-		const bool finalizeViewCells = true;
-		cout << "loading view cells from " << buf << endl;
-
-		mViewCellsManager = ViewCellsManager::LoadViewCells(buf, 
-															pvsObjects,
-															mObjects, 
-															finalizeViewCells, 
-															NULL);
+		Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf);
+		cout << "loading view cells from " << buf << endl<<flush;
+
+		mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, true, NULL);
 
 		cout << "view cells loaded." << endl<<flush;
@@ -1273,5 +1262,5 @@
 	const long t1 = GetTime();
 	
-	if ((int)rays.size() > 10000) {
+	if (0 && (int)rays.size() > 10000) {
 	
 		mRayCaster->SortRays(rays);
@@ -1367,4 +1356,5 @@
 	
 		if ((int)rays.size() > 100000 && i % 100000 == 0)
+			//cout << "here2 " << vssRays.size()<<endl;
 			cout<<"\r"<<i<<"/"<<(int)rays.size()<<"\r";
 	}
@@ -1642,29 +1632,3 @@
 
 
-bool Preprocessor::LoadObjects(const string &filename,
-							   ObjectContainer &pvsObjects, 
-							   const ObjectContainer &preprocessorObjects)
-{
-	ObjectsParser parser;
-
-	const bool success = parser.ParseObjects(filename, 
-											 pvsObjects, 
-											 preprocessorObjects);
-
-	if (!success)
-	{
-		Debug << "Error: loading objects failed!" << endl;
-	}
-
-	// hack: no bvh object could be found => take preprocessor objects
-	if (pvsObjects.empty())
-	{
-		Debug << "no objects" << endl;
-		pvsObjects = preprocessorObjects;
-	}
-
-	return success;
-}
-
-
-}
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp	(revision 2116)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp	(revision 2172)
@@ -1,6 +1,5 @@
 #include "VssRay.h"
 #include "AxisAlignedBox3.h"
-#include "Ray.h"
-
+#include "SamplingStrategy.h"
 
 namespace GtpVisibilityPreprocessor {
@@ -340,5 +339,6 @@
 VssRayContainer::SelectRays(const int number,
 							VssRayContainer &selected,
-							const bool copy) const
+							const bool copy
+							) const
 {
   float p = number/(float)size();
@@ -346,5 +346,6 @@
   
   for (; it != end(); it++)
-	if (Random(1.0f) < p) {
+	// temporarily only take mutation rays!
+	if ((*it)->mDistribution == SamplingStrategy::MUTATION_BASED_DISTRIBUTION && Random(1.0f) < p) {
 	  if (!copy)
 		selected.push_back(*it);
