Changeset 889
- Timestamp:
- Feb 15, 2008, 2:58:28 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vizservers/nanovis/Command.cpp
r887 r889 1126 1126 return TCL_ERROR; 1127 1127 } 1128 int iso_surface = 0;1128 int iso_surface; 1129 1129 if (Tcl_GetBoolean(interp, argv[3], &iso_surface) != TCL_OK) { 1130 1130 return TCL_ERROR; … … 1169 1169 } 1170 1170 } 1171 } 1172 else if (strcmp(argv[1],"animation") == 0) { 1173 1171 } else if (strcmp(argv[1],"animation") == 0) { 1172 if (argc < 3) { 1173 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], 1174 " animation option ?args...?\"", (char*)NULL); 1175 return TCL_ERROR; 1176 } 1174 1177 if (strcmp(argv[2],"volumes") == 0) { 1175 1178 vector<unsigned int> ivol; … … 1177 1180 return TCL_ERROR; 1178 1181 } 1179 1180 1182 NanoVis::vol_renderer->clearAnimatedVolumeInfo(); 1181 1182 1183 vector<unsigned int>::iterator iter; 1183 1184 for (iter = ivol.begin(); iter != ivol.end(); iter++) { 1184 NanoVis::vol_renderer->addAnimatedVolume(NanoVis::volume[*iter], *iter); 1185 } 1186 } 1187 else if (strcmp(argv[2],"start") == 0) { 1188 NanoVis::vol_renderer->startVolumeAnimation(); 1189 } 1190 else if (strcmp(argv[2],"stop") == 0) { 1185 NanoVis::vol_renderer->addAnimatedVolume(NanoVis::volume[*iter], 1186 *iter); 1187 } 1188 } else if (strcmp(argv[2],"start") == 0) { 1189 NanoVis::vol_renderer->startVolumeAnimation(); 1190 } else if (strcmp(argv[2],"stop") == 0) { 1191 1191 NanoVis::vol_renderer->stopVolumeAnimation(); 1192 } 1193 else if (strcmp(argv[2],"clear") == 0) { 1192 } else if (strcmp(argv[2],"clear") == 0) { 1194 1193 NanoVis::vol_renderer->clearAnimatedVolumeInfo(); 1195 } 1196 1197 } 1198 else if ((c == 't') && (strcmp(argv[1],"test2") == 0)) { 1194 } else { 1195 Tcl_AppendResult(interp, "bad animation option \"", argv[2], 1196 "\": should be volumes, start, stop, or clear", (char*)NULL); 1197 return TCL_ERROR; 1198 } 1199 } else if ((c == 't') && (strcmp(argv[1],"test2") == 0)) { 1199 1200 NanoVis::volume[1]->disable_data(); 1200 1201 NanoVis::volume[1]->disable(); 1201 return TCL_OK;1202 1202 } else { 1203 1203 Tcl_AppendResult(interp, "bad option \"", argv[1], "\": should be ", … … 1584 1584 } else { 1585 1585 Tcl_AppendResult(interp, "unknown option \"", argv[2], "\": ", 1586 1586 "should be visible or color", (char *)NULL); 1587 1587 return TCL_ERROR; 1588 1588 } … … 1671 1671 } else { 1672 1672 Tcl_AppendResult(interp, "bad option \"", argv[1], 1673 "\": should be data, linecontour, legend, or transfunc", (char*)NULL); 1673 "\": should be data, linecontour, legend, or transfunc", 1674 (char*)NULL); 1674 1675 return TCL_ERROR; 1675 1676 } … … 1771 1772 } 1772 1773 char c = argv[1][0]; 1773 if ((c == 'v') && (strcmp(argv[1], "visible") == 0)) {1774 if ((c == 'v') && (strcmp(argv[1], "visible") == 0)) { 1774 1775 int ivisible; 1775 1776
Note: See TracChangeset
for help on using the changeset viewer.