- Timestamp:
- Jul 9, 2007, 6:38:11 PM (17 years ago)
- Location:
- trunk/vizservers/nanovis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vizservers/nanovis/HeightMap.cpp
r776 r779 46 46 glEnable(GL_DEPTH_TEST); 47 47 48 /*49 48 if (_vertexBufferObjectID) 50 49 { … … 89 88 } 90 89 } 91 */92 90 93 91 glShadeModel(GL_FLAT); -
trunk/vizservers/nanovis/nanovis.cpp
r778 r779 1147 1147 //bytes 1148 1148 vector<int> indices; 1149 if (strcmp(argv[2]," on") == 0)1149 if (strcmp(argv[2],"visible") == 0) 1150 1150 { 1151 if (GetVolumeIndices(interp, argc-2, argv+2, &indices) != TCL_OK) 1151 bool visible = !strcmp(argv[3], "true"); 1152 1153 if (GetIndices(interp, argc-4, argv+4, &indices) != TCL_OK) 1152 1154 { 1153 1155 return TCL_ERROR; 1154 1156 } 1155 1157 … … 1158 1160 if ((indices[i] < g_heightMap.size()) && (g_heightMap[indices[i]] != NULL)) 1159 1161 { 1160 g_heightMap[indices[i]]->setVisible( true);1162 g_heightMap[indices[i]]->setVisible(visible); 1161 1163 } 1162 1164 } 1163 1165 return TCL_OK; 1164 1166 } 1165 else if (strcmp(argv[2],"off") == 0) 1166 { 1167 if (GetVolumeIndices(interp, argc-2, argv+2, &indices) != TCL_OK) 1168 { 1167 else if (c == 'f' && strcmp(argv[2],"follows") == 0) { 1168 int nbytes; 1169 if (Tcl_GetInt(interp, argv[3], &nbytes) != TCL_OK) { 1169 1170 return TCL_ERROR; 1170 1171 } 1171 1172 for (int i = 0; i < indices.size(); ++i) 1173 { 1174 if ((indices[i] < g_heightMap.size()) && (g_heightMap[indices[i]] != NULL)) 1175 { 1176 g_heightMap[indices[i]]->setVisible(false); 1177 } 1178 } 1179 return TCL_OK; 1180 } 1181 1182 1183 1172 } 1184 1173 } 1185 1174 else if (c == 'l' && (strcmp(argv[1], "linecontour") == 0)) … … 1187 1176 //bytes 1188 1177 vector<int> indices; 1189 if (strcmp(argv[2]," on") == 0)1178 if (strcmp(argv[2],"visible") == 0) 1190 1179 { 1191 if (GetVolumeIndices(interp, argc-3, argv+3, &indices) != TCL_OK) 1180 1181 bool visible = !(strcmp("true", argv[3])); 1182 printf("heightmap linecontour visible %s\n", (visible)?"true":"false"); 1183 if (GetIndices(interp, argc-4, argv+4, &indices) != TCL_OK) 1192 1184 { 1193 1185 return TCL_ERROR; … … 1196 1188 for (int i = 0; i < indices.size(); ++i) 1197 1189 { 1190 printf("heightmap index %d\n"); 1198 1191 if ((indices[i] < g_heightMap.size()) && (g_heightMap[indices[i]] != NULL)) 1199 1192 { 1200 g_heightMap[indices[i]]->setLineContourVisible(true); 1193 printf("heightmap index %d visible applied\n"); 1194 g_heightMap[indices[i]]->setLineContourVisible(visible); 1201 1195 } 1202 1196 } 1203 1197 return TCL_OK; 1204 1198 } 1205 else if (strcmp(argv[2],"off") == 0)1206 {1207 if (GetVolumeIndices(interp, argc-3, argv+3, &indices) != TCL_OK)1208 {1209 return TCL_ERROR;1210 }1211 1212 for (int i = 0; i < indices.size(); ++i)1213 {1214 if ((indices[i] < g_heightMap.size()) && (g_heightMap[indices[i]] != NULL))1215 {1216 g_heightMap[indices[i]]->setLineContourVisible(false);1217 }1218 }1219 return TCL_OK;1220 }1221 1222 return TCL_OK;1223 1199 } 1224 1200 else if (c == 't' && (strcmp(argv[1], "transfunc") == 0)) 1225 1201 { 1226 TransferFunction *tf = get_transfunc((char*)argv[ 3]);1202 TransferFunction *tf = get_transfunc((char*)argv[2]); 1227 1203 if (tf == NULL) { 1228 1204 Tcl_AppendResult(interp, "transfer function \"", argv[3], … … 1415 1391 return TCL_ERROR; 1416 1392 } 1417 if (ivol < 0 || ivol >= volume.size()) { 1418 Tcl_AppendResult(interp, "bad volume index \"", argv[n], 1419 "\"", (char*)NULL); 1420 return TCL_ERROR; 1421 } 1393 vectorPtr->push_back(ivol); 1422 1394 } 1423 1395 return TCL_OK;
Note: See TracChangeset
for help on using the changeset viewer.