Changeset 2148 for GTP/trunk/Lib/Vis
- Timestamp:
- 02/21/07 20:14:45 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2105 r2148 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 8. II 14:44:0520073 # Generated by qmake (2.00a) (Qt 4.1.2) on: út 20. II 20:32:50 2007 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 63 63 $(MAKE) -f $(MAKEFILE).Debug uninstall 64 64 65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc 2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 66 66 C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 67 67 C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ -
GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp
r863 r2148 26 26 } 27 27 28 29 30 RgbColor 31 RainbowColorMapping(const float _value) 32 { 33 RgbColor color; 34 35 float value = 1.0f - _value; 36 37 #define MAX_COLOR_VALUE 1.0f 38 39 switch ((int)(value*4.0f)) { 40 case 0: 41 color.r = MAX_COLOR_VALUE; 42 color.g = value*MAX_COLOR_VALUE; 43 color.b = 0.0f; 44 break; 45 case 1: 46 color.r = (1.0f - value)*MAX_COLOR_VALUE;; 47 color.g = MAX_COLOR_VALUE; 48 color.b = 0.0f; 49 break; 50 case 2: 51 color.r = 0.0f; 52 color.g = MAX_COLOR_VALUE; 53 color.b = value*MAX_COLOR_VALUE; 54 break; 55 case 3: 56 color.r = 0.0f; 57 color.g = (1.0f - value)*MAX_COLOR_VALUE;; 58 color.b = MAX_COLOR_VALUE; 59 break; 60 default: 61 color.r = value*MAX_COLOR_VALUE; 62 color.g = 0.0f; 63 color.b = MAX_COLOR_VALUE; 64 break; 65 } 66 return color; 28 67 } 68 69 RgbColor 70 GreenRedColorMap(const float value) 71 { 72 RgbColor color; 73 74 #define MAX_COLOR_VALUE 1.0f 75 76 color.r = MAX_COLOR_VALUE*value; 77 color.g = MAX_COLOR_VALUE*(1.0f - value); 78 color.b = 0.0f; 79 80 return color; 81 } 82 83 84 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Material.h
r1001 r2148 23 23 RandomColor(const float a=0.0f, const float b=1.0f); 24 24 25 // Mapping from interval 0.0-1.0 to RGB using "rainbow" color map 26 // (range of hue from 0-240) 27 28 friend RgbColor RainbowMapping(const float value); 29 25 30 }; 26 31 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2147 r2148 14 14 #include "Trackball.h" 15 15 #include "QtPreprocessorThread.h" 16 #include "Material.h" 16 17 17 18 #define USE_CG 1 … … 414 415 415 416 if (mRenderVisibilityEstimates) { 416 float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f 417 glColor3f(visibility, 0.0f, 0.0f); 417 //float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f 418 // glColor3f(visibility, 0.0f, 0.0f); 419 420 RgbColor color = RainbowMapping(mTransferFunction*log10(entry.mData.mSumPdf + 1)); 421 glColor3f(color.r, color.g, color.b); 422 418 423 mUseForcedColors = true; 419 424 RenderIntersectable(object); … … 1050 1055 const float importance = 5.0f*mTransferFunction * 1051 1056 ((float)vc->GetPvs().GetSize() / (float)maxPvs); 1052 c = RgbColor(importance, 1.0f - importance, 0.0f); 1057 // c = RgbColor(importance, 1.0f - importance, 0.0f); 1058 c = RainbowMapping(importance); 1059 1053 1060 } 1054 1061 glColor3f(c.r, c.g, c.b); … … 1125 1132 vl->addWidget(slider); 1126 1133 slider->show(); 1127 slider->setRange(1, 1000 );1134 slider->setRange(1, 10000); 1128 1135 slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 1129 1136 slider->setValue(100); -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r2105 r2148 97 97 UnigraphicsParser.cpp X3dExporter.cpp SceneGraph.cpp Material.cpp \ 98 98 Matrix4x4.cpp Vector3.cpp AxisAlignedBox3.cpp Ray.cpp main.cpp Mesh.cpp \ 99 Exporter.cpp Camera.cpp X3dParser.cpp MeshKdTree.cpp Pvs.cpp\99 Exporter.cpp Camera.cpp X3dParser.cpp MeshKdTree.cpp \ 100 100 MutualVisibility.cpp Triangle3.cpp Rectangle3.cpp Plane3.cpp Polygon3.cpp \ 101 101 ViewCell.cpp ViewCellBsp.cpp Halton.cpp VssRay.cpp VssTree.cpp VssPreprocessor.cpp \ … … 116 116 RenderTexture.cpp Mutation.cpp Timer/RDTSCTimer.cpp \ 117 117 Timer/BenchTimer.cpp Timer/merror.cpp \ 118 Intersectable.cpp TraversalTree.cpp 118 Intersectable.cpp TraversalTree.cpp ObjectPvs.cpp ObjectsParser.cpp 119 119 120 120 121 SOURCES += BoostPreprocessorThread.cpp
Note: See TracChangeset
for help on using the changeset viewer.