Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda	(revision 2587)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda	(revision 2591)
@@ -14,5 +14,5 @@
 
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=mutation+object_direction+spatial \
+-rss_distributions=mutation+object_direction+direction \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2587)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2591)
@@ -717,5 +717,5 @@
 		if (1 && mShowRays) 
 		{
-			RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod);
+			RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod, mShowDistribution);
 		}
 	}
@@ -877,4 +877,5 @@
 	mShowDistanceWeightedTriangles = false;
 	mShowWeightedTriangles = false;
+	mShowDistribution = 15;
 
 	mSpatialFilterSize = 0.01;
@@ -931,9 +932,11 @@
 	connect(mControlWidget, SIGNAL(SetShowDistribution(bool)), this, SLOT(SetShowDistribution(bool)));
 
-
-	connect(mControlWidget,
-		SIGNAL(SetShowRays(bool)),
-		this,
-		SLOT(SetShowRays(bool)));
+	connect(mControlWidget, SIGNAL(SetShowDistribution1(bool)), this, SLOT(SetShowDistribution1(bool)));
+	connect(mControlWidget, SIGNAL(SetShowDistribution2(bool)), this, SLOT(SetShowDistribution2(bool)));
+	connect(mControlWidget, SIGNAL(SetShowDistribution3(bool)), this, SLOT(SetShowDistribution3(bool)));
+	connect(mControlWidget, SIGNAL(SetShowDistribution4(bool)), this, SLOT(SetShowDistribution4(bool)));
+
+
+	connect(mControlWidget,	SIGNAL(SetShowRays(bool)), this, SLOT(SetShowRays(bool)));
 
 	resize(1000, 500);
@@ -1648,4 +1651,8 @@
 	connect(rb4, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution(bool)));
 
+
+	///////////////////////////
+
+	
 	QGroupBox *groupBox = new QGroupBox("Ray visualization options");
 	QVBoxLayout *vbox2 = new QVBoxLayout;
@@ -1657,4 +1664,26 @@
 	
 	rb1->setChecked(true);
+
+
+	QCheckBox *cb = new QCheckBox("Distribution 1", parent);
+	vbox2->addWidget(cb);
+	cb->setChecked(true);
+	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution1(bool)));
+
+	cb = new QCheckBox("Distribution 2", parent);
+	vbox2->addWidget(cb);
+	cb->setChecked(true);
+	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution2(bool)));
+
+	cb = new QCheckBox("Distribution 3", parent);
+	vbox2->addWidget(cb);
+	cb->setChecked(true);
+	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution3(bool)));
+	
+	cb = new QCheckBox("Distribution 4", parent);
+	vbox2->addWidget(cb);
+	cb->setChecked(true);
+	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution4(bool)));
+
 
 	vbox2->addStretch(1);
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h	(revision 2587)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h	(revision 2591)
@@ -147,4 +147,9 @@
   void SetShowContribution(bool);
   void SetShowDistribution(bool);
+
+  void SetShowDistribution1(bool);
+  void SetShowDistribution2(bool);
+  void SetShowDistribution3(bool);
+  void SetShowDistribution4(bool);
 };
 
@@ -191,4 +196,6 @@
 	bool mShowDistanceWeightedPvs;
 	bool mShowWeightedTriangles;
+	
+	int mShowDistribution;
 
 	// some statistics
@@ -459,5 +466,40 @@
 		mRayVisualizationMethod = 3;
 	}
-
+	
+	void SetShowDistribution1(bool b)
+	{
+		if (b)
+			mShowDistribution |= 1;
+		else
+			mShowDistribution ^= 1;
+
+		std::cout << "b: " << (mShowDistribution & 1) << " " << (mShowDistribution & 2) << " " << (mShowDistribution & 4) << " " << (mShowDistribution & 8) << std::endl; 
+	}
+
+	
+	void SetShowDistribution2(bool b)
+	{
+		if (b)
+			mShowDistribution |= 2;
+		else
+			mShowDistribution ^= 2;
+	}
+
+	
+	void SetShowDistribution3(bool b)
+	{
+		if (b)
+			mShowDistribution |= 4;
+		else
+			mShowDistribution ^= 4;
+	}
+	
+	void SetShowDistribution4(bool b)
+	{
+		if (b)
+			mShowDistribution |= 8;
+		else
+			mShowDistribution ^= 8;
+	}
 
 	void _RenderPvs();
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2588)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2591)
@@ -205,5 +205,5 @@
 
 
-void GlRenderer::RenderRays(const VssRayContainer &rays, int colorType)
+void GlRenderer::RenderRays(const VssRayContainer &rays, int colorType, int showDistribution)
 {
 	VssRayContainer::const_iterator it = rays.begin(), it_end = rays.end();
@@ -217,4 +217,13 @@
 		VssRay *ray = *it;
 
+		// only show distributions that were checked
+		if (((ray->mDistribution == SamplingStrategy::DIRECTION_BASED_DISTRIBUTION) && ((showDistribution & 1) == 0)) ||
+			((ray->mDistribution == SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION) && ((showDistribution & 2) == 0)) ||
+			((ray->mDistribution == SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION) && ((showDistribution & 4) == 0)) ||
+			((ray->mDistribution == SamplingStrategy::MUTATION_BASED_DISTRIBUTION) && ((showDistribution & 8) == 0)))
+		{
+			continue;
+		}
+		
 		switch (colorType)
 		{
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 2587)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 2591)
@@ -129,5 +129,5 @@
 
   void
-  RenderRays(const VssRayContainer &rays, int colorType = 0);
+  RenderRays(const VssRayContainer &rays, int colorType = 0, int showDistribution = 15);
 
   void
