Changeset 2573 for trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
- Timestamp:
- Sep 22, 2011, 8:13:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r2514 r2573 19 19 #include "Trace.h" 20 20 #include "CmdProc.h" 21 #include "ReadBuffer.h" 21 22 #include "RpVtkRendererCmd.h" 22 23 #include "RpVtkRenderServer.h" … … 24 25 #include "PPMWriter.h" 25 26 #include "TGAWriter.h" 27 #ifdef USE_THREADS 28 #include "ResponseQueue.h" 29 #endif 26 30 27 31 using namespace Rappture::VtkVis; 32 33 static int lastCmdStatus; 34 35 #ifdef USE_THREADS 36 static void 37 QueueResponse(ClientData clientData, const void *bytes, size_t len, 38 Response::AllocationType allocType) 39 { 40 ResponseQueue *queue = (ResponseQueue *)clientData; 41 42 Response *response; 43 44 response = new Response(Response::DATA); 45 response->setMessage((unsigned char *)bytes, len, allocType); 46 queue->enqueue(response); 47 } 48 #else 28 49 29 50 static ssize_t … … 43 64 } 44 65 45 static size_t 46 SocketRead(void *bytes, size_t len) 47 { 48 #ifdef notdef 49 size_t ofs = 0; 50 ssize_t bytesRead = 0; 51 while ((bytesRead = read(g_fdIn, bytes + ofs, len - ofs)) > 0) { 52 ofs += bytesRead; 53 if (ofs == len) 54 break; 55 } 56 TRACE("bytesRead: %lu", ofs); 57 return ofs; 58 #else 59 size_t bytesRead = fread(bytes, 1, len, g_fIn); 60 TRACE("bytesRead: %lu", bytesRead); 61 return bytesRead; 62 #endif 66 #endif /*USE_THREADS*/ 67 68 static bool 69 SocketRead(char *bytes, size_t len) 70 { 71 ReadBuffer::BufferStatus status; 72 status = g_inBufPtr->followingData((unsigned char *)bytes, len); 73 TRACE("followingData status: %d", status); 74 return (status == ReadBuffer::OK); 63 75 } 64 76 … … 68 80 int result; 69 81 70 result = Tcl_Eval(interp, Tcl_DStringValue(dsPtr)); 82 TRACE("command: '%s'", Tcl_DStringValue(dsPtr)); 83 lastCmdStatus = TCL_OK; 84 result = Tcl_EvalEx(interp, Tcl_DStringValue(dsPtr), 85 Tcl_DStringLength(dsPtr), 86 TCL_EVAL_DIRECT | TCL_EVAL_GLOBAL); 71 87 Tcl_DStringSetLength(dsPtr, 0); 72 88 if (lastCmdStatus == TCL_BREAK) { 89 return TCL_BREAK; 90 } 91 lastCmdStatus = result; 73 92 return result; 74 93 } … … 380 399 pos[0], pos[1], pos[2], focalPt[0], focalPt[1], focalPt[2], viewUp[0], viewUp[1], viewUp[2]); 381 400 401 #ifdef USE_THREADS 402 QueueResponse(clientData, buf, strlen(buf), Response::VOLATILE); 403 #else 382 404 ssize_t bytesWritten = SocketWrite(buf, strlen(buf)); 383 384 405 if (bytesWritten < 0) { 385 406 return TCL_ERROR; 386 407 } 408 #endif 387 409 return TCL_OK; 388 410 } … … 1656 1678 } 1657 1679 char *data = (char *)malloc(nbytes); 1658 size_t bytesRead = SocketRead(data, nbytes); 1659 if (bytesRead < 0) { 1680 if (!SocketRead(data, nbytes)) { 1660 1681 free(data); 1661 1682 return TCL_ERROR; … … 1698 1719 1699 1720 char buf[256]; 1700 snprintf(buf, sizeof(buf), "nv>dataset scalar pixel %d %d %g %s\n", x, y, value, name); 1701 1702 ssize_t bytesWritten = SocketWrite(buf, strlen(buf)); 1721 int length; 1722 1723 length = snprintf(buf, sizeof(buf), "nv>dataset scalar pixel %d %d %g %s\n", 1724 x, y, value, name); 1725 1726 #ifdef USE_THREADS 1727 QueueResponse(clientData, buf, length, Response::VOLATILE); 1728 #else 1729 ssize_t bytesWritten = SocketWrite(buf, length); 1703 1730 1704 1731 if (bytesWritten < 0) { 1705 1732 return TCL_ERROR; 1706 1733 } 1734 #endif 1707 1735 return TCL_OK; 1708 1736 } … … 1726 1754 1727 1755 char buf[256]; 1728 snprintf(buf, sizeof(buf), "nv>dataset scalar world %g %g %g %g %s\n", x, y, z, value, name); 1729 1730 ssize_t bytesWritten = SocketWrite(buf, strlen(buf)); 1731 1756 int length; 1757 1758 length = snprintf(buf, sizeof(buf), 1759 "nv>dataset scalar world %g %g %g %g %s\n", 1760 x, y, z, value, name); 1761 1762 #ifdef USE_THREADS 1763 QueueResponse(clientData, buf, length, Response::VOLATILE); 1764 #else 1765 ssize_t bytesWritten = SocketWrite(buf, length); 1732 1766 if (bytesWritten < 0) { 1733 1767 return TCL_ERROR; 1734 1768 } 1769 #endif 1735 1770 return TCL_OK; 1736 1771 } … … 1773 1808 1774 1809 char buf[256]; 1775 snprintf(buf, sizeof(buf), "nv>dataset vector pixel %d %d %g %g %g %s\n", x, y, 1776 value[0], value[1], value[2], name); 1777 1778 ssize_t bytesWritten = SocketWrite(buf, strlen(buf)); 1810 int length; 1811 length = snprintf(buf, sizeof(buf), 1812 "nv>dataset vector pixel %d %d %g %g %g %s\n", 1813 x, y, 1814 value[0], value[1], value[2], name); 1815 1816 #ifdef USE_THREADS 1817 QueueResponse(clientData, buf, length, Response::VOLATILE); 1818 #else 1819 ssize_t bytesWritten = SocketWrite(buf, length); 1779 1820 1780 1821 if (bytesWritten < 0) { 1781 1822 return TCL_ERROR; 1782 1823 } 1824 #endif /*USE_THREADS*/ 1783 1825 return TCL_OK; 1784 1826 } … … 1802 1844 1803 1845 char buf[256]; 1804 snprintf(buf, sizeof(buf), "nv>dataset vector world %g %g %g %g %g %g %s\n", x, y, z, 1805 value[0], value[1], value[2], name); 1806 1807 ssize_t bytesWritten = SocketWrite(buf, strlen(buf)); 1846 int length; 1847 length = snprintf(buf, sizeof(buf), 1848 "nv>dataset vector world %g %g %g %g %g %g %s\n", 1849 x, y, z, 1850 value[0], value[1], value[2], name); 1851 #ifdef USE_THREADS 1852 QueueResponse(clientData, buf, length, Response::VOLATILE); 1853 #else 1854 ssize_t bytesWritten = SocketWrite(buf, length); 1808 1855 1809 1856 if (bytesWritten < 0) { 1810 1857 return TCL_ERROR; 1811 1858 } 1859 #endif /*USE_THREADS*/ 1812 1860 return TCL_OK; 1813 1861 } … … 1872 1920 oss << "}\n"; 1873 1921 len += 2; 1874 1875 size_t bytesWritten = SocketWrite(oss.str().c_str(), len); 1922 #ifdef USE_THREADS 1923 QueueResponse(clientData, oss.str().c_str(), len, Response::VOLATILE); 1924 #else 1925 ssize_t bytesWritten = SocketWrite(oss.str().c_str(), len); 1876 1926 1877 1927 if (bytesWritten < 0) { 1878 1928 return TCL_ERROR; 1879 1929 } 1930 #endif /*USE_THREADS*/ 1880 1931 return TCL_OK; 1881 1932 } … … 2921 2972 2922 2973 static int 2974 ImageFlushCmd(ClientData clientData, Tcl_Interp *interp, int objc, 2975 Tcl_Obj *const *objv) 2976 { 2977 lastCmdStatus = TCL_BREAK; 2978 return TCL_OK; 2979 } 2980 2981 static int 2923 2982 LegendCmd(ClientData clientData, Tcl_Interp *interp, int objc, 2924 2983 Tcl_Obj *const *objv) … … 2981 3040 2982 3041 #ifdef DEBUG 3042 # ifdef RENDER_TARGA 2983 3043 writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height, 2984 3044 TARGA_BYTES_PER_PIXEL); 3045 # else 3046 writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height, 3047 TARGA_BYTES_PER_PIXEL, true); 3048 # endif 2985 3049 #else 2986 3050 char cmd[256]; 2987 3051 snprintf(cmd, sizeof(cmd), "nv>legend {%s} {%s} %g %g", 2988 3052 colorMapName, title.c_str(), range[0], range[1]); 2989 #ifdef RENDER_TARGA 3053 3054 # ifdef USE_THREADS 3055 # ifdef RENDER_TARGA 3056 ResponseQueue *queue = (ResponseQueue *)clientData; 3057 queueTGA(queue, cmd, imgData->GetPointer(0), width, height, 3058 TARGA_BYTES_PER_PIXEL); 3059 # else 3060 ResponseQueue *queue = (ResponseQueue *)clientData; 3061 queuePPM(queue, cmd, imgData->GetPointer(0), width, height); 3062 # endif 3063 # else 3064 # ifdef RENDER_TARGA 2990 3065 writeTGA(g_fdOut, cmd, imgData->GetPointer(0), width, height, 2991 2992 # else3066 TARGA_BYTES_PER_PIXEL); 3067 # else 2993 3068 writePPM(g_fdOut, cmd, imgData->GetPointer(0), width, height); 2994 # endif2995 # endif2996 3069 # endif 3070 # endif // USE_THREADS 3071 #endif // DEBUG 2997 3072 return TCL_OK; 2998 3073 } … … 4684 4759 } 4685 4760 char *data = (char *)malloc(nbytes); 4686 size_t bytesRead = SocketRead(data, nbytes); 4687 if (bytesRead < 0) { 4761 if (!SocketRead(data, nbytes)) { 4688 4762 free(data); 4689 4763 return TCL_ERROR; … … 4733 4807 } 4734 4808 char *data = (char *)malloc(nbytes); 4735 size_t bytesRead = SocketRead(data, nbytes); 4736 if (bytesRead < 0) { 4809 if (!SocketRead(data, nbytes)) { 4737 4810 free(data); 4738 4811 return TCL_ERROR; … … 4973 5046 4974 5047 static Rappture::CmdSpec streamlinesOps[] = { 4975 {"add", 1, StreamlinesAddOp, 2, 3, "?dataSetName?"},4976 {"ccolor", 1, StreamlinesColorOp, 5, 6, "r g b ?dataSetName?"},4977 {"colormap", 7, StreamlinesColorMapOp, 3, 4, "colorMapName ?dataSetName?"},4978 {"colormode", 7, StreamlinesColorModeOp, 3, 4, "mode ?dataSetNme?"},4979 {"delete", 1, StreamlinesDeleteOp, 2, 3, "?dataSetName?"},5048 {"add", 1, StreamlinesAddOp, 2, 3, "?dataSetName?"}, 5049 {"ccolor", 1, StreamlinesColorOp, 5, 6, "r g b ?dataSetName?"}, 5050 {"colormap", 7, StreamlinesColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 5051 {"colormode", 7, StreamlinesColorModeOp, 3, 4, "mode ?dataSetNme?"}, 5052 {"delete", 1, StreamlinesDeleteOp, 2, 3, "?dataSetName?"}, 4980 5053 {"edges", 1, StreamlinesEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 4981 {"length", 2, StreamlinesLengthOp, 3, 4, "length ?dataSetName?"},4982 {"lighting", 3, StreamlinesLightingOp, 3, 4, "bool ?dataSetName?"},4983 {"linecolor", 5, StreamlinesLineColorOp, 5, 6, "r g b ?dataSetName?"},4984 {"lines", 5, StreamlinesLinesOp, 2, 3, "?dataSetName?"},4985 {"linewidth", 5, StreamlinesLineWidthOp, 3, 4, "width ?dataSetName?"},4986 {"opacity", 2, StreamlinesOpacityOp, 3, 4, "val ?dataSetName?"},4987 {"orient", 2, StreamlinesOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"},4988 {"pos", 1, StreamlinesPositionOp, 5, 6, "x y z ?dataSetName?"},4989 {"ribbons", 1, StreamlinesRibbonsOp, 4, 5, "width angle ?dataSetName?"},4990 {"scale", 2, StreamlinesScaleOp, 5, 6, "sx sy sz ?dataSetName?"},4991 {"seed", 2, StreamlinesSeedOp, 3, 14, "op params... ?dataSetName?"},4992 {"tubes", 1, StreamlinesTubesOp, 4, 5, "numSides radius ?dataSetName?"},4993 {"visible", 1, StreamlinesVisibleOp, 3, 4, "bool ?dataSetName?"}5054 {"length", 2, StreamlinesLengthOp, 3, 4, "length ?dataSetName?"}, 5055 {"lighting", 3, StreamlinesLightingOp, 3, 4, "bool ?dataSetName?"}, 5056 {"linecolor", 5, StreamlinesLineColorOp, 5, 6, "r g b ?dataSetName?"}, 5057 {"lines", 5, StreamlinesLinesOp, 2, 3, "?dataSetName?"}, 5058 {"linewidth", 5, StreamlinesLineWidthOp, 3, 4, "width ?dataSetName?"}, 5059 {"opacity", 2, StreamlinesOpacityOp, 3, 4, "val ?dataSetName?"}, 5060 {"orient", 2, StreamlinesOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"}, 5061 {"pos", 1, StreamlinesPositionOp, 5, 6, "x y z ?dataSetName?"}, 5062 {"ribbons", 1, StreamlinesRibbonsOp, 4, 5, "width angle ?dataSetName?"}, 5063 {"scale", 2, StreamlinesScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 5064 {"seed", 2, StreamlinesSeedOp, 3, 14, "op params... ?dataSetName?"}, 5065 {"tubes", 1, StreamlinesTubesOp, 4, 5, "numSides radius ?dataSetName?"}, 5066 {"visible", 1, StreamlinesVisibleOp, 3, 4, "bool ?dataSetName?"} 4994 5067 }; 4995 5068 static int nStreamlinesOps = NumCmdSpecs(streamlinesOps); … … 5203 5276 5204 5277 static Rappture::CmdSpec volumeShadingOps[] = { 5205 {"ambient", 1, VolumeShadingAmbientOp, 4, 5, "coeff ?dataSetName?"},5206 {"diffuse", 1, VolumeShadingDiffuseOp, 4, 5, "coeff ?dataSetName?"},5278 {"ambient", 1, VolumeShadingAmbientOp, 4, 5, "coeff ?dataSetName?"}, 5279 {"diffuse", 1, VolumeShadingDiffuseOp, 4, 5, "coeff ?dataSetName?"}, 5207 5280 {"specular", 1, VolumeShadingSpecularOp, 5, 6, "coeff power ?dataSetName?"} 5208 5281 }; … … 5241 5314 5242 5315 static Rappture::CmdSpec volumeOps[] = { 5243 {"add", 1, VolumeAddOp, 2, 3, "?dataSetName?"},5316 {"add", 1, VolumeAddOp, 2, 3, "?dataSetName?"}, 5244 5317 {"colormap", 1, VolumeColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 5245 {"delete", 1, VolumeDeleteOp, 2, 3, "?dataSetName?"},5318 {"delete", 1, VolumeDeleteOp, 2, 3, "?dataSetName?"}, 5246 5319 {"lighting", 1, VolumeLightingOp, 3, 4, "bool ?dataSetName?"}, 5247 {"opacity", 2, VolumeOpacityOp, 3, 4, "val ?dataSetName?"},5248 {"orient", 2, VolumeOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"},5320 {"opacity", 2, VolumeOpacityOp, 3, 4, "val ?dataSetName?"}, 5321 {"orient", 2, VolumeOrientOp, 6, 7, "qw qx qy qz ?dataSetName?"}, 5249 5322 {"pos", 1, VolumePositionOp, 5, 6, "x y z ?dataSetName?"}, 5250 {"scale", 2, VolumeScaleOp, 5, 6, "sx sy sz ?dataSetName?"},5251 {"shading", 2, VolumeShadingOp, 4, 6, "oper val ?dataSetName?"},5252 {"visible", 1, VolumeVisibleOp, 3, 4, "bool ?dataSetName?"}5323 {"scale", 2, VolumeScaleOp, 5, 6, "sx sy sz ?dataSetName?"}, 5324 {"shading", 2, VolumeShadingOp, 4, 6, "oper val ?dataSetName?"}, 5325 {"visible", 1, VolumeVisibleOp, 3, 4, "bool ?dataSetName?"} 5253 5326 }; 5254 5327 static int nVolumeOps = NumCmdSpecs(volumeOps); … … 5270 5343 /** 5271 5344 * \brief Execute commands from client in Tcl interpreter 5345 * 5346 * In this threaded model, the select call is for event compression. We 5347 * want to execute render server commands as long as they keep coming. 5348 * This lets us execute a stream of many commands but render once. This 5349 * benefits camera movements, screen resizing, and opacity changes 5350 * (using a slider on the client). The down side is you don't render 5351 * until there's a lull in the command stream. If the client needs an 5352 * image, it can issue an "imgflush" command. That breaks us out of the 5353 * read loop. 5272 5354 */ 5273 5355 int 5274 Rappture::VtkVis::processCommands(Tcl_Interp *interp, FILE *fin, FILE *fout) 5275 { 5276 Tcl_DString cmdbuffer; 5277 Tcl_DStringInit(&cmdbuffer); 5278 5279 int fdIn = fileno(fin); 5280 int fdOut = fileno(fout); 5281 int flags = fcntl(fdIn, F_GETFL, 0); 5282 fcntl(fdIn, F_SETFL, flags & ~O_NONBLOCK); 5283 5356 Rappture::VtkVis::processCommands(Tcl_Interp *interp, ReadBuffer *inBufPtr, 5357 int fdOut) 5358 { 5284 5359 int status = TCL_OK; 5285 int nCommands = 0; 5286 bool isComplete = false; 5287 while ((!feof(fin)) && (status == TCL_OK)) { 5288 while (!feof(fin)) { 5289 int c = fgetc(fin); 5290 if (c <= 0) { 5291 if (errno == EWOULDBLOCK) { 5292 break; 5293 } 5294 if (feof(fin)) 5295 return 1; 5296 else 5297 return c; 5360 5361 Tcl_DString command; 5362 Tcl_DStringInit(&command); 5363 fd_set readFds; 5364 struct timeval tv, *tvPtr; 5365 5366 FD_ZERO(&readFds); 5367 FD_SET(inBufPtr->file(), &readFds); 5368 tvPtr = NULL; /* Wait for the first read. This is so 5369 * that we don't spin when no data is 5370 * available. */ 5371 while (inBufPtr->isLineAvailable() || 5372 (select(1, &readFds, NULL, NULL, tvPtr) > 0)) { 5373 size_t numBytes; 5374 unsigned char *buffer; 5375 5376 /* A short read is treated as an error here because we assume that we 5377 * will always get commands line by line. */ 5378 if (inBufPtr->getLine(&numBytes, &buffer) != ReadBuffer::OK) { 5379 /* Terminate the server if we can't communicate with the client 5380 * anymore. */ 5381 if (inBufPtr->status() == ReadBuffer::ENDFILE) { 5382 TRACE("Exiting server on EOF from client"); 5383 return -1; 5384 } else { 5385 ERROR("Exiting server, failed to read from client: %s", 5386 strerror(errno)); 5387 return -1; 5298 5388 } 5299 char ch = (char)c; 5300 Tcl_DStringAppend(&cmdbuffer, &ch, 1); 5301 if (ch == '\n') { 5302 isComplete = Tcl_CommandComplete(Tcl_DStringValue(&cmdbuffer)); 5303 if (isComplete) { 5304 break; 5305 } 5389 } 5390 Tcl_DStringAppend(&command, (char *)buffer, numBytes); 5391 if (Tcl_CommandComplete(Tcl_DStringValue(&command))) { 5392 status = ExecuteCommand(interp, &command); 5393 if (status == TCL_BREAK) { 5394 return 1; /* This was caused by a "imgflush" 5395 * command. Break out of the read loop 5396 * and allow a new image to be 5397 * rendered. */ 5306 5398 } 5307 5399 } 5308 // no command? then we're done for now 5309 if (Tcl_DStringLength(&cmdbuffer) == 0) { 5310 break; 5311 } 5312 if (isComplete) { 5313 // back to original flags during command evaluation... 5314 fcntl(fdIn, F_SETFL, flags & ~O_NONBLOCK); 5315 TRACE("command: '%s'", Tcl_DStringValue(&cmdbuffer)); 5316 status = ExecuteCommand(interp, &cmdbuffer); 5317 // non-blocking for next read -- we might not get anything 5318 fcntl(fdIn, F_SETFL, flags | O_NONBLOCK); 5319 isComplete = false; 5320 nCommands++; 5321 } 5322 } 5323 fcntl(fdIn, F_SETFL, flags); 5400 tv.tv_sec = tv.tv_usec = 0L; /* On successive reads, we break out 5401 * if no data is available. */ 5402 FD_SET(inBufPtr->file(), &readFds); 5403 tvPtr = &tv; 5404 } 5324 5405 5325 5406 if (status != TCL_OK) { … … 5328 5409 5329 5410 string = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); 5330 TRACE(" ERROR errorInfo=(%s)", string);5331 5411 TRACE("%s: status=%d ERROR errorInfo=(%s)", Tcl_DStringValue(&command), 5412 status, string); 5332 5413 nBytes = strlen(string); 5333 5414 struct iovec iov[3]; … … 5339 5420 iov[2].iov_len = strlen((char *)iov[2].iov_base); 5340 5421 if (writev(fdOut, iov, 3) < 0) { 5341 ERROR("write failed: %s", strerror(errno)); 5422 ERROR("write failed: %s", strerror(errno)); 5423 return -1; 5342 5424 } 5343 5425 return 0; … … 5352 5434 * \return The initialized Tcl interpreter 5353 5435 */ 5354 Tcl_Interp * 5355 Rappture::VtkVis::initTcl() 5356 { 5357 Tcl_Interp *interp; 5358 interp = Tcl_CreateInterp(); 5359 5436 void 5437 Rappture::VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData) 5438 { 5360 5439 Tcl_MakeSafe(interp); 5361 5362 Tcl_CreateObjCommand(interp, "axis", AxisCmd, NULL, NULL); 5363 Tcl_CreateObjCommand(interp, "camera", CameraCmd, NULL, NULL); 5364 Tcl_CreateObjCommand(interp, "colormap", ColorMapCmd, NULL, NULL); 5365 Tcl_CreateObjCommand(interp, "contour2d", Contour2DCmd, NULL, NULL); 5366 Tcl_CreateObjCommand(interp, "contour3d", Contour3DCmd, NULL, NULL); 5367 Tcl_CreateObjCommand(interp, "cutplane", CutplaneCmd, NULL, NULL); 5368 Tcl_CreateObjCommand(interp, "dataset", DataSetCmd, NULL, NULL); 5369 Tcl_CreateObjCommand(interp, "glyphs", GlyphsCmd, NULL, NULL); 5370 Tcl_CreateObjCommand(interp, "heightmap", HeightMapCmd, NULL, NULL); 5371 Tcl_CreateObjCommand(interp, "legend", LegendCmd, NULL, NULL); 5372 Tcl_CreateObjCommand(interp, "lic", LICCmd, NULL, NULL); 5373 Tcl_CreateObjCommand(interp, "molecule", MoleculeCmd, NULL, NULL); 5374 Tcl_CreateObjCommand(interp, "polydata", PolyDataCmd, NULL, NULL); 5375 Tcl_CreateObjCommand(interp, "pseudocolor", PseudoColorCmd, NULL, NULL); 5376 Tcl_CreateObjCommand(interp, "renderer", RendererCmd, NULL, NULL); 5377 Tcl_CreateObjCommand(interp, "screen", ScreenCmd, NULL, NULL); 5378 Tcl_CreateObjCommand(interp, "streamlines", StreamlinesCmd, NULL, NULL); 5379 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, NULL, NULL); 5380 return interp; 5440 Tcl_CreateObjCommand(interp, "axis", AxisCmd, clientData, NULL); 5441 Tcl_CreateObjCommand(interp, "camera", CameraCmd, clientData, NULL); 5442 Tcl_CreateObjCommand(interp, "colormap", ColorMapCmd, clientData, NULL); 5443 Tcl_CreateObjCommand(interp, "contour2d", Contour2DCmd, clientData, NULL); 5444 Tcl_CreateObjCommand(interp, "contour3d", Contour3DCmd, clientData, NULL); 5445 Tcl_CreateObjCommand(interp, "cutplane", CutplaneCmd, clientData, NULL); 5446 Tcl_CreateObjCommand(interp, "dataset", DataSetCmd, clientData, NULL); 5447 Tcl_CreateObjCommand(interp, "glyphs", GlyphsCmd, clientData, NULL); 5448 Tcl_CreateObjCommand(interp, "heightmap", HeightMapCmd, clientData, NULL); 5449 Tcl_CreateObjCommand(interp, "imgflush", ImageFlushCmd, clientData, NULL); 5450 Tcl_CreateObjCommand(interp, "legend", LegendCmd, clientData, NULL); 5451 Tcl_CreateObjCommand(interp, "lic", LICCmd, clientData, NULL); 5452 Tcl_CreateObjCommand(interp, "molecule", MoleculeCmd, clientData, NULL); 5453 Tcl_CreateObjCommand(interp, "polydata", PolyDataCmd, clientData, NULL); 5454 Tcl_CreateObjCommand(interp, "pseudocolor", PseudoColorCmd, clientData, NULL); 5455 Tcl_CreateObjCommand(interp, "renderer", RendererCmd, clientData, NULL); 5456 Tcl_CreateObjCommand(interp, "screen", ScreenCmd, clientData, NULL); 5457 Tcl_CreateObjCommand(interp, "streamlines", StreamlinesCmd, clientData, NULL); 5458 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, clientData, NULL); 5381 5459 } 5382 5460 5383 5461 /** 5384 5462 * \brief Delete Tcl commands and interpreter 5385 *5386 5463 */ 5387 5464 void Rappture::VtkVis::exitTcl(Tcl_Interp *interp) … … 5397 5474 Tcl_DeleteCommand(interp, "glyphs"); 5398 5475 Tcl_DeleteCommand(interp, "heightmap"); 5476 Tcl_DeleteCommand(interp, "imgflush"); 5399 5477 Tcl_DeleteCommand(interp, "legend"); 5400 5478 Tcl_DeleteCommand(interp, "lic");
Note: See TracChangeset
for help on using the changeset viewer.