Index: GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h	(revision 1420)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h	(revision 1579)
@@ -442,8 +442,9 @@
 {
   return 
-	  Vector3(A.y * B.z - A.z * B.y,
+	Vector3(A.y * B.z - A.z * B.y,
 			  A.z * B.x - A.x * B.z,
-			  A.x * B.y - A.y * B.x);
-}
+			A.x * B.y - A.y * B.x);
+}
+
 
 inline void
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1576)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1579)
@@ -519,6 +519,6 @@
 bool
 Environment::GetStringValue(const char *name,
-			    char *value,
-			    const bool isFatal) const
+							char *value,
+							const bool isFatal) const
 {
   int i = FindOption(name, isFatal);
Index: GTP/trunk/Lib/Vis/Preprocessing/src/default.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/default.env	(revision 1454)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/default.env	(revision 1579)
@@ -64,45 +64,4 @@
 }
 
-VssPreprocessor {
-	samplesPerPass  100000
-	initialSamples 100000
-	vssSamples 500000
-	vssSamplesPerPass 100000
-	useImportanceSampling true
-	loadInitialSamples  false
-	storeInitialSamples false
-	useViewSpaceBox false
-	enlargeViewSpace true
-}
-
-
-VssTree {
-	useRss    false
-	epsilon		1e-6
-
-	maxDepth 	40
-	minPvs		30
-	minRays		20
-	minSize		0.001
- 	maxCostRatio	2.0
-	maxRayContribution 0.5
-	
-	maxTotalMemory	200
-	maxStaticMemory	100
-
-	splitType regular
-#	splitType heuristic
-#	splitType hybrid
-	splitUseOnlyDrivingAxis false
-
-	interleaveDirSplits	true
-    dirSplitDepth 0
-
-	numberOfEndPointDomains	10000
-	ct_div_ci	0.0
-	randomize	false
-
-	refDirBoxMaxSize	0.1
-}
 
 SamplingPreprocessor {
@@ -406,98 +365,2 @@
 }
 
-BspTree {
-	Construction {
-		samples 300000
-		epsilon 0.005
-	}
-
-
-	# random polygon       = 1
-	# axis aligned         = 2
-	# least splits         = 4
-	# balanced polygons    = 8
-	# balanced view cells  = 16
-	# largest polygon area = 32
-	# vertical axis        = 64
-	# blocked rays         = 128
-	# least ray splits     = 256
-	# balanced rays        = 512
-	# pvs                  = 1024
-
-	# least splits + balanced polygons
-	#splitPlaneStrategy 12
-	
-	#axis aligned + vertical axis
-	#splitPlaneStrategy 66
-	
-	# axis aligned + balanced view cells
-	# splitPlaneStrategy 18
-	
-	# largest polygon area
-	#splitPlaneStrategy 32
-	
-	# axus aligned + balanced polygons
-	#splitPlaneStrategy 72
-	
-	# axis aligned + blocked rays
-	#splitPlaneStrategy 130
-	
-	#splitPlaneStrategy 384
-	#splitPlaneStrategy 130
-	
-	splitPlaneStrategy 32
-	
-	maxPolyCandidates 100
-	maxRayCandidates 0
-	
-	maxTests 10000
-	
-	subdivisionStats ../subDivisionStats.log
-
-	# factors for evaluating split plane costs
-	Factor {
-		verticalSplits 1.0
-	  	largestPolyArea 1.0
-	  	blockedRays 1.0
-	  	leastRaySplits 1.0
-	  	balancedRays 1.0
-	  	pvs 1.0
-	  	leastSplits 1.0
-	  	balancedPolys 1.0
-	  	balancedViewCells 1.0
-	}
-	
-	Termination {
-		# parameters used for autopartition
-		minRays -1
-		minPolygons 0
-		maxDepth 30
-		minPvs -1
-		minProbability 0.00001
-		maxRayContribution 9999
-		maxViewCells 20000
-
-		# used for pvs criterium
-		ct_div_ci 0.0
-	
-		maxCostRatio 0.9
-		
-		# axis aligned splits
-		AxisAligned {
-			minPolys 5000
-			minRays 500
-			minObjects 10
-			ct_div_ci 0.5
-		}
-	}
-	
-	AxisAligned {
-		splitBorder 0.01
-	}
-	
-	
-	Visualization {
-		# x3d visualization of the split planes
-		exportSplits false
-	}
-}
Index: GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 1563)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 1579)
@@ -80,5 +80,6 @@
 SamplingPreprocessor::VerifyVisibility(Intersectable *object)
 {
-	// mail all nodes from the pvs
+#if 0 // 6.10. 2006 due to kdPVS removal from intersectable
+  // mail all nodes from the pvs
   Intersectable::NewMail();
   KdPvsMap::iterator i = object->mKdPvs.mEntries.begin();
@@ -106,4 +107,5 @@
 	// sample creates some contribution
   }
