Changeset 2514 for trunk/packages/vizservers
- Timestamp:
- Sep 15, 2011, 11:04:29 AM (13 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/Makefile.in
r2423 r2514 47 47 DEBUG = #yes 48 48 TRACE = #yes 49 USE_CUSTOM_AXES = yes 50 USE_GPU_RAYCASTING = yes 51 USE_OFFSCREEN_RENDERING = yes 49 HAVE_GLYPH3D_MAPPER = #yes 50 USE_CUSTOM_AXES = yes 51 USE_GPU_RAYCASTING = yes 52 USE_OFFSCREEN_RENDERING = yes 52 53 53 54 #vtk uses deprecated strstream header (instead of sstream) … … 60 61 ifdef TRACE 61 62 DEFINES += -DWANT_TRACE 63 endif 64 ifdef HAVE_GLYPH3D_MAPPER 65 DEFINES += -DHAVE_GLYPH3D_MAPPER 62 66 endif 63 67 ifdef USE_CUSTOM_AXES … … 78 82 RpContour2D.cpp \ 79 83 RpContour3D.cpp \ 84 RpCutplane.cpp \ 80 85 RpGlyphs.cpp \ 81 86 RpHeightMap.cpp \ … … 132 137 RpContour2D.o: RpContour2D.h RpVtkGraphicsObject.h RpVtkDataSet.h Trace.h 133 138 RpContour3D.o: RpContour3D.h RpVtkGraphicsObject.h RpVtkDataSet.h ColorMap.h Trace.h 139 RpCutplane.o: RpCutplane.h RpVtkGraphicsObject.h RpVtkDataSet.h ColorMap.h Trace.h 134 140 RpGlyphs.o: RpGlyphs.h RpVtkGraphicsObject.h RpVtkDataSet.h ColorMap.h Trace.h 135 141 RpHeightMap.o: RpHeightMap.h RpVtkGraphicsObject.h RpVtkDataSet.h ColorMap.h Trace.h … … 141 147 RpVolume.o: RpVolume.h RpVtkGraphicsObject.h RpVtkDataSet.h ColorMap.h Trace.h 142 148 RpVtkDataSet.o: RpVtkDataSet.h Trace.h 143 RpVtkRenderer.o: RpVtkRenderer.h RpVtkDataSet.h RpContour2D.h RpContour3D.h RpGlyphs.h RpHeightMap.h RpLIC.h RpMolecule.h RpPolyData.h RpPseudoColor.h RpStreamlines.h RpVolume.h ColorMap.h Trace.h144 RpVtkRendererCmd.o: RpVtkRenderer.h RpVtkDataSet.h RpContour2D.h RpContour3D.h RpGlyphs.h RpHeightMap.h RpLIC.h RpMolecule.h RpPolyData.h RpPseudoColor.h RpStreamlines.h RpVolume.h ColorMap.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h145 RpVtkRenderServer.o: RpVtkRenderServer.h RpVtkRendererCmd.h RpVtkRenderer.h Trace.h PPMWriter.h TGAWriter.h149 RpVtkRenderer.o: RpVtkRenderer.h vtkRpCubeAxesActor2D.h RpVtkDataSet.h RpContour2D.h RpContour3D.h RpGlyphs.h RpHeightMap.h RpLIC.h RpMolecule.h RpPolyData.h RpPseudoColor.h RpStreamlines.h RpVolume.h ColorMap.h Trace.h 150 RpVtkRendererCmd.o: RpVtkRenderer.h vtkRpCubeAxesActor2D.h RpVtkDataSet.h RpContour2D.h RpContour3D.h RpGlyphs.h RpHeightMap.h RpLIC.h RpMolecule.h RpPolyData.h RpPseudoColor.h RpStreamlines.h RpVolume.h ColorMap.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h 151 RpVtkRenderServer.o: RpVtkRenderServer.h RpVtkRendererCmd.h RpVtkRenderer.h vtkRpCubeAxesActor2D.h Trace.h PPMWriter.h TGAWriter.h 146 152 Trace.o: Trace.h 147 153 TGAWriter.o: TGAWriter.h Trace.h -
trunk/packages/vizservers/vtkvis/RpContour3D.cpp
r2459 r2514 172 172 _contourMapper->SetResolveCoincidentTopologyToPolygonOffset(); 173 173 _contourMapper->SetInputConnection(_contourFilter->GetOutputPort()); 174 _contourMapper->SetColorModeToMapScalars(); 174 175 getActor()->SetMapper(_contourMapper); 175 176 } -
trunk/packages/vizservers/vtkvis/RpHeightMap.cpp
r2459 r2514 91 91 _dataRange[1] = scalarRange[1]; 92 92 } else { 93 dataSet->getScalarRange(_dataRange);93 _dataSet->getScalarRange(_dataRange); 94 94 } 95 95 -
trunk/packages/vizservers/vtkvis/RpLIC.cpp
r2459 r2514 24 24 #include "RpLIC.h" 25 25 #include "Trace.h" 26 #include "RpVtkRenderServer.h"27 26 28 27 using namespace Rappture::VtkVis; -
trunk/packages/vizservers/vtkvis/RpPseudoColor.cpp
r2492 r2514 10 10 #include <vtkDataSet.h> 11 11 #include <vtkPointData.h> 12 #include <vtkCellData.h> 12 13 #include <vtkDataSetMapper.h> 13 14 #include <vtkUnstructuredGrid.h> … … 235 236 case COLOR_BY_VECTOR_MAGNITUDE: { 236 237 _dsMapper->ScalarVisibilityOn(); 237 _dsMapper->SetScalarModeToUsePointFieldData();238 238 if (ds->GetPointData() != NULL && 239 239 ds->GetPointData()->GetVectors() != NULL) { 240 _dsMapper->SetScalarModeToUsePointFieldData(); 240 241 _dsMapper->SelectColorArray(ds->GetPointData()->GetVectors()->GetName()); 242 } else if (ds->GetCellData() != NULL && 243 ds->GetCellData()->GetVectors() != NULL) { 244 _dsMapper->SetScalarModeToUseCellFieldData(); 245 _dsMapper->SelectColorArray(ds->GetCellData()->GetVectors()->GetName()); 241 246 } 242 247 if (_lut != NULL) { … … 248 253 case COLOR_BY_VECTOR_X: 249 254 _dsMapper->ScalarVisibilityOn(); 250 _dsMapper->SetScalarModeToUsePointFieldData();251 255 if (ds->GetPointData() != NULL && 252 256 ds->GetPointData()->GetVectors() != NULL) { 257 _dsMapper->SetScalarModeToUsePointFieldData(); 253 258 _dsMapper->SelectColorArray(ds->GetPointData()->GetVectors()->GetName()); 259 } else if (ds->GetCellData() != NULL && 260 ds->GetCellData()->GetVectors() != NULL) { 261 _dsMapper->SetScalarModeToUseCellFieldData(); 262 _dsMapper->SelectColorArray(ds->GetCellData()->GetVectors()->GetName()); 254 263 } 255 264 if (_lut != NULL) { … … 261 270 case COLOR_BY_VECTOR_Y: 262 271 _dsMapper->ScalarVisibilityOn(); 263 _dsMapper->SetScalarModeToUsePointFieldData();264 272 if (ds->GetPointData() != NULL && 265 273 ds->GetPointData()->GetVectors() != NULL) { 274 _dsMapper->SetScalarModeToUsePointFieldData(); 266 275 _dsMapper->SelectColorArray(ds->GetPointData()->GetVectors()->GetName()); 276 } else if (ds->GetCellData() != NULL && 277 ds->GetCellData()->GetVectors() != NULL) { 278 _dsMapper->SetScalarModeToUseCellFieldData(); 279 _dsMapper->SelectColorArray(ds->GetCellData()->GetVectors()->GetName()); 267 280 } 268 281 if (_lut != NULL) { … … 274 287 case COLOR_BY_VECTOR_Z: 275 288 _dsMapper->ScalarVisibilityOn(); 276 _dsMapper->SetScalarModeToUsePointFieldData();277 289 if (ds->GetPointData() != NULL && 278 290 ds->GetPointData()->GetVectors() != NULL) { 291 _dsMapper->SetScalarModeToUsePointFieldData(); 279 292 _dsMapper->SelectColorArray(ds->GetPointData()->GetVectors()->GetName()); 293 } else if (ds->GetCellData() != NULL && 294 ds->GetCellData()->GetVectors() != NULL) { 295 _dsMapper->SetScalarModeToUseCellFieldData(); 296 _dsMapper->SelectColorArray(ds->GetCellData()->GetVectors()->GetName()); 280 297 } 281 298 if (_lut != NULL) { -
trunk/packages/vizservers/vtkvis/RpVtkRenderServer.h
r2100 r2514 9 9 #define __RAPPTURE_VTKVIS_RENDERSERVER_H__ 10 10 11 #include "RpVtkRenderer.h"12 13 11 namespace Rappture { 14 12 namespace VtkVis { 13 14 class Renderer; 15 15 16 16 extern int g_fdIn; -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r2512 r2514 158 158 } 159 159 _contour3Ds.clear(); 160 TRACE("Deleting Cutplanes"); 161 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 162 itr != _cutplanes.end(); ++itr) { 163 delete itr->second; 164 } 165 _cutplanes.clear(); 160 166 TRACE("Deleting Glyphs"); 161 167 for (GlyphsHashmap::iterator itr = _glyphs.begin(); … … 314 320 315 321 /** 322 * \brief Remove the Cutplane for the specified DataSet 323 * 324 * The underlying Cutplane is deleted, freeing its memory 325 */ 326 void Renderer::deleteCutplane(const DataSetId& id) 327 { 328 CutplaneHashmap::iterator itr; 329 330 bool doAll = false; 331 332 if (id.compare("all") == 0) { 333 itr = _cutplanes.begin(); 334 doAll = true; 335 } else { 336 itr = _cutplanes.find(id); 337 } 338 if (itr == _cutplanes.end()) { 339 ERROR("Cutplane not found: %s", id.c_str()); 340 return; 341 } 342 343 TRACE("Deleting Cutplanes for %s", id.c_str()); 344 345 do { 346 Cutplane *cutplane = itr->second; 347 if (cutplane->getProp()) 348 _renderer->RemoveViewProp(cutplane->getProp()); 349 delete cutplane; 350 351 itr = _cutplanes.erase(itr); 352 } while (doAll && itr != _cutplanes.end()); 353 354 initCamera(); 355 _needsRedraw = true; 356 } 357 358 /** 316 359 * \brief Remove the Glyphs for the specified DataSet 317 360 * … … 637 680 deleteContour2D(itr->second->getName()); 638 681 deleteContour3D(itr->second->getName()); 682 deleteCutplane(itr->second->getName()); 639 683 deleteGlyphs(itr->second->getName()); 640 684 deleteHeightMap(itr->second->getName()); … … 1213 1257 } 1214 1258 } 1259 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 1260 itr != _cutplanes.end(); ++itr) { 1261 if (itr->second->getColorMap() == cmap) { 1262 itr->second->updateColorMap(); 1263 _needsRedraw = true; 1264 } 1265 } 1215 1266 for (GlyphsHashmap::iterator itr = _glyphs.begin(); 1216 1267 itr != _glyphs.end(); ++itr) { … … 1271 1322 for (Contour3DHashmap::iterator itr = _contour3Ds.begin(); 1272 1323 itr != _contour3Ds.end(); ++itr) { 1324 if (itr->second->getColorMap() == cmap) 1325 return true; 1326 } 1327 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 1328 itr != _cutplanes.end(); ++itr) { 1273 1329 if (itr->second->getColorMap() == cmap) 1274 1330 return true; … … 2672 2728 2673 2729 /** 2730 * \brief Create a new Cutplane and associate it with the named DataSet 2731 */ 2732 bool Renderer::addCutplane(const DataSetId& id) 2733 { 2734 DataSetHashmap::iterator itr; 2735 2736 bool doAll = false; 2737 2738 if (id.compare("all") == 0) { 2739 itr = _dataSets.begin(); 2740 } else { 2741 itr = _dataSets.find(id); 2742 } 2743 if (itr == _dataSets.end()) { 2744 ERROR("Unknown dataset %s", id.c_str()); 2745 return false; 2746 } 2747 2748 do { 2749 DataSet *ds = itr->second; 2750 const DataSetId& dsID = ds->getName(); 2751 2752 if (getCutplane(dsID)) { 2753 WARN("Replacing existing Cutplane %s", dsID.c_str()); 2754 deleteCutplane(dsID); 2755 } 2756 2757 Cutplane *cutplane = new Cutplane(); 2758 _cutplanes[dsID] = cutplane; 2759 2760 cutplane->setDataSet(ds, 2761 _useCumulativeRange, 2762 _cumulativeScalarRange, 2763 _cumulativeVectorMagnitudeRange, 2764 _cumulativeVectorComponentRange); 2765 2766 _renderer->AddViewProp(cutplane->getProp()); 2767 } while (doAll && ++itr != _dataSets.end()); 2768 2769 initCamera(); 2770 _needsRedraw = true; 2771 return true; 2772 } 2773 2774 /** 2775 * \brief Get the Cutplane associated with a named DataSet 2776 */ 2777 Cutplane *Renderer::getCutplane(const DataSetId& id) 2778 { 2779 CutplaneHashmap::iterator itr = _cutplanes.find(id); 2780 2781 if (itr == _cutplanes.end()) { 2782 #ifdef DEBUG 2783 TRACE("Cutplane not found: %s", id.c_str()); 2784 #endif 2785 return NULL; 2786 } else 2787 return itr->second; 2788 } 2789 2790 /** 2791 * \brief Set an additional transform on the prop 2792 */ 2793 void Renderer::setCutplaneTransform(const DataSetId& id, vtkMatrix4x4 *trans) 2794 { 2795 CutplaneHashmap::iterator itr; 2796 2797 bool doAll = false; 2798 2799 if (id.compare("all") == 0) { 2800 itr = _cutplanes.begin(); 2801 doAll = true; 2802 } else { 2803 itr = _cutplanes.find(id); 2804 } 2805 if (itr == _cutplanes.end()) { 2806 ERROR("Cutplane not found: %s", id.c_str()); 2807 return; 2808 } 2809 2810 do { 2811 itr->second->setTransform(trans); 2812 } while (doAll && ++itr != _cutplanes.end()); 2813 2814 resetAxes(); 2815 _needsRedraw = true; 2816 } 2817 2818 /** 2819 * \brief Set the prop orientation with a quaternion 2820 */ 2821 void Renderer::setCutplaneOrientation(const DataSetId& id, double quat[4]) 2822 { 2823 CutplaneHashmap::iterator itr; 2824 2825 bool doAll = false; 2826 2827 if (id.compare("all") == 0) { 2828 itr = _cutplanes.begin(); 2829 doAll = true; 2830 } else { 2831 itr = _cutplanes.find(id); 2832 } 2833 if (itr == _cutplanes.end()) { 2834 ERROR("Cutplane not found: %s", id.c_str()); 2835 return; 2836 } 2837 2838 do { 2839 itr->second->setOrientation(quat); 2840 } while (doAll && ++itr != _cutplanes.end()); 2841 2842 resetAxes(); 2843 _needsRedraw = true; 2844 } 2845 2846 /** 2847 * \brief Set the prop orientation with a rotation about an axis 2848 */ 2849 void Renderer::setCutplaneOrientation(const DataSetId& id, double angle, double axis[3]) 2850 { 2851 CutplaneHashmap::iterator itr; 2852 2853 bool doAll = false; 2854 2855 if (id.compare("all") == 0) { 2856 itr = _cutplanes.begin(); 2857 doAll = true; 2858 } else { 2859 itr = _cutplanes.find(id); 2860 } 2861 if (itr == _cutplanes.end()) { 2862 ERROR("Cutplane not found: %s", id.c_str()); 2863 return; 2864 } 2865 2866 do { 2867 itr->second->setOrientation(angle, axis); 2868 } while (doAll && ++itr != _cutplanes.end()); 2869 2870 resetAxes(); 2871 _needsRedraw = true; 2872 } 2873 2874 /** 2875 * \brief Set the prop position in world coords 2876 */ 2877 void Renderer::setCutplanePosition(const DataSetId& id, double pos[3]) 2878 { 2879 CutplaneHashmap::iterator itr; 2880 2881 bool doAll = false; 2882 2883 if (id.compare("all") == 0) { 2884 itr = _cutplanes.begin(); 2885 doAll = true; 2886 } else { 2887 itr = _cutplanes.find(id); 2888 } 2889 if (itr == _cutplanes.end()) { 2890 ERROR("Cutplane not found: %s", id.c_str()); 2891 return; 2892 } 2893 2894 do { 2895 itr->second->setPosition(pos); 2896 } while (doAll && ++itr != _cutplanes.end()); 2897 2898 resetAxes(); 2899 _needsRedraw = true; 2900 } 2901 2902 /** 2903 * \brief Set the prop scaling 2904 */ 2905 void Renderer::setCutplaneScale(const DataSetId& id, double scale[3]) 2906 { 2907 CutplaneHashmap::iterator itr; 2908 2909 bool doAll = false; 2910 2911 if (id.compare("all") == 0) { 2912 itr = _cutplanes.begin(); 2913 doAll = true; 2914 } else { 2915 itr = _cutplanes.find(id); 2916 } 2917 if (itr == _cutplanes.end()) { 2918 ERROR("Cutplane not found: %s", id.c_str()); 2919 return; 2920 } 2921 2922 do { 2923 itr->second->setScale(scale); 2924 } while (doAll && ++itr != _cutplanes.end()); 2925 2926 resetAxes(); 2927 _needsRedraw = true; 2928 } 2929 2930 /** 2931 * \brief Set the volume slice used for mapping volumetric data 2932 */ 2933 void Renderer::setCutplaneVolumeSlice(const DataSetId& id, Cutplane::Axis axis, double ratio) 2934 { 2935 CutplaneHashmap::iterator itr; 2936 2937 bool doAll = false; 2938 2939 if (id.compare("all") == 0) { 2940 itr = _cutplanes.begin(); 2941 doAll = true; 2942 } else { 2943 itr = _cutplanes.find(id); 2944 } 2945 2946 if (itr == _cutplanes.end()) { 2947 ERROR("Cutplane not found: %s", id.c_str()); 2948 return; 2949 } 2950 2951 do { 2952 itr->second->selectVolumeSlice(axis, ratio); 2953 } while (doAll && ++itr != _cutplanes.end()); 2954 2955 initCamera(); 2956 _needsRedraw = true; 2957 } 2958 2959 /** 2960 * \brief Associate an existing named color map with a Cutplane for the given DataSet 2961 */ 2962 void Renderer::setCutplaneColorMap(const DataSetId& id, const ColorMapId& colorMapId) 2963 { 2964 CutplaneHashmap::iterator itr; 2965 2966 bool doAll = false; 2967 2968 if (id.compare("all") == 0) { 2969 itr = _cutplanes.begin(); 2970 doAll = true; 2971 } else { 2972 itr = _cutplanes.find(id); 2973 } 2974 2975 if (itr == _cutplanes.end()) { 2976 ERROR("Cutplane not found: %s", id.c_str()); 2977 return; 2978 } 2979 2980 ColorMap *cmap = getColorMap(colorMapId); 2981 if (cmap == NULL) { 2982 ERROR("Unknown colormap: %s", colorMapId.c_str()); 2983 return; 2984 } 2985 2986 do { 2987 TRACE("Set Cutplane color map: %s for dataset %s", colorMapId.c_str(), 2988 itr->second->getDataSet()->getName().c_str()); 2989 2990 itr->second->setColorMap(cmap); 2991 } while (doAll && ++itr != _cutplanes.end()); 2992 2993 _needsRedraw = true; 2994 } 2995 2996 /** 2997 * \brief Set the color mode for the specified DataSet 2998 */ 2999 void Renderer::setCutplaneColorMode(const DataSetId& id, Cutplane::ColorMode mode) 3000 { 3001 CutplaneHashmap::iterator itr; 3002 3003 bool doAll = false; 3004 3005 if (id.compare("all") == 0) { 3006 itr = _cutplanes.begin(); 3007 doAll = true; 3008 } else { 3009 itr = _cutplanes.find(id); 3010 } 3011 if (itr == _cutplanes.end()) { 3012 ERROR("Cutplane not found: %s", id.c_str()); 3013 return; 3014 } 3015 3016 do { 3017 itr->second->setColorMode(mode); 3018 } while (doAll && ++itr != _cutplanes.end()); 3019 3020 _needsRedraw = true; 3021 } 3022 3023 /** 3024 * \brief Set opacity of height map for the given DataSet 3025 */ 3026 void Renderer::setCutplaneOpacity(const DataSetId& id, double opacity) 3027 { 3028 CutplaneHashmap::iterator itr; 3029 3030 bool doAll = false; 3031 3032 if (id.compare("all") == 0) { 3033 itr = _cutplanes.begin(); 3034 doAll = true; 3035 } else { 3036 itr = _cutplanes.find(id); 3037 } 3038 if (itr == _cutplanes.end()) { 3039 ERROR("Cutplane not found: %s", id.c_str()); 3040 return; 3041 } 3042 3043 do { 3044 itr->second->setOpacity(opacity); 3045 } while (doAll && ++itr != _cutplanes.end()); 3046 3047 _needsRedraw = true; 3048 } 3049 3050 /** 3051 * \brief Turn on/off rendering height map for the given DataSet 3052 */ 3053 void Renderer::setCutplaneVisibility(const DataSetId& id, bool state) 3054 { 3055 CutplaneHashmap::iterator itr; 3056 3057 bool doAll = false; 3058 3059 if (id.compare("all") == 0) { 3060 itr = _cutplanes.begin(); 3061 doAll = true; 3062 } else { 3063 itr = _cutplanes.find(id); 3064 } 3065 if (itr == _cutplanes.end()) { 3066 ERROR("Cutplane not found: %s", id.c_str()); 3067 return; 3068 } 3069 3070 do { 3071 itr->second->setVisibility(state); 3072 } while (doAll && ++itr != _cutplanes.end()); 3073 3074 _needsRedraw = true; 3075 } 3076 3077 /** 3078 * \brief Set wireframe rendering for the specified DataSet 3079 */ 3080 void Renderer::setCutplaneWireframe(const DataSetId& id, bool state) 3081 { 3082 CutplaneHashmap::iterator itr; 3083 3084 bool doAll = false; 3085 3086 if (id.compare("all") == 0) { 3087 itr = _cutplanes.begin(); 3088 doAll = true; 3089 } else { 3090 itr = _cutplanes.find(id); 3091 } 3092 if (itr == _cutplanes.end()) { 3093 ERROR("Cutplane not found: %s", id.c_str()); 3094 return; 3095 } 3096 3097 do { 3098 itr->second->setWireframe(state); 3099 } while (doAll && ++itr != _cutplanes.end()); 3100 3101 _needsRedraw = true; 3102 } 3103 3104 /** 3105 * \brief Turn on/off rendering height map mesh edges for the given DataSet 3106 */ 3107 void Renderer::setCutplaneEdgeVisibility(const DataSetId& id, bool state) 3108 { 3109 CutplaneHashmap::iterator itr; 3110 3111 bool doAll = false; 3112 3113 if (id.compare("all") == 0) { 3114 itr = _cutplanes.begin(); 3115 doAll = true; 3116 } else { 3117 itr = _cutplanes.find(id); 3118 } 3119 if (itr == _cutplanes.end()) { 3120 ERROR("Cutplane not found: %s", id.c_str()); 3121 return; 3122 } 3123 3124 do { 3125 itr->second->setEdgeVisibility(state); 3126 } while (doAll && ++itr != _cutplanes.end()); 3127 3128 _needsRedraw = true; 3129 } 3130 3131 /** 3132 * \brief Set the RGB height map mesh edge color for the specified DataSet 3133 */ 3134 void Renderer::setCutplaneEdgeColor(const DataSetId& id, float color[3]) 3135 { 3136 CutplaneHashmap::iterator itr; 3137 3138 bool doAll = false; 3139 3140 if (id.compare("all") == 0) { 3141 itr = _cutplanes.begin(); 3142 doAll = true; 3143 } else { 3144 itr = _cutplanes.find(id); 3145 } 3146 if (itr == _cutplanes.end()) { 3147 ERROR("Cutplane not found: %s", id.c_str()); 3148 return; 3149 } 3150 3151 do { 3152 itr->second->setEdgeColor(color); 3153 } while (doAll && ++itr != _cutplanes.end()); 3154 3155 _needsRedraw = true; 3156 } 3157 3158 /** 3159 * \brief Set the height map mesh edge width for the specified DataSet (may be a no-op) 3160 * 3161 * If the OpenGL implementation/hardware does not support wide lines, 3162 * this function may not have an effect. 3163 */ 3164 void Renderer::setCutplaneEdgeWidth(const DataSetId& id, float edgeWidth) 3165 { 3166 CutplaneHashmap::iterator itr; 3167 3168 bool doAll = false; 3169 3170 if (id.compare("all") == 0) { 3171 itr = _cutplanes.begin(); 3172 doAll = true; 3173 } else { 3174 itr = _cutplanes.find(id); 3175 } 3176 if (itr == _cutplanes.end()) { 3177 ERROR("Cutplane not found: %s", id.c_str()); 3178 return; 3179 } 3180 3181 do { 3182 itr->second->setEdgeWidth(edgeWidth); 3183 } while (doAll && ++itr != _cutplanes.end()); 3184 3185 _needsRedraw = true; 3186 } 3187 3188 /** 3189 * \brief Turn height map lighting on/off for the specified DataSet 3190 */ 3191 void Renderer::setCutplaneLighting(const DataSetId& id, bool state) 3192 { 3193 CutplaneHashmap::iterator itr; 3194 3195 bool doAll = false; 3196 3197 if (id.compare("all") == 0) { 3198 itr = _cutplanes.begin(); 3199 doAll = true; 3200 } else { 3201 itr = _cutplanes.find(id); 3202 } 3203 if (itr == _cutplanes.end()) { 3204 ERROR("Cutplane not found: %s", id.c_str()); 3205 return; 3206 } 3207 3208 do { 3209 itr->second->setLighting(state); 3210 } while (doAll && ++itr != _cutplanes.end()); 3211 _needsRedraw = true; 3212 } 3213 3214 /** 2674 3215 * \brief Create a new Glyphs and associate it with the named DataSet 2675 3216 */ … … 8080 8621 mergeBounds(bounds, bounds, itr->second->getProp()->GetBounds()); 8081 8622 } 8623 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 8624 itr != _cutplanes.end(); ++itr) { 8625 if ((!onlyVisible || itr->second->getVisibility()) && 8626 itr->second->getProp() != NULL) 8627 mergeBounds(bounds, bounds, itr->second->getProp()->GetBounds()); 8628 } 8082 8629 for (GlyphsHashmap::iterator itr = _glyphs.begin(); 8083 8630 itr != _glyphs.end(); ++itr) { … … 8176 8723 for (Contour3DHashmap::iterator itr = _contour3Ds.begin(); 8177 8724 itr != _contour3Ds.end(); ++itr) { 8725 itr->second->updateRanges(_useCumulativeRange, 8726 _cumulativeScalarRange, 8727 _cumulativeVectorMagnitudeRange, 8728 _cumulativeVectorComponentRange); 8729 } 8730 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 8731 itr != _cutplanes.end(); ++itr) { 8178 8732 itr->second->updateRanges(_useCumulativeRange, 8179 8733 _cumulativeScalarRange, … … 8511 9065 if (id.compare("all") == 0 || getContour3D(id) != NULL) 8512 9066 setContour3DOpacity(id, opacity); 9067 if (id.compare("all") == 0 || getCutplane(id) != NULL) 9068 setCutplaneOpacity(id, opacity); 8513 9069 if (id.compare("all") == 0 || getGlyphs(id) != NULL) 8514 9070 setGlyphsOpacity(id, opacity); … … 8559 9115 if (id.compare("all") == 0 || getContour3D(id) != NULL) 8560 9116 setContour3DVisibility(id, state); 9117 if (id.compare("all") == 0 || getCutplane(id) != NULL) 9118 setCutplaneVisibility(id, state); 8561 9119 if (id.compare("all") == 0 || getGlyphs(id) != NULL) 8562 9120 setGlyphsVisibility(id, state); … … 8767 9325 itr->second->setClippingPlanes(_activeClipPlanes); 8768 9326 } 9327 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 9328 itr != _cutplanes.end(); ++itr) { 9329 itr->second->setClippingPlanes(_activeClipPlanes); 9330 } 8769 9331 for (GlyphsHashmap::iterator itr = _glyphs.begin(); 8770 9332 itr != _glyphs.end(); ++itr) { -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r2506 r2514 29 29 #include "RpContour2D.h" 30 30 #include "RpContour3D.h" 31 #include "RpCutplane.h" 31 32 #include "RpGlyphs.h" 32 33 #include "RpHeightMap.h" … … 101 102 typedef std::tr1::unordered_map<DataSetId, Contour2D *> Contour2DHashmap; 102 103 typedef std::tr1::unordered_map<DataSetId, Contour3D *> Contour3DHashmap; 104 typedef std::tr1::unordered_map<DataSetId, Cutplane *> CutplaneHashmap; 103 105 typedef std::tr1::unordered_map<DataSetId, Glyphs *> GlyphsHashmap; 104 106 typedef std::tr1::unordered_map<DataSetId, HeightMap *> HeightMapHashmap; … … 164 166 void setViewAngle(int height); 165 167 168 vtkCamera *getVtkCamera() 169 { 170 if (_renderer != NULL) 171 return _renderer->GetActiveCamera(); 172 else 173 return NULL; 174 } 175 166 176 void setCameraMode(CameraMode mode); 167 177 … … 332 342 333 343 void setContour3DColorMap(const DataSetId& id, const ColorMapId& colorMapId); 344 345 // Cutplanes 346 347 bool addCutplane(const DataSetId& id); 348 349 void deleteCutplane(const DataSetId& id); 350 351 Cutplane *getCutplane(const DataSetId& id); 352 353 void setCutplaneTransform(const DataSetId& id, vtkMatrix4x4 *trans); 354 355 void setCutplaneOrientation(const DataSetId& id, double quat[4]); 356 357 void setCutplaneOrientation(const DataSetId& id, double angle, double axis[3]); 358 359 void setCutplanePosition(const DataSetId& id, double pos[3]); 360 361 void setCutplaneScale(const DataSetId& id, double scale[3]); 362 363 void setCutplaneEdgeVisibility(const DataSetId& id, bool state); 364 365 void setCutplaneEdgeColor(const DataSetId& id, float color[3]); 366 367 void setCutplaneEdgeWidth(const DataSetId& id, float edgeWidth); 368 369 void setCutplaneLighting(const DataSetId& id, bool state); 370 371 void setCutplaneOpacity(const DataSetId& id, double opacity); 372 373 void setCutplaneVisibility(const DataSetId& id, bool state); 374 375 void setCutplaneWireframe(const DataSetId& id, bool state); 376 377 void setCutplaneVolumeSlice(const DataSetId& id, Cutplane::Axis axis, double ratio); 378 379 void setCutplaneColorMap(const DataSetId& id, const ColorMapId& colorMapId); 380 381 void setCutplaneColorMode(const DataSetId& id, Cutplane::ColorMode mode); 334 382 335 383 // Glyphs … … 754 802 Contour2DHashmap _contour2Ds; 755 803 Contour3DHashmap _contour3Ds; 804 CutplaneHashmap _cutplanes; 756 805 GlyphsHashmap _glyphs; 757 806 HeightMapHashmap _heightMaps; -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r2509 r2514 1261 1261 1262 1262 proc = Rappture::GetOpFromObj(interp, nContour3dOps, contour3dOps, 1263 Rappture::CMDSPEC_ARG1, objc, objv, 0); 1264 if (proc == NULL) { 1265 return TCL_ERROR; 1266 } 1267 return (*proc) (clientData, interp, objc, objv); 1268 } 1269 1270 static int 1271 CutplaneAddOp(ClientData clientData, Tcl_Interp *interp, int objc, 1272 Tcl_Obj *const *objv) 1273 { 1274 if (objc == 3) { 1275 const char *name = Tcl_GetString(objv[2]); 1276 if (!g_renderer->addCutplane(name)) { 1277 Tcl_AppendResult(interp, "Failed to create cutplane", (char*)NULL); 1278 return TCL_ERROR; 1279 } 1280 } else { 1281 if (!g_renderer->addCutplane("all")) { 1282 Tcl_AppendResult(interp, "Failed to create cutplane for one or more data sets", (char*)NULL); 1283 return TCL_ERROR; 1284 } 1285 } 1286 return TCL_OK; 1287 } 1288 1289 static int 1290 CutplaneColorMapOp(ClientData clientData, Tcl_Interp *interp, int objc, 1291 Tcl_Obj *const *objv) 1292 { 1293 const char *colorMapName = Tcl_GetString(objv[2]); 1294 if (objc == 4) { 1295 const char *dataSetName = Tcl_GetString(objv[3]); 1296 g_renderer->setCutplaneColorMap(dataSetName, colorMapName); 1297 } else { 1298 g_renderer->setCutplaneColorMap("all", colorMapName); 1299 } 1300 return TCL_OK; 1301 } 1302 1303 static int 1304 CutplaneColorModeOp(ClientData clientData, Tcl_Interp *interp, int objc, 1305 Tcl_Obj *const *objv) 1306 { 1307 Cutplane::ColorMode mode; 1308 const char *str = Tcl_GetString(objv[2]); 1309 if (str[0] == 's' && strcmp(str, "scalar") == 0) { 1310 mode = Cutplane::COLOR_BY_SCALAR; 1311 } else if (str[0] == 'v' && strcmp(str, "vmag") == 0) { 1312 mode = Cutplane::COLOR_BY_VECTOR_MAGNITUDE; 1313 } else if (str[0] == 'v' && strcmp(str, "vx") == 0) { 1314 mode = Cutplane::COLOR_BY_VECTOR_X; 1315 } else if (str[0] == 'v' && strcmp(str, "vy") == 0) { 1316 mode = Cutplane::COLOR_BY_VECTOR_Y; 1317 } else if (str[0] == 'v' && strcmp(str, "vz") == 0) { 1318 mode = Cutplane::COLOR_BY_VECTOR_Z; 1319 } else { 1320 Tcl_AppendResult(interp, "bad color mode option \"", str, 1321 "\": should be one of: 'scalar', 'vmag', 'vx', 'vy', 'vz'", (char*)NULL); 1322 return TCL_ERROR; 1323 } 1324 if (objc == 4) { 1325 const char *name = Tcl_GetString(objv[3]); 1326 g_renderer->setCutplaneColorMode(name, mode); 1327 } else { 1328 g_renderer->setCutplaneColorMode("all", mode); 1329 } 1330 return TCL_OK; 1331 } 1332 1333 static int 1334 CutplaneDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc, 1335 Tcl_Obj *const *objv) 1336 { 1337 if (objc == 3) { 1338 const char *name = Tcl_GetString(objv[2]); 1339 g_renderer->deleteCutplane(name); 1340 } else { 1341 g_renderer->deleteCutplane("all"); 1342 } 1343 return TCL_OK; 1344 } 1345 1346 static int 1347 CutplaneEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc, 1348 Tcl_Obj *const *objv) 1349 { 1350 bool state; 1351 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1352 return TCL_ERROR; 1353 } 1354 if (objc == 4) { 1355 const char *name = Tcl_GetString(objv[3]); 1356 g_renderer->setCutplaneEdgeVisibility(name, state); 1357 } else { 1358 g_renderer->setCutplaneEdgeVisibility("all", state); 1359 } 1360 return TCL_OK; 1361 } 1362 1363 static int 1364 CutplaneLightingOp(ClientData clientData, Tcl_Interp *interp, int objc, 1365 Tcl_Obj *const *objv) 1366 { 1367 bool state; 1368 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1369 return TCL_ERROR; 1370 } 1371 if (objc == 4) { 1372 const char *name = Tcl_GetString(objv[3]); 1373 g_renderer->setCutplaneLighting(name, state); 1374 } else { 1375 g_renderer->setCutplaneLighting("all", state); 1376 } 1377 return TCL_OK; 1378 } 1379 1380 static int 1381 CutplaneLineColorOp(ClientData clientData, Tcl_Interp *interp, int objc, 1382 Tcl_Obj *const *objv) 1383 { 1384 float color[3]; 1385 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK || 1386 GetFloatFromObj(interp, objv[3], &color[1]) != TCL_OK || 1387 GetFloatFromObj(interp, objv[4], &color[2]) != TCL_OK) { 1388 return TCL_ERROR; 1389 } 1390 if (objc == 6) { 1391 const char *name = Tcl_GetString(objv[5]); 1392 g_renderer->setCutplaneEdgeColor(name, color); 1393 } else { 1394 g_renderer->setCutplaneEdgeColor("all", color); 1395 } 1396 return TCL_OK; 1397 } 1398 1399 static int 1400 CutplaneLineWidthOp(ClientData clientData, Tcl_Interp *interp, int objc, 1401 Tcl_Obj *const *objv) 1402 { 1403 float width; 1404 if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) { 1405 return TCL_ERROR; 1406 } 1407 if (objc == 4) { 1408 const char *name = Tcl_GetString(objv[3]); 1409 g_renderer->setCutplaneEdgeWidth(name, width); 1410 } else { 1411 g_renderer->setCutplaneEdgeWidth("all", width); 1412 } 1413 return TCL_OK; 1414 } 1415 1416 static int 1417 CutplaneOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc, 1418 Tcl_Obj *const *objv) 1419 { 1420 double opacity; 1421 if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) { 1422 return TCL_ERROR; 1423 } 1424 if (objc == 4) { 1425 const char *name = Tcl_GetString(objv[3]); 1426 g_renderer->setCutplaneOpacity(name, opacity); 1427 } else { 1428 g_renderer->setCutplaneOpacity("all", opacity); 1429 } 1430 return TCL_OK; 1431 } 1432 1433 static int 1434 CutplaneOrientOp(ClientData clientData, Tcl_Interp *interp, int objc, 1435 Tcl_Obj *const *objv) 1436 { 1437 double quat[4]; 1438 if (Tcl_GetDoubleFromObj(interp, objv[2], &quat[0]) != TCL_OK || 1439 Tcl_GetDoubleFromObj(interp, objv[3], &quat[1]) != TCL_OK || 1440 Tcl_GetDoubleFromObj(interp, objv[4], &quat[2]) != TCL_OK || 1441 Tcl_GetDoubleFromObj(interp, objv[5], &quat[3]) != TCL_OK) { 1442 return TCL_ERROR; 1443 } 1444 if (objc == 7) { 1445 const char *name = Tcl_GetString(objv[6]); 1446 g_renderer->setCutplaneOrientation(name, quat); 1447 } else { 1448 g_renderer->setCutplaneOrientation("all", quat); 1449 } 1450 return TCL_OK; 1451 } 1452 1453 static int 1454 CutplanePositionOp(ClientData clientData, Tcl_Interp *interp, int objc, 1455 Tcl_Obj *const *objv) 1456 { 1457 double pos[3]; 1458 if (Tcl_GetDoubleFromObj(interp, objv[2], &pos[0]) != TCL_OK || 1459 Tcl_GetDoubleFromObj(interp, objv[3], &pos[1]) != TCL_OK || 1460 Tcl_GetDoubleFromObj(interp, objv[4], &pos[2]) != TCL_OK) { 1461 return TCL_ERROR; 1462 } 1463 if (objc == 6) { 1464 const char *name = Tcl_GetString(objv[5]); 1465 g_renderer->setCutplanePosition(name, pos); 1466 } else { 1467 g_renderer->setCutplanePosition("all", pos); 1468 } 1469 return TCL_OK; 1470 } 1471 1472 static int 1473 CutplaneScaleOp(ClientData clientData, Tcl_Interp *interp, int objc, 1474 Tcl_Obj *const *objv) 1475 { 1476 double scale[3]; 1477 if (Tcl_GetDoubleFromObj(interp, objv[2], &scale[0]) != TCL_OK || 1478 Tcl_GetDoubleFromObj(interp, objv[3], &scale[1]) != TCL_OK || 1479 Tcl_GetDoubleFromObj(interp, objv[4], &scale[2]) != TCL_OK) { 1480 return TCL_ERROR; 1481 } 1482 if (objc == 6) { 1483 const char *name = Tcl_GetString(objv[5]); 1484 g_renderer->setCutplaneScale(name, scale); 1485 } else { 1486 g_renderer->setCutplaneScale("all", scale); 1487 } 1488 return TCL_OK; 1489 } 1490 1491 static int 1492 CutplaneVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc, 1493 Tcl_Obj *const *objv) 1494 { 1495 bool state; 1496 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1497 return TCL_ERROR; 1498 } 1499 if (objc == 4) { 1500 const char *name = Tcl_GetString(objv[3]); 1501 g_renderer->setCutplaneVisibility(name, state); 1502 } else { 1503 g_renderer->setCutplaneVisibility("all", state); 1504 } 1505 return TCL_OK; 1506 } 1507 1508 static int 1509 CutplaneVolumeSliceOp(ClientData clientData, Tcl_Interp *interp, int objc, 1510 Tcl_Obj *const *objv) 1511 { 1512 double ratio; 1513 if (Tcl_GetDoubleFromObj(interp, objv[3], &ratio) != TCL_OK) { 1514 return TCL_ERROR; 1515 } 1516 const char *string = Tcl_GetString(objv[2]); 1517 char c = string[0]; 1518 Cutplane::Axis axis; 1519 if ((c == 'x') && (strcmp(string, "x") == 0)) { 1520 axis = Cutplane::X_AXIS; 1521 } else if ((c == 'y') && (strcmp(string, "y") == 0)) { 1522 axis = Cutplane::Y_AXIS; 1523 } else if ((c == 'z') && (strcmp(string, "z") == 0)) { 1524 axis = Cutplane::Z_AXIS; 1525 } else { 1526 Tcl_AppendResult(interp, "bad axis option \"", string, 1527 "\": should be axisName ratio", (char*)NULL); 1528 return TCL_ERROR; 1529 } 1530 if (objc == 5) { 1531 const char *name = Tcl_GetString(objv[4]); 1532 g_renderer->setCutplaneVolumeSlice(name, axis, ratio); 1533 } else { 1534 g_renderer->setCutplaneVolumeSlice("all", axis, ratio); 1535 } 1536 return TCL_OK; 1537 } 1538 1539 static int 1540 CutplaneWireframeOp(ClientData clientData, Tcl_Interp *interp, int objc, 1541 Tcl_Obj *const *objv) 1542 { 1543 bool state; 1544 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1545 return TCL_ERROR; 1546 } 1547 if (objc == 4) { 1548 const char *name = Tcl_GetString(objv[3]); 1549 g_renderer->setCutplaneWireframe(name, state); 1550 } else { 1551 g_renderer->setCutplaneWireframe("all", state); 1552 } 1553 return TCL_OK; 1554 } 1555 1556 static Rappture::CmdSpec cutplaneOps[] = { 1557 {"add", 1, CutplaneAddOp, 2, 3, "oper value ?dataSetName?"}, 1558 {"colormap", 7, CutplaneColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 1559 {"colormode", 7, CutplaneColorModeOp, 3, 4, "mode ?dataSetNme?"}, 1560 {"delete", 1, CutplaneDeleteOp, 2, 3, "?dataSetName?"}, 1561 {"edges", 1, CutplaneEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 1562 {"lighting", 3, CutplaneLightingOp, 3, 4, "bool ?dataSetName?"}, 1563 {"linecolor", 5, CutplaneLineColorOp, 5, 6, "r g b ?dataSetName?"}, 1564 {"linewidth", 5, CutplaneLineWidthOp, 3, 4, "width ?dataSetName?"}, 1565 {"opacity", 2, CutplaneOpacityOp, 3, 4, "value ?dataSetName?"}, 1566 {"orient", 2, CutplaneOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"}, 1567 {"pos", 1, CutplanePositionOp, 5, 6, "x y z ?dataSetName?"}, 1568 {"scale", 2, CutplaneScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 1569 {"slice", 2, CutplaneVolumeSliceOp, 4, 5, "axis ratio ?dataSetName?"}, 1570 {"visible", 1, CutplaneVisibleOp, 3, 4, "bool ?dataSetName?"}, 1571 {"wireframe", 1, CutplaneWireframeOp, 3, 4, "bool ?dataSetName?"} 1572 }; 1573 static int nCutplaneOps = NumCmdSpecs(cutplaneOps); 1574 1575 static int 1576 CutplaneCmd(ClientData clientData, Tcl_Interp *interp, int objc, 1577 Tcl_Obj *const *objv) 1578 { 1579 Tcl_ObjCmdProc *proc; 1580 1581 proc = Rappture::GetOpFromObj(interp, nCutplaneOps, cutplaneOps, 1263 1582 Rappture::CMDSPEC_ARG1, objc, objv, 0); 1264 1583 if (proc == NULL) { … … 2564 2883 static Rappture::CmdSpec heightmapOps[] = { 2565 2884 {"add", 1, HeightMapAddOp, 5, 6, "oper value ?dataSetName?"}, 2566 {"colormap", 2, HeightMapColorMapOp, 3, 4, "colorMapName ?dataSetName?"},2567 {"contourlist", 2, HeightMapContourListOp, 3, 4, "contourList ?dataSetName?"},2885 {"colormap", 3, HeightMapColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 2886 {"contourlist", 3, HeightMapContourListOp, 3, 4, "contourList ?dataSetName?"}, 2568 2887 {"delete", 1, HeightMapDeleteOp, 2, 3, "?dataSetName?"}, 2569 2888 {"edges", 1, HeightMapEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, … … 2579 2898 {"orient", 2, HeightMapOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"}, 2580 2899 {"pos", 1, HeightMapPositionOp, 5, 6, "x y z ?dataSetName?"}, 2581 {"scale", 1, HeightMapScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 2900 {"scale", 2, HeightMapScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 2901 {"slice", 2, HeightMapVolumeSliceOp, 4, 5, "axis ratio ?dataSetName?"}, 2582 2902 {"surface", 2, HeightMapContourSurfaceVisibleOp, 3, 4, "bool ?dataSetName?"}, 2583 {"visible", 2, HeightMapVisibleOp, 3, 4, "bool ?dataSetName?"}, 2584 {"volumeslice", 2, HeightMapVolumeSliceOp, 4, 5, "axis ratio ?dataSetName?"}, 2903 {"visible", 1, HeightMapVisibleOp, 3, 4, "bool ?dataSetName?"}, 2585 2904 {"wireframe", 1, HeightMapWireframeOp, 3, 4, "bool ?dataSetName?"} 2586 2905 }; … … 2929 3248 {"orient", 2, LICOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"}, 2930 3249 {"pos", 1, LICPositionOp, 5, 6, "x y z ?dataSetName?"}, 2931 {"scale", 1, LICScaleOp, 5, 6, "sx sy sz ?dataSetName?"},2932 {" visible", 2, LICVisibleOp, 3, 4, "bool?dataSetName?"},2933 {"v olumeslice", 2, LICVolumeSliceOp, 4, 5, "axis ratio?dataSetName?"}3250 {"scale", 2, LICScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 3251 {"slice", 2, LICVolumeSliceOp, 4, 5, "axis ratio ?dataSetName?"}, 3252 {"visible", 1, LICVisibleOp, 3, 4, "bool ?dataSetName?"} 2934 3253 }; 2935 3254 static int nLICOps = NumCmdSpecs(licOps); … … 5046 5365 Tcl_CreateObjCommand(interp, "contour2d", Contour2DCmd, NULL, NULL); 5047 5366 Tcl_CreateObjCommand(interp, "contour3d", Contour3DCmd, NULL, NULL); 5367 Tcl_CreateObjCommand(interp, "cutplane", CutplaneCmd, NULL, NULL); 5048 5368 Tcl_CreateObjCommand(interp, "dataset", DataSetCmd, NULL, NULL); 5049 5369 Tcl_CreateObjCommand(interp, "glyphs", GlyphsCmd, NULL, NULL); … … 5073 5393 Tcl_DeleteCommand(interp, "contour2d"); 5074 5394 Tcl_DeleteCommand(interp, "contour3d"); 5395 Tcl_DeleteCommand(interp, "cutplane"); 5075 5396 Tcl_DeleteCommand(interp, "dataset"); 5076 5397 Tcl_DeleteCommand(interp, "glyphs"); -
trunk/packages/vizservers/vtkvis/protocol.txt
r2506 r2514 143 143 contour3d visible <bool> <?datasetName?> 144 144 contour3d wireframe <bool> <?datasetName?> 145 146 cutplane add <?dataSetName?> 147 cutplane colormap <colorMapName> <?dataSetName?> 148 cutplane colormode <scalar|vmag|vx|vy|vz> <?datasetName?> 149 Set the field used to color the object. 'scalar' uses 150 the active scalar field. 'vmag' uses the magnitude of the current 151 vector field, and 'vx','vy','vz' use the corresponding component of 152 the active vector field. 153 cutplane delete <?dataSetName?> 154 cutplane edges <bool> <?dataSetName?> 155 cutplane lighting <bool> <?dataSetName?> 156 cutplane linecolor <r> <g> <b> <?dataSetName?> 157 cutplane linewidth <width> <?dataSetName?> 158 cutplane opacity <value> <?dataSetName?> 159 cutplane orient <qw> <qx> <qy> <qz> <?dataSetName?> 160 cutplane pos <x> <y> <z> <?dataSetName?> 161 cutplane scale <sx> <sy> <sz> <?dataSetName?> 162 cutplane slice axis ratio <?dataSetName?> 163 For 3D data, select a slice along a principle axis of the volume. The 164 ratio is [0,1] 165 cutplane visible <bool> <?dataSetName?> 166 cutplane wireframe <bool> <?datasetName?> 145 167 146 168 glyphs add <shape> <?dataSetName?> … … 194 216 heightmap pos <x> <y> <z> <?dataSetName?> 195 217 heightmap scale <sx> <sy> <sz> <?dataSetName?> 218 heightmap slice axis ratio <?dataSetName?> 219 For 3D data, select a slice along a principle axis of the volume. The 220 ratio is [0,1] 196 221 heightmap surface <bool> <?dataSetName?> 197 222 Toggle rendering of colormapped surface (mountain plot or cutplane) 198 223 heightmap visible <bool> <?dataSetName?> 199 heightmap volumeslice axis ratio <?dataSetName?>200 For 3D data, select a slice along a principle axis of the volume. The201 ratio is [0,1]202 224 heightmap wireframe <bool> <?datasetName?> 203 225 … … 213 235 lic pos <x> <y> <z> <?dataSetName?> 214 236 lic scale <sx> <sy> <sz> <?dataSetName?> 237 lic slice <axis> <ratio> <?datasetName?> 238 For 3D data, select a slice along a principle axis of the volume. The 239 ratio is [0,1] 215 240 lic visible <bool> <?datasetName?> 216 lic volumeslice <axis> <ratio> <?datasetName?>217 241 218 242 molecule add <?datasetName?> -
trunk/packages/vizservers/vtkvis/vtkRpCubeAxesActor2D.cpp
r2492 r2514 439 439 // can be changed). Therefore, we can not just assign pointers otherwise 440 440 // each individual axis text prop would point to the same text prop. 441 #if def notdef441 #if 1 442 442 if (this->AxisLabelTextProperty && 443 443 this->AxisLabelTextProperty->GetMTime() > this->BuildTime) … … 1078 1078 } 1079 1079 1080 //----------------------------------------------------------------------------1081 1082 // Disable warnings about qualifiers on return types.1083 #if defined(_COMPILER_VERSION)1084 # pragma set woff 33031085 #endif1086 #if defined(__INTEL_COMPILER)1087 # pragma warning (disable:858)1088 #endif1089 1090 #ifndef VTK_LEGACY_REMOVE1091 # ifdef VTK_WORKAROUND_WINDOWS_MANGLE1092 # undef SetProp1093 # undef GetProp1094 void vtkRpCubeAxesActor2D::SetPropA(vtkProp* prop)1095 {1096 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::SetProp, "VTK 5.0",1097 vtkRpCubeAxesActor2D::SetViewProp);1098 this->SetViewProp(prop);1099 }1100 void vtkRpCubeAxesActor2D::SetPropW(vtkProp* prop)1101 {1102 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::SetProp, "VTK 5.0",1103 vtkRpCubeAxesActor2D::SetViewProp);1104 this->SetViewProp(prop);1105 }1106 vtkProp* vtkRpCubeAxesActor2D::GetPropA()1107 {1108 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::GetProp, "VTK 5.0",1109 vtkRpCubeAxesActor2D::GetViewProp);1110 return this->GetViewProp();1111 }1112 vtkProp* vtkRpCubeAxesActor2D::GetPropW()1113 {1114 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::GetProp, "VTK 5.0",1115 vtkRpCubeAxesActor2D::GetViewProp);1116 return this->GetViewProp();1117 }1118 # endif1119 void vtkRpCubeAxesActor2D::SetProp(vtkProp* prop)1120 {1121 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::SetProp, "VTK 5.0",1122 vtkRpCubeAxesActor2D::SetViewProp);1123 this->SetViewProp(prop);1124 }1125 vtkProp* vtkRpCubeAxesActor2D::GetProp()1126 {1127 VTK_LEGACY_REPLACED_BODY(vtkRpCubeAxesActor2D::GetProp, "VTK 5.0",1128 vtkRpCubeAxesActor2D::GetViewProp);1129 return this->GetViewProp();1130 }1131 #endif -
trunk/packages/vizservers/vtkvis/vtkRpCubeAxesActor2D.h
r2320 r2514 253 253 void ShallowCopy(vtkRpCubeAxesActor2D *actor); 254 254 255 // Disable warnings about qualifiers on return types.256 #if defined(_COMPILER_VERSION)257 # pragma set woff 3303258 #endif259 #if defined(__INTEL_COMPILER)260 # pragma warning (push)261 # pragma warning (disable:858)262 #endif263 264 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE265 # define SetPropA SetProp266 # define SetPropW SetProp267 # define GetPropA GetProp268 # define GetPropW GetProp269 #endif270 271 // Description:272 // @deprecated Replaced by vtkRpCubeAxesActor2D::SetViewProp() as of VTK 5.0.273 VTK_LEGACY(virtual void SetProp(vtkProp* prop));274 275 // Description:276 // @deprecated Replaced by vtkRpCubeAxesActor2D::GetViewProp() as of VTK 5.0.277 VTK_LEGACY(virtual vtkProp* GetProp());278 279 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE280 # undef SetPropW281 # undef SetPropA282 # undef GetPropW283 # undef GetPropA284 //BTX285 VTK_LEGACY(virtual void SetPropA(vtkProp* prop));286 VTK_LEGACY(virtual void SetPropW(vtkProp* prop));287 VTK_LEGACY(virtual vtkProp* GetPropA());288 VTK_LEGACY(virtual vtkProp* GetPropW());289 //ETX290 #endif291 292 // Reset disabled warning about qualifiers on return types.293 #if defined(__INTEL_COMPILER)294 # pragma warning (pop)295 #endif296 #if defined(_COMPILER_VERSION)297 # pragma reset woff 3303298 #endif299 300 255 protected: 301 256 vtkRpCubeAxesActor2D();
Note: See TracChangeset
for help on using the changeset viewer.