Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1633)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1633)
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# add bin to path
+export PATH=../bin:$PATH
+
+#TARGET=debug
+TARGET=release
+
+PROGRAM=../bin/$TARGET/Preprocessor.exe
+
+echo "starting $TARGET mode"
+
+SCENE=vsposp_typical
+#SCENE=soda5
+#SCENE=cube
+#SCENE=atlanta
+#SCENE=vienna
+
+LOG_PREFIX=../scripts/tests/i3d/$SCENE
+
+ENVIRONMENT=$SCENE.env
+
+
+#######################################################
+
+
+METHOD=sequential
+echo "$SCENE $METHOD"
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+-bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+-hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+-hierarchy_construction_start_with_osp=true
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl
+mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl
+mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env	(revision 1633)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env	(revision 1633)
@@ -0,0 +1,279 @@
+##############################################################################
+# ERS default configuration file
+# Jiri Bittner 2003
+#############################################################################
+
+Scene {
+
+#	filename glasgow1.x3d
+#	filename vienna.x3d
+#	filename ../data/vienna/vienna-simple.x3d
+#	filename ../data/vienna/vienna-buildings.x3d
+#	filename ../data/vienna/vienna-roofs.x3d
+#	filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d
+#;../data/vienna/vienna-plane.x3d
+#	filename ../data/vienna/viewcells-25-sel.x3d
+#	filename ../data/atlanta/atlanta2.x3d
+#	filename ../data/soda/soda.dat
+	filename ../data/soda/soda5.dat
+#	filename ../data/artificial/cube_test.x3d
+#	filename ../data/grandcanyon1_RotXmin90.obj
+#	filename ../data/CityModel.obj
+}
+
+
+Preprocessor {
+	samplesFilename rays.out
+#	useGlRenderer true
+	useGlRenderer false
+	type vss
+	detectEmptyViewSpace true
+	loadMeshes false
+	# internal raycaster
+	rayCastMethod 0
+	exportVisibility false
+	loadKdTree false
+	exportKdTree false 
+}
+
+
+VssPreprocessor {
+	initialSamples 0
+	vssSamples 0
+	useImportanceSampling true
+	loadInitialSamples  false
+	storeInitialSamples false
+	useViewSpaceBox false
+}
+
+
+VssTree {
+	useRss    false
+	epsilon		1e-6
+	
+	maxDepth 	2
+	minPvs		30
+	minRays		800
+	minSize		0.001
+ 	maxCostRatio	1.5
+	maxRayContribution 0.5
+		
+	maxTotalMemory	50
+	maxStaticMemory	20
+	
+	splitType regular
+	#	splitType heuristic
+	#	splitType hybrid
+	splitUseOnlyDrivingAxis true
+	
+	interleaveDirSplits	true
+    dirSplitDepth 0
+	
+	numberOfEndPointDomains	10000
+	ct_div_ci	0.0
+	randomize	false
+	
+	refDirBoxMaxSize	0.1
+}
+
+
+Limits {
+       threshold	1e-6
+       small		1e-6
+       infinity		1e9
+}
+
+
+Unigraphics {
+	meshGrouping 1
+}
+
+
+KdTree {
+	sahUseFaces true
+
+	Termination {
+		minCost 0
+		maxDepth 20
+		
+		maxCostRatio 1.5
+		ct_div_ci 0.5
+	}
+
+#	splitMethod spatialMedian
+	splitMethod SAH
+	splitBorder 0.01
+}
+
+MeshKdTree {
+	Termination {
+		minCost 1
+		maxDepth 18
+		maxCostRatio 0.9
+		ct_div_ci 0.5
+	}
+
+#	splitMethod spatialMedian
+	splitMethod SAH
+	splitBorder 0.01
+}
+
+
+ViewCells {
+	
+	# samples used for view cell construction 
+	# (after the sampling used for the hierarchy)
+	Construction {
+		samples 0
+		samplesPerPass 1000000
+	}
+
+	# number of active view cells
+	active 25000
+	maxStaticMemory	40
+
+	exportToFile false
+	loadFromFile false
+
+	type vspOspTree
+	
+	#percentage of total visible objects where pvs is considered invalid
+	maxPvsRatio 1.0
+		
+	processOnlyValidViewCells false
+
+	#stats viewCellStats.log
+	#samplingType directional
+	samplingType box
+
+	PostProcess {
+		# how much samples are used for post processing
+		samples 0
+		maxMergesPerPass 5000
+		useRaysForMerge false
+		refine false
+		compress false
+		merge false
+	}
+
+	Visualization {
+		# how much samples we use for visualization
+		samples 200
+		exportRays true
+		exportGeometry true
+		exportMergedViewCells false
+		useClipPlane true
+		clipPlaneAxis 1
+		clipPlanePos 0.3
+		maxOutput 2
+	}
+
+	showVisualization true
+	evaluateViewCells true
+	
+	Evaluation {
+		samplesPerPass 100000
+		samples 100000
+		statsPrefix ../scripts/viewCells
+	}
+}
+
+################################
+# View space partitioning kd tree
+
+VspTree {
+	Construction {
+		samples 100000
+	}
+
+	Termination {
+		minPvs 0
+		maxViewCells 1000
+	}
+
+	useCostHeuristics true
+	splitUseOnlyDrivingAxis false
+
+	# maximum number of tests per node
+	maxTests 100000
+}
+
+##########################
+# The bounding volume hierarchy
+
+BvHierarchy {
+
+	Construction {
+		
+	}
+
+	Termination {
+		maxLeaves 1000
+	}
+
+	useCostHeuristics true
+	splitUseOnlyDrivingAxis false
+}
+
+
+##########################
+# Manages the construction of view space and object space partition
+
+Hierarchy {
+	# the type of object space partition: view space is always vsp (=kd) partition
+	type bvh
+	
+	Construction {
+		# type 0 = sequential computation, type 1=interleaved
+		type 2
+		# if the object space should be subdivided first (if false, the view space is subdivided first)
+		startWithObjectSpace true
+
+		###############################
+		# only for interleaved method
+
+		# only for interleaved method: the minimum depth for object space partition
+		minDepthForOsp 7
+		# the minimum depth for view space partition
+		minDepthForVsp 7
+
+		# if dirty split candidates are reevaluated 
+		repairQueue false
+
+		###################################################
+
+		# iterative construction of vs partititon and os partition
+		useMultiLevel false
+
+		# number of iteration steps
+		levels 4
+
+		# recompute split plane when "repairing" a candidate
+		recomputeSplitPlaneOnRepair true
+	}
+
+	Termination {
+		# maximal number of leaves
+		maxLeaves 1000
+		# minimum ratio of global cost decrease
+		minGlobalCostRatio -1
+	}
+}
+
+
+VspBspTree {
+	Construction {
+		samples 100000
+	}
+
+	Termination {
+		minPvs 0
+		maxViewCells 1000
+	}
+
+	useCostHeuristics true
+	splitUseOnlyDrivingAxis false
+
+	# maximum number of tests per node
+	maxTests 100000
+}
