Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2147)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2148)
@@ -14,4 +14,5 @@
 #include "Trackball.h"
 #include "QtPreprocessorThread.h"
+#include "Material.h"
 
 #define USE_CG 1
@@ -414,6 +415,10 @@
 		
 		if (mRenderVisibilityEstimates) {
-		  float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f
-		  glColor3f(visibility, 0.0f, 0.0f);
+		  //float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f
+		  //		  glColor3f(visibility, 0.0f, 0.0f);
+
+		  RgbColor color = RainbowMapping(mTransferFunction*log10(entry.mData.mSumPdf + 1));
+		  glColor3f(color.r, color.g, color.b);
+		  
 		  mUseForcedColors = true;
 		  RenderIntersectable(object);
@@ -1050,5 +1055,7 @@
 	  const float importance = 5.0f*mTransferFunction *
 		((float)vc->GetPvs().GetSize() / (float)maxPvs);
-	  c = RgbColor(importance, 1.0f - importance, 0.0f);
+	  //	  c = RgbColor(importance, 1.0f - importance, 0.0f);
+	  c = RainbowMapping(importance);
+	  
 	}
 	glColor3f(c.r, c.g, c.b);
@@ -1125,5 +1132,5 @@
   vl->addWidget(slider);
   slider->show();
-  slider->setRange(1, 1000);
+  slider->setRange(1, 10000);
   slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
   slider->setValue(100);
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp	(revision 863)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp	(revision 2148)
@@ -26,3 +26,59 @@
 }
 
+
+
+RgbColor
+RainbowColorMapping(const float _value)
+{
+  RgbColor color;
+
+  float value = 1.0f - _value;
+
+#define MAX_COLOR_VALUE 1.0f
+  
+  switch ((int)(value*4.0f)) {
+  case 0:
+	color.r = MAX_COLOR_VALUE;
+	color.g = value*MAX_COLOR_VALUE;
+	color.b = 0.0f;
+	break;
+  case 1:
+	color.r = (1.0f - value)*MAX_COLOR_VALUE;;
+	color.g = MAX_COLOR_VALUE;
+	color.b = 0.0f;
+	break;
+  case 2:
+	color.r = 0.0f;
+	color.g = MAX_COLOR_VALUE;
+	color.b = value*MAX_COLOR_VALUE;
+	break;
+  case 3:
+	color.r = 0.0f;
+	color.g = (1.0f - value)*MAX_COLOR_VALUE;;
+	color.b = MAX_COLOR_VALUE;
+	break;
+  default:
+	color.r = value*MAX_COLOR_VALUE;
+	color.g = 0.0f;
+	color.b = MAX_COLOR_VALUE;
+	break;
+  }
+  return color;
 }
+
+RgbColor
+GreenRedColorMap(const float value)
+{
+  RgbColor color;
+  
+#define MAX_COLOR_VALUE 1.0f
+  
+  color.r = MAX_COLOR_VALUE*value;
+  color.g = MAX_COLOR_VALUE*(1.0f - value);
+  color.b = 0.0f;
+  
+  return color;
+}
+
+
+}
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Material.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Material.h	(revision 1001)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Material.h	(revision 2148)
@@ -23,4 +23,9 @@
   RandomColor(const float a=0.0f, const float b=1.0f);
 
+  // Mapping from interval 0.0-1.0 to RGB using "rainbow" color map
+  // (range of hue from 0-240)
+
+  friend RgbColor RainbowMapping(const float value);
+  
 };
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2105)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Makefile	(revision 2148)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 8. II 14:44:05 2007
+# Generated by qmake (2.00a) (Qt 4.1.2) on: út 20. II 20:32:50 2007
 # Project:  preprocessor.pro
 # Template: app
@@ -63,5 +63,5 @@
 	$(MAKE) -f $(MAKEFILE).Debug uninstall
 
-Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \
+Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \
 		C:\Qt\4.1.2\mkspecs\features\qt_config.prf \
 		C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \
Index: GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2105)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2148)
@@ -97,5 +97,5 @@
 UnigraphicsParser.cpp X3dExporter.cpp SceneGraph.cpp Material.cpp \
 Matrix4x4.cpp Vector3.cpp AxisAlignedBox3.cpp Ray.cpp main.cpp Mesh.cpp \
-Exporter.cpp Camera.cpp X3dParser.cpp MeshKdTree.cpp Pvs.cpp \
+Exporter.cpp Camera.cpp X3dParser.cpp MeshKdTree.cpp  \
 MutualVisibility.cpp Triangle3.cpp Rectangle3.cpp Plane3.cpp Polygon3.cpp \
 ViewCell.cpp ViewCellBsp.cpp Halton.cpp VssRay.cpp VssTree.cpp VssPreprocessor.cpp \
@@ -116,5 +116,6 @@
 RenderTexture.cpp Mutation.cpp Timer/RDTSCTimer.cpp \
 Timer/BenchTimer.cpp Timer/merror.cpp \
-Intersectable.cpp TraversalTree.cpp
+Intersectable.cpp TraversalTree.cpp ObjectPvs.cpp ObjectsParser.cpp
+
 
 SOURCES += BoostPreprocessorThread.cpp 
