Changeset 2137 for trunk/packages/vizservers/vtkvis
- Timestamp:
- Mar 15, 2011 10:58:51 AM (13 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpContour2D.cpp
r2123 r2137 45 45 update(); 46 46 } 47 } 48 49 /** 50 * \brief Returns the DataSet this Contour2D renders 51 */ 52 DataSet *Contour2D::getDataSet() 53 { 54 return _dataSet; 47 55 } 48 56 -
trunk/packages/vizservers/vtkvis/RpContour2D.h
r2114 r2137 30 30 31 31 void setDataSet(DataSet *dataset); 32 33 DataSet *getDataSet(); 32 34 33 35 vtkActor *getActor(); -
trunk/packages/vizservers/vtkvis/RpPolyData.cpp
r2123 r2137 85 85 86 86 /** 87 * \brief Returns the DataSet this PolyData renders 88 */ 89 DataSet *PolyData::getDataSet() 90 { 91 return _dataSet; 92 } 93 94 /** 87 95 * \brief Internal method to re-compute contours after a state change 88 96 */ -
trunk/packages/vizservers/vtkvis/RpPolyData.h
r2114 r2137 29 29 30 30 void setDataSet(DataSet *dataset); 31 32 DataSet *getDataSet(); 31 33 32 34 vtkActor *getActor(); -
trunk/packages/vizservers/vtkvis/RpPseudoColor.cpp
r2123 r2137 46 46 _dataSet = dataSet; 47 47 update(); 48 } 49 50 /** 51 * \brief Returns the DataSet this PseudoColor renders 52 */ 53 DataSet *PseudoColor::getDataSet() 54 { 55 return _dataSet; 48 56 } 49 57 -
trunk/packages/vizservers/vtkvis/RpPseudoColor.h
r2114 r2137 31 31 32 32 void setDataSet(DataSet *dataset); 33 34 DataSet *getDataSet(); 33 35 34 36 vtkActor *getActor(); -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r2124 r2137 697 697 void Renderer::addPseudoColor(const DataSetId& id) 698 698 { 699 DataSet *ds = getDataSet(id); 700 if (ds == NULL) 701 return; 702 703 if (getPseudoColor(id)) { 704 WARN("Replacing existing pseudocolor %s", id.c_str()); 705 deletePseudoColor(id); 706 } 707 PseudoColor *pc = new PseudoColor(); 708 _pseudoColors[id] = pc; 709 710 pc->setDataSet(ds); 711 712 _renderer->AddActor(pc->getActor()); 699 DataSetHashmap::iterator itr; 700 701 bool doAll = false; 702 703 if (id.compare("all") == 0) { 704 itr = _dataSets.begin(); 705 } else { 706 itr = _dataSets.find(id); 707 } 708 if (itr == _dataSets.end()) { 709 ERROR("Unknown dataset %s", id.c_str()); 710 return; 711 } 712 713 do { 714 DataSet *ds = itr->second; 715 const DataSetId& dsID = ds->getName(); 716 717 if (getPseudoColor(dsID)) { 718 WARN("Replacing existing pseudocolor %s", dsID.c_str()); 719 deletePseudoColor(dsID); 720 } 721 PseudoColor *pc = new PseudoColor(); 722 _pseudoColors[dsID] = pc; 723 724 pc->setDataSet(ds); 725 726 _renderer->AddActor(pc->getActor()); 727 } while (doAll && ++itr != _dataSets.end()); 713 728 714 729 initCamera(); … … 735 750 void Renderer::setPseudoColorColorMap(const DataSetId& id, const ColorMapId& colorMapId) 736 751 { 737 PseudoColor *pc = getPseudoColor(id); 738 if (pc) { 739 ColorMap *cmap = getColorMap(colorMapId); 740 if (cmap) { 741 TRACE("Set color map: %s for dataset %s", colorMapId.c_str(), 742 id.c_str()); 743 pc->setLookupTable(cmap->getLookupTable()); 744 _needsRedraw = true; 745 } else { 746 ERROR("Unknown colormap: %s", colorMapId.c_str()); 747 } 748 } else { 749 ERROR("No pseudocolor for dataset %s", id.c_str()); 750 } 752 PseudoColorHashmap::iterator itr; 753 754 bool doAll = false; 755 756 if (id.compare("all") == 0) { 757 itr = _pseudoColors.begin(); 758 doAll = true; 759 } else { 760 itr = _pseudoColors.find(id); 761 } 762 763 if (itr == _pseudoColors.end()) { 764 ERROR("PseudoColor not found: %s", id.c_str()); 765 return; 766 } 767 768 ColorMap *cmap = getColorMap(colorMapId); 769 if (cmap == NULL) { 770 ERROR("Unknown colormap: %s", colorMapId.c_str()); 771 return; 772 } 773 774 do { 775 TRACE("Set color map: %s for dataset %s", colorMapId.c_str(), 776 itr->second->getDataSet()->getName().c_str()); 777 778 itr->second->setLookupTable(cmap->getLookupTable()); 779 } while (doAll && ++itr != _pseudoColors.end()); 780 781 _needsRedraw = true; 751 782 } 752 783 … … 766 797 767 798 /** 799 * \brief Set opacity of the PseudoColor for the given DataSet 800 */ 801 void Renderer::setPseudoColorOpacity(const DataSetId& id, double opacity) 802 { 803 PseudoColorHashmap::iterator itr; 804 805 bool doAll = false; 806 807 if (id.compare("all") == 0) { 808 itr = _pseudoColors.begin(); 809 doAll = true; 810 } else { 811 itr = _pseudoColors.find(id); 812 } 813 814 if (itr == _pseudoColors.end()) { 815 ERROR("PseudoColor not found: %s", id.c_str()); 816 return; 817 } 818 819 do { 820 itr->second->setOpacity(opacity); 821 } while (doAll && ++itr != _pseudoColors.end()); 822 823 _needsRedraw = true; 824 } 825 826 /** 768 827 * \brief Turn on/off rendering of the PseudoColor mapper for the given DataSet 769 828 */ 770 829 void Renderer::setPseudoColorVisibility(const DataSetId& id, bool state) 771 830 { 772 PseudoColor *pc = getPseudoColor(id); 773 if (pc) { 774 pc->setVisibility(state); 775 _needsRedraw = true; 776 } 831 PseudoColorHashmap::iterator itr; 832 833 bool doAll = false; 834 835 if (id.compare("all") == 0) { 836 itr = _pseudoColors.begin(); 837 doAll = true; 838 } else { 839 itr = _pseudoColors.find(id); 840 } 841 842 if (itr == _pseudoColors.end()) { 843 ERROR("PseudoColor not found: %s", id.c_str()); 844 return; 845 } 846 847 do { 848 itr->second->setVisibility(state); 849 } while (doAll && ++itr != _pseudoColors.end()); 850 851 _needsRedraw = true; 777 852 } 778 853 … … 782 857 void Renderer::setPseudoColorEdgeVisibility(const DataSetId& id, bool state) 783 858 { 784 PseudoColor *pc = getPseudoColor(id); 785 if (pc) { 786 pc->setEdgeVisibility(state); 787 _needsRedraw = true; 788 } 859 PseudoColorHashmap::iterator itr; 860 861 bool doAll = false; 862 863 if (id.compare("all") == 0) { 864 itr = _pseudoColors.begin(); 865 doAll = true; 866 } else { 867 itr = _pseudoColors.find(id); 868 } 869 870 if (itr == _pseudoColors.end()) { 871 ERROR("PseudoColor not found: %s", id.c_str()); 872 return; 873 } 874 875 do { 876 itr->second->setEdgeVisibility(state); 877 } while (doAll && ++itr != _pseudoColors.end()); 878 879 _needsRedraw = true; 789 880 } 790 881 … … 794 885 void Renderer::setPseudoColorEdgeColor(const DataSetId& id, float color[3]) 795 886 { 796 PseudoColor *pc = getPseudoColor(id); 797 if (pc) { 798 pc->setEdgeColor(color); 799 _needsRedraw = true; 800 } 887 PseudoColorHashmap::iterator itr; 888 889 bool doAll = false; 890 891 if (id.compare("all") == 0) { 892 itr = _pseudoColors.begin(); 893 doAll = true; 894 } else { 895 itr = _pseudoColors.find(id); 896 } 897 898 if (itr == _pseudoColors.end()) { 899 ERROR("PseudoColor not found: %s", id.c_str()); 900 return; 901 } 902 903 do { 904 itr->second->setEdgeColor(color); 905 } while (doAll && ++itr != _pseudoColors.end()); 906 907 _needsRedraw = true; 801 908 } 802 909 … … 809 916 void Renderer::setPseudoColorEdgeWidth(const DataSetId& id, float edgeWidth) 810 917 { 811 PseudoColor *pc = getPseudoColor(id); 812 if (pc) { 813 pc->setEdgeWidth(edgeWidth); 814 _needsRedraw = true; 815 } 918 PseudoColorHashmap::iterator itr; 919 920 bool doAll = false; 921 922 if (id.compare("all") == 0) { 923 itr = _pseudoColors.begin(); 924 doAll = true; 925 } else { 926 itr = _pseudoColors.find(id); 927 } 928 929 if (itr == _pseudoColors.end()) { 930 ERROR("PseudoColor not found: %s", id.c_str()); 931 return; 932 } 933 934 do { 935 itr->second->setEdgeWidth(edgeWidth); 936 } while (doAll && ++itr != _pseudoColors.end()); 937 938 _needsRedraw = true; 816 939 } 817 940 … … 821 944 void Renderer::setPseudoColorLighting(const DataSetId& id, bool state) 822 945 { 823 PseudoColor *pc = getPseudoColor(id); 824 if (pc) { 825 pc->setLighting(state); 826 _needsRedraw = true; 827 } 946 PseudoColorHashmap::iterator itr; 947 948 bool doAll = false; 949 950 if (id.compare("all") == 0) { 951 itr = _pseudoColors.begin(); 952 doAll = true; 953 } else { 954 itr = _pseudoColors.find(id); 955 } 956 957 if (itr == _pseudoColors.end()) { 958 ERROR("PseudoColor not found: %s", id.c_str()); 959 return; 960 } 961 962 do { 963 itr->second->setLighting(state); 964 } while (doAll && ++itr != _pseudoColors.end()); 965 966 _needsRedraw = true; 828 967 } 829 968 … … 833 972 void Renderer::addContour2D(const DataSetId& id) 834 973 { 835 DataSet *ds = getDataSet(id); 836 if (ds == NULL) 837 return; 838 839 if (getContour2D(id)) { 840 WARN("Replacing existing contour2d %s", id.c_str()); 841 deleteContour2D(id); 842 } 843 844 Contour2D *contour = new Contour2D(); 845 _contours[id] = contour; 846 847 contour->setDataSet(ds); 848 849 _renderer->AddActor(contour->getActor()); 974 DataSetHashmap::iterator itr; 975 976 bool doAll = false; 977 978 if (id.compare("all") == 0) { 979 itr = _dataSets.begin(); 980 } else { 981 itr = _dataSets.find(id); 982 } 983 if (itr == _dataSets.end()) { 984 ERROR("Unknown dataset %s", id.c_str()); 985 return; 986 } 987 988 do { 989 DataSet *ds = itr->second; 990 const DataSetId& dsID = ds->getName(); 991 992 if (getContour2D(dsID)) { 993 WARN("Replacing existing contour2d %s", dsID.c_str()); 994 deleteContour2D(dsID); 995 } 996 997 Contour2D *contour = new Contour2D(); 998 _contours[dsID] = contour; 999 1000 contour->setDataSet(ds); 1001 1002 _renderer->AddActor(contour->getActor()); 1003 } while (doAll && ++itr != _dataSets.end()); 850 1004 851 1005 initCamera(); … … 872 1026 void Renderer::setContours(const DataSetId& id, int numContours) 873 1027 { 874 Contour2D *contour = getContour2D(id); 875 if (contour) { 876 contour->setContours(numContours); 877 _needsRedraw = true; 878 } 1028 Contour2DHashmap::iterator itr; 1029 1030 bool doAll = false; 1031 1032 if (id.compare("all") == 0) { 1033 itr = _contours.begin(); 1034 doAll = true; 1035 } else { 1036 itr = _contours.find(id); 1037 } 1038 if (itr == _contours.end()) { 1039 ERROR("Contour2D not found: %s", id.c_str()); 1040 return; 1041 } 1042 1043 do { 1044 itr->second->setContours(numContours); 1045 } while (doAll && ++itr != _contours.end()); 1046 1047 _needsRedraw = true; 879 1048 } 880 1049 … … 884 1053 void Renderer::setContourList(const DataSetId& id, const std::vector<double>& contours) 885 1054 { 886 Contour2D *contour = getContour2D(id); 887 if (contour) { 888 contour->setContourList(contours); 889 _needsRedraw = true; 890 } 1055 Contour2DHashmap::iterator itr; 1056 1057 bool doAll = false; 1058 1059 if (id.compare("all") == 0) { 1060 itr = _contours.begin(); 1061 doAll = true; 1062 } else { 1063 itr = _contours.find(id); 1064 } 1065 if (itr == _contours.end()) { 1066 ERROR("Contour2D not found: %s", id.c_str()); 1067 return; 1068 } 1069 1070 do { 1071 itr->second->setContourList(contours); 1072 } while (doAll && ++itr != _contours.end()); 1073 1074 _needsRedraw = true; 1075 } 1076 1077 /** 1078 * \brief Set opacity of contour lines for the given DataSet 1079 */ 1080 void Renderer::setContourOpacity(const DataSetId& id, double opacity) 1081 { 1082 Contour2DHashmap::iterator itr; 1083 1084 bool doAll = false; 1085 1086 if (id.compare("all") == 0) { 1087 itr = _contours.begin(); 1088 doAll = true; 1089 } else { 1090 itr = _contours.find(id); 1091 } 1092 if (itr == _contours.end()) { 1093 ERROR("Contour2D not found: %s", id.c_str()); 1094 return; 1095 } 1096 1097 do { 1098 itr->second->setOpacity(opacity); 1099 } while (doAll && ++itr != _contours.end()); 1100 1101 _needsRedraw = true; 891 1102 } 892 1103 … … 896 1107 void Renderer::setContourVisibility(const DataSetId& id, bool state) 897 1108 { 898 Contour2D *contour = getContour2D(id); 899 if (contour) { 900 contour->setVisibility(state); 901 _needsRedraw = true; 902 } 1109 Contour2DHashmap::iterator itr; 1110 1111 bool doAll = false; 1112 1113 if (id.compare("all") == 0) { 1114 itr = _contours.begin(); 1115 doAll = true; 1116 } else { 1117 itr = _contours.find(id); 1118 } 1119 if (itr == _contours.end()) { 1120 ERROR("Contour2D not found: %s", id.c_str()); 1121 return; 1122 } 1123 1124 do { 1125 itr->second->setVisibility(state); 1126 } while (doAll && ++itr != _contours.end()); 1127 1128 _needsRedraw = true; 903 1129 } 904 1130 … … 908 1134 void Renderer::setContourEdgeColor(const DataSetId& id, float color[3]) 909 1135 { 910 Contour2D *contour = getContour2D(id); 911 if (contour) { 912 contour->setEdgeColor(color); 913 _needsRedraw = true; 914 } 1136 Contour2DHashmap::iterator itr; 1137 1138 bool doAll = false; 1139 1140 if (id.compare("all") == 0) { 1141 itr = _contours.begin(); 1142 doAll = true; 1143 } else { 1144 itr = _contours.find(id); 1145 } 1146 if (itr == _contours.end()) { 1147 ERROR("Contour2D not found: %s", id.c_str()); 1148 return; 1149 } 1150 1151 do { 1152 itr->second->setEdgeColor(color); 1153 } while (doAll && ++itr != _contours.end()); 1154 1155 _needsRedraw = true; 915 1156 } 916 1157 … … 923 1164 void Renderer::setContourEdgeWidth(const DataSetId& id, float edgeWidth) 924 1165 { 925 Contour2D *contour = getContour2D(id); 926 if (contour) { 927 contour->setEdgeWidth(edgeWidth); 928 _needsRedraw = true; 929 } 1166 Contour2DHashmap::iterator itr; 1167 1168 bool doAll = false; 1169 1170 if (id.compare("all") == 0) { 1171 itr = _contours.begin(); 1172 doAll = true; 1173 } else { 1174 itr = _contours.find(id); 1175 } 1176 if (itr == _contours.end()) { 1177 ERROR("Contour2D not found: %s", id.c_str()); 1178 return; 1179 } 1180 1181 do { 1182 itr->second->setEdgeWidth(edgeWidth); 1183 } while (doAll && ++itr != _contours.end()); 1184 1185 _needsRedraw = true; 930 1186 } 931 1187 … … 935 1191 void Renderer::setContourLighting(const DataSetId& id, bool state) 936 1192 { 937 Contour2D *contour = getContour2D(id); 938 if (contour) { 939 contour->setLighting(state); 940 _needsRedraw = true; 941 } 1193 Contour2DHashmap::iterator itr; 1194 1195 bool doAll = false; 1196 1197 if (id.compare("all") == 0) { 1198 itr = _contours.begin(); 1199 doAll = true; 1200 } else { 1201 itr = _contours.find(id); 1202 } 1203 if (itr == _contours.end()) { 1204 ERROR("Contour2D not found: %s", id.c_str()); 1205 return; 1206 } 1207 1208 do { 1209 itr->second->setLighting(state); 1210 } while (doAll && ++itr != _contours.end()); 1211 _needsRedraw = true; 942 1212 } 943 1213 … … 947 1217 void Renderer::addPolyData(const DataSetId& id) 948 1218 { 949 DataSet *ds = getDataSet(id); 950 if (ds == NULL) 951 return; 952 953 if (getPolyData(id)) { 954 WARN("Replacing existing polydata %s", id.c_str()); 955 deletePolyData(id); 956 } 957 958 PolyData *polyData = new PolyData(); 959 _polyDatas[id] = polyData; 960 961 polyData->setDataSet(ds); 962 963 _renderer->AddActor(polyData->getActor()); 1219 DataSetHashmap::iterator itr; 1220 1221 bool doAll = false; 1222 1223 if (id.compare("all") == 0) { 1224 itr = _dataSets.begin(); 1225 } else { 1226 itr = _dataSets.find(id); 1227 } 1228 if (itr == _dataSets.end()) { 1229 ERROR("Unknown dataset %s", id.c_str()); 1230 return; 1231 } 1232 1233 do { 1234 DataSet *ds = itr->second; 1235 const DataSetId& dsID = ds->getName(); 1236 1237 if (getPolyData(dsID)) { 1238 WARN("Replacing existing polydata %s", dsID.c_str()); 1239 deletePolyData(dsID); 1240 } 1241 1242 PolyData *polyData = new PolyData(); 1243 _polyDatas[dsID] = polyData; 1244 1245 polyData->setDataSet(ds); 1246 1247 _renderer->AddActor(polyData->getActor()); 1248 } while (doAll && ++itr != _dataSets.end()); 964 1249 965 1250 if (_cameraMode == IMAGE) … … 984 1269 985 1270 /** 1271 * \brief Set opacity of the PolyData for the given DataSet 1272 */ 1273 void Renderer::setPolyDataOpacity(const DataSetId& id, double opacity) 1274 { 1275 PolyDataHashmap::iterator itr; 1276 1277 bool doAll = false; 1278 1279 if (id.compare("all") == 0) { 1280 itr = _polyDatas.begin(); 1281 doAll = true; 1282 } else { 1283 itr = _polyDatas.find(id); 1284 } 1285 if (itr == _polyDatas.end()) { 1286 ERROR("PolyData not found: %s", id.c_str()); 1287 return; 1288 } 1289 1290 do { 1291 itr->second->setOpacity(opacity); 1292 } while (doAll && ++itr != _polyDatas.end()); 1293 1294 _needsRedraw = true; 1295 } 1296 1297 /** 986 1298 * \brief Turn on/off rendering of the PolyData mapper for the given DataSet 987 1299 */ 988 1300 void Renderer::setPolyDataVisibility(const DataSetId& id, bool state) 989 1301 { 990 PolyData *polyData = getPolyData(id); 991 if (polyData) { 992 polyData->setVisibility(state); 993 _needsRedraw = true; 994 } 1302 PolyDataHashmap::iterator itr; 1303 1304 bool doAll = false; 1305 1306 if (id.compare("all") == 0) { 1307 itr = _polyDatas.begin(); 1308 doAll = true; 1309 } else { 1310 itr = _polyDatas.find(id); 1311 } 1312 if (itr == _polyDatas.end()) { 1313 ERROR("PolyData not found: %s", id.c_str()); 1314 return; 1315 } 1316 1317 do { 1318 itr->second->setVisibility(state); 1319 } while (doAll && ++itr != _polyDatas.end()); 1320 1321 _needsRedraw = true; 995 1322 } 996 1323 … … 1000 1327 void Renderer::setPolyDataColor(const DataSetId& id, float color[3]) 1001 1328 { 1002 PolyData *polyData = getPolyData(id); 1003 if (polyData) { 1004 polyData->setColor(color); 1005 _needsRedraw = true; 1006 } 1329 PolyDataHashmap::iterator itr; 1330 1331 bool doAll = false; 1332 1333 if (id.compare("all") == 0) { 1334 itr = _polyDatas.begin(); 1335 doAll = true; 1336 } else { 1337 itr = _polyDatas.find(id); 1338 } 1339 if (itr == _polyDatas.end()) { 1340 ERROR("PolyData not found: %s", id.c_str()); 1341 return; 1342 } 1343 1344 do { 1345 itr->second->setColor(color); 1346 } while (doAll && ++itr != _polyDatas.end()); 1347 _needsRedraw = true; 1007 1348 } 1008 1349 … … 1012 1353 void Renderer::setPolyDataEdgeVisibility(const DataSetId& id, bool state) 1013 1354 { 1014 PolyData *polyData = getPolyData(id); 1015 if (polyData) { 1016 polyData->setEdgeVisibility(state); 1017 _needsRedraw = true; 1018 } 1355 PolyDataHashmap::iterator itr; 1356 1357 bool doAll = false; 1358 1359 if (id.compare("all") == 0) { 1360 itr = _polyDatas.begin(); 1361 doAll = true; 1362 } else { 1363 itr = _polyDatas.find(id); 1364 } 1365 if (itr == _polyDatas.end()) { 1366 ERROR("PolyData not found: %s", id.c_str()); 1367 return; 1368 } 1369 1370 do { 1371 itr->second->setEdgeVisibility(state); 1372 } while (doAll && ++itr != _polyDatas.end()); 1373 1374 _needsRedraw = true; 1019 1375 } 1020 1376 … … 1024 1380 void Renderer::setPolyDataEdgeColor(const DataSetId& id, float color[3]) 1025 1381 { 1026 PolyData *polyData = getPolyData(id); 1027 if (polyData) { 1028 polyData->setEdgeColor(color); 1029 _needsRedraw = true; 1030 } 1382 PolyDataHashmap::iterator itr; 1383 1384 bool doAll = false; 1385 1386 if (id.compare("all") == 0) { 1387 itr = _polyDatas.begin(); 1388 doAll = true; 1389 } else { 1390 itr = _polyDatas.find(id); 1391 } 1392 if (itr == _polyDatas.end()) { 1393 ERROR("PolyData not found: %s", id.c_str()); 1394 return; 1395 } 1396 1397 do { 1398 itr->second->setEdgeColor(color); 1399 } while (doAll && ++itr != _polyDatas.end()); 1400 1401 _needsRedraw = true; 1031 1402 } 1032 1403 … … 1039 1410 void Renderer::setPolyDataEdgeWidth(const DataSetId& id, float edgeWidth) 1040 1411 { 1041 PolyData *polyData = getPolyData(id); 1042 if (polyData) { 1043 polyData->setEdgeWidth(edgeWidth); 1044 _needsRedraw = true; 1045 } 1412 PolyDataHashmap::iterator itr; 1413 1414 bool doAll = false; 1415 1416 if (id.compare("all") == 0) { 1417 itr = _polyDatas.begin(); 1418 doAll = true; 1419 } else { 1420 itr = _polyDatas.find(id); 1421 } 1422 if (itr == _polyDatas.end()) { 1423 ERROR("PolyData not found: %s", id.c_str()); 1424 return; 1425 } 1426 1427 do { 1428 itr->second->setEdgeWidth(edgeWidth); 1429 } while (doAll && ++itr != _polyDatas.end()); 1430 1431 _needsRedraw = true; 1046 1432 } 1047 1433 … … 1051 1437 void Renderer::setPolyDataWireframe(const DataSetId& id, bool state) 1052 1438 { 1053 PolyData *polyData = getPolyData(id); 1054 if (polyData) { 1055 polyData->setWireframe(state); 1056 _needsRedraw = true; 1057 } 1439 PolyDataHashmap::iterator itr; 1440 1441 bool doAll = false; 1442 1443 if (id.compare("all") == 0) { 1444 itr = _polyDatas.begin(); 1445 doAll = true; 1446 } else { 1447 itr = _polyDatas.find(id); 1448 } 1449 if (itr == _polyDatas.end()) { 1450 ERROR("PolyData not found: %s", id.c_str()); 1451 return; 1452 } 1453 1454 do { 1455 itr->second->setWireframe(state); 1456 } while (doAll && ++itr != _polyDatas.end()); 1457 1458 _needsRedraw = true; 1058 1459 } 1059 1460 … … 1063 1464 void Renderer::setPolyDataLighting(const DataSetId& id, bool state) 1064 1465 { 1065 PolyData *polyData = getPolyData(id); 1066 if (polyData) { 1067 polyData->setLighting(state); 1068 _needsRedraw = true; 1069 } 1466 PolyDataHashmap::iterator itr; 1467 1468 bool doAll = false; 1469 1470 if (id.compare("all") == 0) { 1471 itr = _polyDatas.begin(); 1472 doAll = true; 1473 } else { 1474 itr = _polyDatas.find(id); 1475 } 1476 if (itr == _polyDatas.end()) { 1477 ERROR("PolyData not found: %s", id.c_str()); 1478 return; 1479 } 1480 1481 do { 1482 itr->second->setLighting(state); 1483 } while (doAll && ++itr != _polyDatas.end()); 1484 1485 _needsRedraw = true; 1070 1486 } 1071 1487 … … 1457 1873 void Renderer::setOpacity(const DataSetId& id, double opacity) 1458 1874 { 1459 PseudoColor *pc = getPseudoColor(id); 1460 if (pc) { 1461 pc->setOpacity(opacity); 1462 _needsRedraw = true; 1463 } 1464 Contour2D *contour = getContour2D(id); 1465 if (contour) { 1466 contour->setOpacity(opacity); 1467 _needsRedraw = true; 1468 } 1469 PolyData *polyData = getPolyData(id); 1470 if (polyData) { 1471 polyData->setOpacity(opacity); 1472 _needsRedraw = true; 1473 } 1875 setPseudoColorOpacity(id, opacity); 1876 setContourOpacity(id, opacity); 1877 setPolyDataOpacity(id, opacity); 1474 1878 } 1475 1879 -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r2123 r2137 154 154 vtkLookupTable *getPseudoColorColorMap(const DataSetId& id); 155 155 156 void setPseudoColorOpacity(const DataSetId& id, double opacity); 157 156 158 void setPseudoColorVisibility(const DataSetId& id, bool state); 157 159 … … 175 177 176 178 void setContourList(const DataSetId& id, const std::vector<double>& contours); 179 180 void setContourOpacity(const DataSetId& id, double opacity); 177 181 178 182 void setContourVisibility(const DataSetId& id, bool state); … … 191 195 192 196 PolyData *getPolyData(const DataSetId& id); 197 198 void setPolyDataOpacity(const DataSetId& id, double opacity); 193 199 194 200 void setPolyDataVisibility(const DataSetId& id, bool state); -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r2124 r2137 433 433 Tcl_Obj *const *objv) 434 434 { 435 const char *name = Tcl_GetString(objv[4]);436 g_renderer->addContour2D(name);437 435 std::vector<double> contourList; 438 436 … … 452 450 } 453 451 454 g_renderer->setContourList(name, contourList); 452 if (objc == 5) { 453 const char *name = Tcl_GetString(objv[4]); 454 g_renderer->addContour2D(name); 455 g_renderer->setContourList(name, contourList); 456 } else { 457 g_renderer->addContour2D("all"); 458 g_renderer->setContourList("all", contourList); 459 } 455 460 return TCL_OK; 456 461 } … … 460 465 Tcl_Obj *const *objv) 461 466 { 462 const char *name = Tcl_GetString(objv[4]);463 g_renderer->addContour2D(name);464 467 int numContours; 465 468 if (Tcl_GetIntFromObj(interp, objv[3], &numContours) != TCL_OK) { 466 469 return TCL_ERROR; 467 470 } 468 g_renderer->setContours(name, numContours); 471 if (objc == 5) { 472 const char *name = Tcl_GetString(objv[4]); 473 g_renderer->addContour2D(name); 474 g_renderer->setContours(name, numContours); 475 } else { 476 g_renderer->addContour2D("all"); 477 g_renderer->setContours("all", numContours); 478 } 469 479 return TCL_OK; 470 480 } 471 481 472 482 static Rappture::CmdSpec contour2dAddOps[] = { 473 {"contourlist", 1, Contour2DAddContourListOp, 5, 5, "contourList dataSetName"},474 {"numcontours", 1, Contour2DAddNumContoursOp, 5, 5, "numContours dataSetName"}483 {"contourlist", 1, Contour2DAddContourListOp, 4, 5, "contourList ?dataSetName?"}, 484 {"numcontours", 1, Contour2DAddNumContoursOp, 4, 5, "numContours ?dataSetName?"} 475 485 }; 476 486 static int nContour2dAddOps = NumCmdSpecs(contour2dAddOps); … … 507 517 Tcl_Obj *const *objv) 508 518 { 509 const char *name = Tcl_GetString(objv[3]);510 519 bool state; 511 520 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 512 521 return TCL_ERROR; 513 522 } 514 g_renderer->setContourLighting(name, state); 523 if (objc == 4) { 524 const char *name = Tcl_GetString(objv[3]); 525 g_renderer->setContourLighting(name, state); 526 } else { 527 g_renderer->setContourLighting("all", state); 528 } 515 529 return TCL_OK; 516 530 } … … 520 534 Tcl_Obj *const *objv) 521 535 { 522 const char *name = Tcl_GetString(objv[5]);523 536 float color[3]; 524 537 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK || … … 527 540 return TCL_ERROR; 528 541 } 529 g_renderer->setContourEdgeColor(name, color); 542 if (objc == 6) { 543 const char *name = Tcl_GetString(objv[5]); 544 g_renderer->setContourEdgeColor(name, color); 545 } else { 546 g_renderer->setContourEdgeColor("all", color); 547 } 530 548 return TCL_OK; 531 549 } … … 535 553 Tcl_Obj *const *objv) 536 554 { 537 const char *name = Tcl_GetString(objv[3]);538 555 float width; 539 556 if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) { 540 557 return TCL_ERROR; 541 558 } 542 g_renderer->setContourEdgeWidth(name, width); 559 if (objc == 4) { 560 const char *name = Tcl_GetString(objv[3]); 561 g_renderer->setContourEdgeWidth(name, width); 562 } else { 563 g_renderer->setContourEdgeWidth("all", width); 564 } 565 return TCL_OK; 566 } 567 568 static int 569 Contour2DOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc, 570 Tcl_Obj *const *objv) 571 { 572 double opacity; 573 if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) { 574 return TCL_ERROR; 575 } 576 if (objc == 4) { 577 const char *name = Tcl_GetString(objv[3]); 578 g_renderer->setContourOpacity(name, opacity); 579 } else { 580 g_renderer->setContourOpacity("all", opacity); 581 } 543 582 return TCL_OK; 544 583 } … … 548 587 Tcl_Obj *const *objv) 549 588 { 550 const char *name = Tcl_GetString(objv[3]);551 589 bool state; 552 590 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 553 591 return TCL_ERROR; 554 592 } 555 g_renderer->setContourVisibility(name, state); 593 if (objc == 4) { 594 const char *name = Tcl_GetString(objv[3]); 595 g_renderer->setContourVisibility(name, state); 596 } else { 597 g_renderer->setContourVisibility("all", state); 598 } 556 599 return TCL_OK; 557 600 } 558 601 559 602 static Rappture::CmdSpec contour2dOps[] = { 560 {"add", 1, Contour2DAddOp, 5, 5, "oper value dataSetName"},603 {"add", 1, Contour2DAddOp, 4, 5, "oper value ?dataSetName?"}, 561 604 {"delete", 1, Contour2DDeleteOp, 2, 3, "?dataSetName?"}, 562 {"lighting", 3, Contour2DLightingOp, 4, 4, "bool dataSetName"}, 563 {"linecolor", 5, Contour2DLineColorOp, 6, 6, "r g b dataSetName"}, 564 {"linewidth", 5, Contour2DLineWidthOp, 4, 4, "width dataSetName"}, 565 {"visible", 1, Contour2DVisibleOp, 4, 4, "bool dataSetName"} 605 {"lighting", 3, Contour2DLightingOp, 3, 4, "bool ?dataSetName?"}, 606 {"linecolor", 5, Contour2DLineColorOp, 5, 6, "r g b ?dataSetName?"}, 607 {"linewidth", 5, Contour2DLineWidthOp, 3, 4, "width ?dataSetName?"}, 608 {"opacity", 1, Contour2DOpacityOp, 3, 4, "value ?dataSetName?"}, 609 {"visible", 1, Contour2DVisibleOp, 3, 4, "bool ?dataSetName?"} 566 610 }; 567 611 static int nContour2dOps = NumCmdSpecs(contour2dOps); … … 724 768 Tcl_Obj *const *objv) 725 769 { 726 const char *name = Tcl_GetString(objv[3]);727 770 double opacity; 728 771 if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) { 729 772 return TCL_ERROR; 730 773 } 731 g_renderer->setOpacity(name, opacity); 774 if (objc == 4) { 775 const char *name = Tcl_GetString(objv[3]); 776 g_renderer->setOpacity(name, opacity); 777 } else { 778 g_renderer->setOpacity("all", opacity); 779 } 732 780 return TCL_OK; 733 781 } … … 737 785 Tcl_Obj *const *objv) 738 786 { 739 const char *name = Tcl_GetString(objv[3]);740 787 bool state; 741 788 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 742 789 return TCL_ERROR; 743 790 } 744 g_renderer->setVisibility(name, state); 791 if (objc == 4) { 792 const char *name = Tcl_GetString(objv[3]); 793 g_renderer->setVisibility(name, state); 794 } else { 795 g_renderer->setVisibility("all", state); 796 } 745 797 return TCL_OK; 746 798 } … … 750 802 {"delete", 1, DataSetDeleteOp, 2, 3, "?name?"}, 751 803 {"getvalue", 1, DataSetGetValueOp, 6, 7, "oper x y ?z? name"}, 752 {"opacity", 1, DataSetOpacityOp, 4, 4, "value name"},753 {"visible", 1, DataSetVisibleOp, 4, 4, "bool name"}804 {"opacity", 1, DataSetOpacityOp, 3, 4, "value ?name?"}, 805 {"visible", 1, DataSetVisibleOp, 3, 4, "bool ?name?"} 754 806 }; 755 807 static int nDataSetOps = NumCmdSpecs(dataSetOps); … … 811 863 Tcl_Obj *const *objv) 812 864 { 813 const char *name = Tcl_GetString(objv[2]); 814 g_renderer->addPseudoColor(name); 865 if (objc == 3) { 866 const char *name = Tcl_GetString(objv[2]); 867 g_renderer->addPseudoColor(name); 868 } else { 869 g_renderer->addPseudoColor("all"); 870 } 815 871 return TCL_OK; 816 872 } … … 821 877 { 822 878 const char *colorMapName = Tcl_GetString(objv[2]); 823 const char *dataSetName = Tcl_GetString(objv[3]); 824 g_renderer->setPseudoColorColorMap(dataSetName, colorMapName); 879 if (objc == 4) { 880 const char *dataSetName = Tcl_GetString(objv[3]); 881 g_renderer->setPseudoColorColorMap(dataSetName, colorMapName); 882 } else { 883 g_renderer->setPseudoColorColorMap("all", colorMapName); 884 } 825 885 return TCL_OK; 826 886 } … … 840 900 841 901 static int 842 PseudoColorVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc, 843 Tcl_Obj *const *objv) 844 { 845 const char *name = Tcl_GetString(objv[3]); 902 PseudoColorEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc, 903 Tcl_Obj *const *objv) 904 { 846 905 bool state; 847 906 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 848 907 return TCL_ERROR; 849 908 } 850 g_renderer->setPseudoColorVisibility(name, state); 851 return TCL_OK; 852 } 853 854 static int 855 PseudoColorEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc, 856 Tcl_Obj *const *objv) 857 { 858 const char *name = Tcl_GetString(objv[3]); 909 if (objc == 4) { 910 const char *name = Tcl_GetString(objv[3]); 911 g_renderer->setPseudoColorEdgeVisibility(name, state); 912 } else { 913 g_renderer->setPseudoColorEdgeVisibility("all", state); 914 } 915 return TCL_OK; 916 } 917 918 static int 919 PseudoColorLightingOp(ClientData clientData, Tcl_Interp *interp, int objc, 920 Tcl_Obj *const *objv) 921 { 859 922 bool state; 860 923 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 861 924 return TCL_ERROR; 862 925 } 863 g_renderer->setPseudoColorEdgeVisibility(name, state); 864 return TCL_OK; 865 } 866 867 static int 868 PseudoColorLightingOp(ClientData clientData, Tcl_Interp *interp, int objc, 869 Tcl_Obj *const *objv) 870 { 871 const char *name = Tcl_GetString(objv[3]); 872 bool state; 873 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 874 return TCL_ERROR; 875 } 876 g_renderer->setPseudoColorLighting(name, state); 926 if (objc == 4) { 927 const char *name = Tcl_GetString(objv[3]); 928 g_renderer->setPseudoColorLighting(name, state); 929 } else { 930 g_renderer->setPseudoColorLighting("all", state); 931 } 877 932 return TCL_OK; 878 933 } … … 882 937 Tcl_Obj *const *objv) 883 938 { 884 const char *name = Tcl_GetString(objv[5]);885 939 float color[3]; 886 940 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK || … … 889 943 return TCL_ERROR; 890 944 } 891 g_renderer->setPseudoColorEdgeColor(name, color); 945 if (objc == 6) { 946 const char *name = Tcl_GetString(objv[5]); 947 g_renderer->setPseudoColorEdgeColor(name, color); 948 } else { 949 g_renderer->setPseudoColorEdgeColor("all", color); 950 } 892 951 return TCL_OK; 893 952 } … … 897 956 Tcl_Obj *const *objv) 898 957 { 899 const char *name = Tcl_GetString(objv[3]);900 958 float width; 901 959 if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) { 902 960 return TCL_ERROR; 903 961 } 904 g_renderer->setPseudoColorEdgeWidth(name, width); 962 if (objc == 4) { 963 const char *name = Tcl_GetString(objv[3]); 964 g_renderer->setPseudoColorEdgeWidth(name, width); 965 } else { 966 g_renderer->setPseudoColorEdgeWidth("all", width); 967 } 968 return TCL_OK; 969 } 970 971 static int 972 PseudoColorOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc, 973 Tcl_Obj *const *objv) 974 { 975 double opacity; 976 if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) { 977 return TCL_ERROR; 978 } 979 if (objc == 4) { 980 const char *name = Tcl_GetString(objv[3]); 981 g_renderer->setPseudoColorOpacity(name, opacity); 982 } else { 983 g_renderer->setPseudoColorOpacity("all", opacity); 984 } 985 return TCL_OK; 986 } 987 988 static int 989 PseudoColorVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc, 990 Tcl_Obj *const *objv) 991 { 992 bool state; 993 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 994 return TCL_ERROR; 995 } 996 if (objc == 4) { 997 const char *name = Tcl_GetString(objv[3]); 998 g_renderer->setPseudoColorVisibility(name, state); 999 } else { 1000 g_renderer->setPseudoColorVisibility("all", state); 1001 } 905 1002 return TCL_OK; 906 1003 } 907 1004 908 1005 static Rappture::CmdSpec pseudoColorOps[] = { 909 {"add", 1, PseudoColorAddOp, 3, 3, "dataSetName"},910 {"colormap", 1, PseudoColorColorMapOp, 4, 4, "colorMapName dataSetName"},1006 {"add", 1, PseudoColorAddOp, 2, 3, "?dataSetName?"}, 1007 {"colormap", 1, PseudoColorColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 911 1008 {"delete", 1, PseudoColorDeleteOp, 2, 3, "?dataSetName?"}, 912 {"edges", 1, PseudoColorEdgeVisibilityOp, 4, 4, "bool dataSetName"}, 913 {"lighting", 3, PseudoColorLightingOp, 4, 4, "bool dataSetName"}, 914 {"linecolor", 5, PseudoColorLineColorOp, 6, 6, "r g b dataSetName"}, 915 {"linewidth", 5, PseudoColorLineWidthOp, 4, 4, "width dataSetName"}, 916 {"visible", 1, PseudoColorVisibleOp, 4, 4, "bool dataSetName"} 1009 {"edges", 1, PseudoColorEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 1010 {"lighting", 3, PseudoColorLightingOp, 3, 4, "bool ?dataSetName?"}, 1011 {"linecolor", 5, PseudoColorLineColorOp, 5, 6, "r g b ?dataSetName?"}, 1012 {"linewidth", 5, PseudoColorLineWidthOp, 3, 4, "width ?dataSetName?"}, 1013 {"opacity", 1, PseudoColorOpacityOp, 3, 4, "value ?dataSetName?"}, 1014 {"visible", 1, PseudoColorVisibleOp, 3, 4, "bool ?dataSetName?"} 917 1015 }; 918 1016 static int nPseudoColorOps = NumCmdSpecs(pseudoColorOps); … … 936 1034 Tcl_Obj *const *objv) 937 1035 { 938 const char *name = Tcl_GetString(objv[2]); 939 g_renderer->addPolyData(name); 1036 if (objc == 3) { 1037 const char *name = Tcl_GetString(objv[2]); 1038 g_renderer->addPolyData(name); 1039 } else { 1040 g_renderer->addPolyData("all"); 1041 } 940 1042 return TCL_OK; 941 1043 } … … 958 1060 Tcl_Obj *const *objv) 959 1061 { 960 const char *name = Tcl_GetString(objv[5]);961 1062 float color[3]; 962 1063 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK || … … 965 1066 return TCL_ERROR; 966 1067 } 967 g_renderer->setPolyDataColor(name, color); 1068 if (objc == 6) { 1069 const char *name = Tcl_GetString(objv[5]); 1070 g_renderer->setPolyDataColor(name, color); 1071 } else { 1072 g_renderer->setPolyDataColor("all", color); 1073 } 968 1074 return TCL_OK; 969 1075 } … … 973 1079 Tcl_Obj *const *objv) 974 1080 { 975 const char *name = Tcl_GetString(objv[3]);976 1081 bool state; 977 1082 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 978 1083 return TCL_ERROR; 979 1084 } 980 g_renderer->setPolyDataEdgeVisibility(name, state); 1085 if (objc == 4) { 1086 const char *name = Tcl_GetString(objv[3]); 1087 g_renderer->setPolyDataEdgeVisibility(name, state); 1088 } else { 1089 g_renderer->setPolyDataEdgeVisibility("all", state); 1090 } 981 1091 return TCL_OK; 982 1092 } … … 986 1096 Tcl_Obj *const *objv) 987 1097 { 988 const char *name = Tcl_GetString(objv[3]);989 1098 bool state; 990 1099 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 991 1100 return TCL_ERROR; 992 1101 } 993 g_renderer->setPolyDataLighting(name, state); 1102 if (objc == 4) { 1103 const char *name = Tcl_GetString(objv[3]); 1104 g_renderer->setPolyDataLighting(name, state); 1105 } else { 1106 g_renderer->setPolyDataLighting("all", state); 1107 } 994 1108 return TCL_OK; 995 1109 } … … 999 1113 Tcl_Obj *const *objv) 1000 1114 { 1001 const char *name = Tcl_GetString(objv[5]);1002 1115 float color[3]; 1003 1116 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK || … … 1006 1119 return TCL_ERROR; 1007 1120 } 1008 g_renderer->setPolyDataEdgeColor(name, color); 1121 if (objc == 6) { 1122 const char *name = Tcl_GetString(objv[5]); 1123 g_renderer->setPolyDataEdgeColor(name, color); 1124 } else { 1125 g_renderer->setPolyDataEdgeColor("all", color); 1126 } 1009 1127 return TCL_OK; 1010 1128 } … … 1014 1132 Tcl_Obj *const *objv) 1015 1133 { 1016 const char *name = Tcl_GetString(objv[3]);1017 1134 float width; 1018 1135 if (GetFloatFromObj(interp, objv[2], &width) != TCL_OK) { 1019 1136 return TCL_ERROR; 1020 1137 } 1021 g_renderer->setPolyDataEdgeWidth(name, width); 1138 if (objc == 4) { 1139 const char *name = Tcl_GetString(objv[3]); 1140 g_renderer->setPolyDataEdgeWidth(name, width); 1141 } else { 1142 g_renderer->setPolyDataEdgeWidth("all", width); 1143 } 1144 return TCL_OK; 1145 } 1146 1147 static int 1148 PolyDataOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc, 1149 Tcl_Obj *const *objv) 1150 { 1151 double opacity; 1152 if (Tcl_GetDoubleFromObj(interp, objv[2], &opacity) != TCL_OK) { 1153 return TCL_ERROR; 1154 } 1155 if (objc == 4) { 1156 const char *name = Tcl_GetString(objv[3]); 1157 g_renderer->setPolyDataOpacity(name, opacity); 1158 } else { 1159 g_renderer->setPolyDataOpacity("all", opacity); 1160 } 1022 1161 return TCL_OK; 1023 1162 } … … 1027 1166 Tcl_Obj *const *objv) 1028 1167 { 1029 const char *name = Tcl_GetString(objv[3]);1030 1168 bool state; 1031 1169 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1032 1170 return TCL_ERROR; 1033 1171 } 1034 g_renderer->setPolyDataVisibility(name, state); 1172 if (objc == 4) { 1173 const char *name = Tcl_GetString(objv[3]); 1174 g_renderer->setPolyDataVisibility(name, state); 1175 } else { 1176 g_renderer->setPolyDataVisibility("all", state); 1177 } 1035 1178 return TCL_OK; 1036 1179 } … … 1040 1183 Tcl_Obj *const *objv) 1041 1184 { 1042 const char *name = Tcl_GetString(objv[3]);1043 1185 bool state; 1044 1186 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 1045 1187 return TCL_ERROR; 1046 1188 } 1047 g_renderer->setPolyDataWireframe(name, state); 1189 if (objc == 4) { 1190 const char *name = Tcl_GetString(objv[3]); 1191 g_renderer->setPolyDataWireframe(name, state); 1192 } else { 1193 g_renderer->setPolyDataWireframe("all", state); 1194 } 1048 1195 return TCL_OK; 1049 1196 } 1050 1197 1051 1198 static Rappture::CmdSpec polyDataOps[] = { 1052 {"add", 1, PolyDataAddOp, 3, 3, "dataSetName"},1053 {"color", 1, PolyDataColorOp, 6, 6, "r g b dataSetName"},1199 {"add", 1, PolyDataAddOp, 2, 3, "?dataSetName?"}, 1200 {"color", 1, PolyDataColorOp, 5, 6, "r g b ?dataSetName?"}, 1054 1201 {"delete", 1, PolyDataDeleteOp, 2, 3, "?dataSetName?"}, 1055 {"edges", 1, PolyDataEdgeVisibilityOp, 4, 4, "bool dataSetName"}, 1056 {"lighting", 3, PolyDataLightingOp, 4, 4, "bool dataSetName"}, 1057 {"linecolor", 5, PolyDataLineColorOp, 6, 6, "r g b dataSetName"}, 1058 {"linewidth", 5, PolyDataLineWidthOp, 4, 4, "width dataSetName"}, 1059 {"visible", 1, PolyDataVisibleOp, 4, 4, "bool dataSetName"}, 1060 {"wireframe", 1, PolyDataWireframeOp, 4, 4, "bool dataSetName"} 1202 {"edges", 1, PolyDataEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 1203 {"lighting", 3, PolyDataLightingOp, 3, 4, "bool ?dataSetName?"}, 1204 {"linecolor", 5, PolyDataLineColorOp, 5, 6, "r g b ?dataSetName?"}, 1205 {"linewidth", 5, PolyDataLineWidthOp, 3, 4, "width ?dataSetName?"}, 1206 {"opacity", 1, PolyDataOpacityOp, 3, 4, "value ?dataSetName?"}, 1207 {"visible", 1, PolyDataVisibleOp, 3, 4, "bool ?dataSetName?"}, 1208 {"wireframe", 1, PolyDataWireframeOp, 3, 4, "bool ?dataSetName?"} 1061 1209 }; 1062 1210 static int nPolyDataOps = NumCmdSpecs(polyDataOps); -
trunk/packages/vizservers/vtkvis/protocol.txt
r2124 r2137 44 44 dataset getvalue pixel <x> <y> <datasetName> 45 45 Use pixel for image camera mode 46 dataset opacity <val> < datasetName>47 dataset visible <bool> < datasetName>46 dataset opacity <val> <?datasetName?> 47 dataset visible <bool> <?datasetName?> 48 48 49 pseudocolor add < datasetName>50 pseudocolor colormap <colormapName> < datasetName>49 pseudocolor add <?datasetName?> 50 pseudocolor colormap <colormapName> <?datasetName?> 51 51 pseudocolor delete <?datasetName?> 52 pseudocolor edges <bool> <datasetName> 53 pseudocolor linecolor <r> <g> <b> <datasetName> 54 pseudocolor linewidth <val> <datasetName> 55 pseudocolor visible <bool> <datasetName> 52 pseudocolor edges <bool> <?datasetName?> 53 pseudocolor lighting <bool> <?datasetName?> 54 pseudocolor linecolor <r> <g> <b> <?datasetName?> 55 pseudocolor linewidth <val> <?datasetName?> 56 pseudocolor opacity <val> <?datasetName?> 57 pseudocolor visible <bool> <?datasetName?> 56 58 57 contour2d add numcontours <n> < datasetName>58 contour2d add contourlist <list> < datasetName>59 contour2d add numcontours <n> <?datasetName?> 60 contour2d add contourlist <list> <?datasetName?> 59 61 list = {isoval1 isoval2 isoval3...} 60 62 contour2d delete <?datasetName?> 61 contour2d linecolor <r> <g> <b> <datasetName> 62 contour2d linewidth <val> <datasetName> 63 contour2d visible <bool> <datasetName> 63 contour2d lighting <bool> <?datasetName?> 64 contour2d linecolor <r> <g> <b> <?datasetName?> 65 contour2d linewidth <val> <?datasetName?> 66 contour2d opacity <val> <?datasetName?> 67 contour2d visible <bool> <?datasetName?> 64 68 65 polydata add < datasetName>66 polydata color <r> <g> <b> < datasetName>69 polydata add <?datasetName?> 70 polydata color <r> <g> <b> <?datasetName?> 67 71 polydata delete <?datasetName?> 68 polydata edges <bool> <datasetName> 69 polydata linecolor <r> <g> <b> <datasetName> 70 polydata linewidth <val> <datasetName> 71 polydata visible <bool> <datasetName> 72 polydata wireframe <bool> <datasetName> 72 polydata edges <bool> <?datasetName?> 73 polydata lighting <bool> <?datasetName?> 74 polydata linecolor <r> <g> <b> <?datasetName?> 75 polydata linewidth <val> <?datasetName?> 76 polydata opacity <val> <?datasetName?> 77 polydata visible <bool> <?datasetName?> 78 polydata wireframe <bool> <?datasetName?> 73 79 74 80 ================================================================================
Note: See TracChangeset
for help on using the changeset viewer.