+#endif
 }
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 1457)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 1579)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 21. IX 22:34:57 2006
+# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 6. X 16:24:14 2006
 # Project:  preprocessor.pro
 # Template: app
Index: GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1545)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1579)
@@ -1,13 +1,9 @@
 #ifdef GTP_INTERNAL
-	#define USE_QT 1
+#define USE_QT 1
 #else
-	#define USE_QT 0
-#endif
-
-#if USE_QT
-#define USE_BOOST 0
-#else
-#define USE_BOOST 1
-#endif
+#define USE_QT 0
+#endif
+
+#define USE_THREADS 1
 
 #ifdef UNICODE
@@ -27,5 +23,6 @@
 
 #include "PreprocessorThread.h"
-#if USE_BOOST
+
+#if !USE_QT && USE_THREADS
 #include "BoostPreprocessorThread.h"
 #endif
@@ -183,9 +180,9 @@
 	pt = new QtPreprocessorThread(preprocessor);
 #else
-#if USE_BOOST
+#if USE_THREADS
 	pt = new BoostPreprocessorThread(preprocessor);
 #else
 	pt = new PreprocessorThread(preprocessor);
-#endif	
+#endif
 #endif
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h	(revision 1570)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h	(revision 1579)
@@ -35,8 +35,11 @@
   static int sMailId;
   static int sReservedMailboxes;
+
+  /// Mailbox used for traversals
   int mMailbox;
   
   /// unique object Id
   int mId;
+
   /// universal counter
   int mCounter;
@@ -44,4 +47,5 @@
   /// pointer to the container bvh leaf
   BvhLeaf *mBvhLeaf;
+
   /// some rays piercing this intersectable
   VssRayContainer mVssRays;
@@ -53,6 +57,8 @@
   // note matt: delete these, they are only taking memory+
 
+
   /// object based pvs
   KdPvs mKdPvs;
+
   /// view cell based pvs per object
   ViewCellPvs mViewCellPvs;
@@ -72,36 +78,36 @@
   Intersectable(): mMailbox(0), mReferences(0), mBvhLeaf(0) {}
 
-	void SetId(const int id) { mId = id; }
-	int GetId() { return mId; }
+  void SetId(const int id) { mId = id; }
+  int GetId() { return mId; }
+  
+  ////////////////////////////////////////////////
+  //	Mailing stuff
+  
+  static void NewMail(const int reserve = 1) {
+	sMailId += sReservedMailboxes;
+	sReservedMailboxes = reserve;
+  }
 	
-////////////////////////////////////////////////
-//	Mailing stuff
+  void Mail() { mMailbox = sMailId; }
+  bool Mailed() const { return mMailbox == sMailId; }
+  
+  void Mail(const int mailbox) { mMailbox = sMailId + mailbox; }
+  bool Mailed(const int mailbox) const { return mMailbox == sMailId + mailbox; }
+  
+  int IncMail() { return ++ mMailbox - sMailId; }
 
-	static void NewMail(const int reserve = 1) {
-		sMailId += sReservedMailboxes;
-		sReservedMailboxes = reserve;
-	}
-	
-	void Mail() { mMailbox = sMailId; }
-	bool Mailed() const { return mMailbox == sMailId; }
-
-	void Mail(const int mailbox) { mMailbox = sMailId + mailbox; }
-	bool Mailed(const int mailbox) const { return mMailbox == sMailId + mailbox; }
-
-	int IncMail() { return ++ mMailbox - sMailId; }
-
-////////////////////////////////////////////////////
-    virtual AxisAlignedBox3 GetBox() const = 0;
-	virtual int CastRay(GtpVisibilityPreprocessor::Ray &ray) = 0;
-	
-	virtual bool IsConvex() const = 0;
-	virtual bool IsWatertight() const = 0;
-	virtual float IntersectionComplexity() = 0;
+  ////////////////////////////////////////////////////
+  virtual AxisAlignedBox3 GetBox() const = 0;
+  virtual int CastRay(GtpVisibilityPreprocessor::Ray &ray) = 0;
   
-	virtual int NumberOfFaces() const = 0;
-	virtual int Type() const = 0;
-
-	virtual int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0;
-
+  virtual bool IsConvex() const = 0;
+  virtual bool IsWatertight() const = 0;
+  virtual float IntersectionComplexity() = 0;
+  
+  virtual int NumberOfFaces() const = 0;
+  virtual int Type() const = 0;
+  
+  virtual int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0;
+  
 	virtual int GetRandomVisibleSurfacePoint(Vector3 &point,
 											 Vector3 &normal,
Index: GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 1457)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 1579)
@@ -116,5 +116,6 @@
 OspTree.cpp HierarchyManager.cpp ObjParser.cpp \
 BvHierarchy.cpp  \
-BoostPreprocessorThread.cpp 
+BoostPreprocessorThread.cpp InternalRayCaster.cpp IntelRayCaster.cpp \
+RayCaster.cpp PreprocessorFactory.cpp GvsPreprocessor.cpp
 
 
