Ignore:
Timestamp:
Sep 22, 2011, 8:13:47 PM (13 years ago)
Author:
ldelgass
Message:

Merge vtkvis_threaded branch to trunk. (Threading off by default in Makefile)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp

    r2514 r2573  
    1919#include "Trace.h"
    2020#include "CmdProc.h"
     21#include "ReadBuffer.h"
    2122#include "RpVtkRendererCmd.h"
    2223#include "RpVtkRenderServer.h"
     
    2425#include "PPMWriter.h"
    2526#include "TGAWriter.h"
     27#ifdef USE_THREADS
     28#include "ResponseQueue.h"
     29#endif
    2630
    2731using namespace Rappture::VtkVis;
     32
     33static int lastCmdStatus;
     34
     35#ifdef USE_THREADS
     36static void
     37QueueResponse(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
    2849
    2950static ssize_t
     
    4364}
    4465
    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
     68static bool
     69SocketRead(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);
    6375}
    6476
     
    6880    int result;
    6981
    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);
    7187    Tcl_DStringSetLength(dsPtr, 0);
    72 
     88    if (lastCmdStatus == TCL_BREAK) {
     89        return TCL_BREAK;
     90    }
     91    lastCmdStatus = result;
    7392    return result;
    7493}
     
    380399             pos[0], pos[1], pos[2], focalPt[0], focalPt[1], focalPt[2], viewUp[0], viewUp[1], viewUp[2]);
    381400
     401#ifdef USE_THREADS
     402    QueueResponse(clientData, buf, strlen(buf), Response::VOLATILE);
     403#else
    382404    ssize_t bytesWritten = SocketWrite(buf, strlen(buf));
    383 
    384405    if (bytesWritten < 0) {
    385406        return TCL_ERROR;
    386407    }
     408#endif
    387409    return TCL_OK;
    388410}
     
    16561678    }
    16571679    char *data = (char *)malloc(nbytes);
    1658     size_t bytesRead = SocketRead(data, nbytes);
    1659     if (bytesRead < 0) {
     1680    if (!SocketRead(data, nbytes)) {
    16601681        free(data);
    16611682        return TCL_ERROR;
     
    16981719
    16991720    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);
    17031730
    17041731    if (bytesWritten < 0) {
    17051732        return TCL_ERROR;
    17061733    }
     1734#endif
    17071735    return TCL_OK;
    17081736}
     
    17261754
    17271755    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);
    17321766    if (bytesWritten < 0) {
    17331767        return TCL_ERROR;
    17341768    }
     1769#endif
    17351770    return TCL_OK;
    17361771}
     
    17731808
    17741809    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);
    17791820
    17801821    if (bytesWritten < 0) {
    17811822        return TCL_ERROR;
    17821823    }
     1824#endif /*USE_THREADS*/
    17831825    return TCL_OK;
    17841826}
     
    18021844
    18031845    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);
    18081855
    18091856    if (bytesWritten < 0) {
    18101857        return TCL_ERROR;
    18111858    }
     1859#endif /*USE_THREADS*/
    18121860    return TCL_OK;
    18131861}
     
    18721920    oss << "}\n";
    18731921    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);
    18761926
    18771927    if (bytesWritten < 0) {
    18781928        return TCL_ERROR;
    18791929    }
     1930#endif /*USE_THREADS*/
    18801931    return TCL_OK;
    18811932}
     
    29212972
    29222973static int
     2974ImageFlushCmd(ClientData clientData, Tcl_Interp *interp, int objc,
     2975             Tcl_Obj *const *objv)
     2976{
     2977    lastCmdStatus = TCL_BREAK;
     2978    return TCL_OK;
     2979}
     2980
     2981static int
    29232982LegendCmd(ClientData clientData, Tcl_Interp *interp, int objc,
    29242983          Tcl_Obj *const *objv)
     
    29813040
    29823041#ifdef DEBUG
     3042# ifdef RENDER_TARGA
    29833043    writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height,
    29843044                 TARGA_BYTES_PER_PIXEL);
     3045# else
     3046    writeTGAFile("/tmp/legend.tga", imgData->GetPointer(0), width, height,
     3047                 TARGA_BYTES_PER_PIXEL, true);
     3048# endif
    29853049#else
    29863050    char cmd[256];
    29873051    snprintf(cmd, sizeof(cmd), "nv>legend {%s} {%s} %g %g",
    29883052             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
    29903065    writeTGA(g_fdOut, cmd, imgData->GetPointer(0), width, height,
    2991                  TARGA_BYTES_PER_PIXEL);
    2992 #else
     3066             TARGA_BYTES_PER_PIXEL);
     3067#  else
    29933068    writePPM(g_fdOut, cmd, imgData->GetPointer(0), width, height);
    2994 #endif
    2995 #endif
    2996 
     3069#  endif
     3070# endif // USE_THREADS
     3071#endif // DEBUG
    29973072    return TCL_OK;
    29983073}
     
    46844759    }
    46854760    char *data = (char *)malloc(nbytes);
    4686     size_t bytesRead = SocketRead(data, nbytes);
    4687     if (bytesRead < 0) {
     4761    if (!SocketRead(data, nbytes)) {
    46884762        free(data);
    46894763        return TCL_ERROR;
     
    47334807    }
    47344808    char *data = (char *)malloc(nbytes);
    4735     size_t bytesRead = SocketRead(data, nbytes);
    4736     if (bytesRead < 0) {
     4809    if (!SocketRead(data, nbytes)) {
    47374810        free(data);
    47384811        return TCL_ERROR;
     
    49735046
    49745047static 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?"},
    49805053    {"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?"}
    49945067};
    49955068static int nStreamlinesOps = NumCmdSpecs(streamlinesOps);
     
    52035276
    52045277static 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?"},
    52075280    {"specular", 1, VolumeShadingSpecularOp, 5, 6, "coeff power ?dataSetName?"}
    52085281};
     
    52415314
    52425315static Rappture::CmdSpec volumeOps[] = {
    5243     {"add",      1, VolumeAddOp, 2, 3, "?dataSetName?"},
     5316    {"add",      1, VolumeAddOp,      2, 3, "?dataSetName?"},
    52445317    {"colormap", 1, VolumeColorMapOp, 3, 4, "colorMapName ?dataSetName?"},
    5245     {"delete",   1, VolumeDeleteOp, 2, 3, "?dataSetName?"},
     5318    {"delete",   1, VolumeDeleteOp,   2, 3, "?dataSetName?"},
    52465319    {"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?"},
    52495322    {"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?"}
    52535326};
    52545327static int nVolumeOps = NumCmdSpecs(volumeOps);
     
    52705343/**
    52715344 * \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.
    52725354 */
    52735355int
    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 
     5356Rappture::VtkVis::processCommands(Tcl_Interp *interp, ReadBuffer *inBufPtr,
     5357                                  int fdOut)
     5358{
    52845359    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;
    52985388            }
    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. */
    53065398            }
    53075399        }
    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    }
    53245405
    53255406    if (status != TCL_OK) {
     
    53285409
    53295410        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);
    53325413        nBytes = strlen(string);
    53335414        struct iovec iov[3];
     
    53395420        iov[2].iov_len = strlen((char *)iov[2].iov_base);
    53405421        if (writev(fdOut, iov, 3) < 0) {
    5341             ERROR("write failed: %s", strerror(errno));
     5422            ERROR("write failed: %s", strerror(errno));
     5423            return -1;
    53425424        }
    53435425        return 0;
     
    53525434 * \return The initialized Tcl interpreter
    53535435 */
    5354 Tcl_Interp *
    5355 Rappture::VtkVis::initTcl()
    5356 {
    5357     Tcl_Interp *interp;
    5358     interp = Tcl_CreateInterp();
    5359 
     5436void
     5437Rappture::VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData)
     5438{
    53605439    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);
    53815459}
    53825460
    53835461/**
    53845462 * \brief Delete Tcl commands and interpreter
    5385  *
    53865463 */
    53875464void Rappture::VtkVis::exitTcl(Tcl_Interp *interp)
     
    53975474    Tcl_DeleteCommand(interp, "glyphs");
    53985475    Tcl_DeleteCommand(interp, "heightmap");
     5476    Tcl_DeleteCommand(interp, "imgflush");
    53995477    Tcl_DeleteCommand(interp, "legend");
    54005478    Tcl_DeleteCommand(interp, "lic");
Note: See TracChangeset for help on using the changeset viewer.