Ignore:
Timestamp:
Jun 9, 2009 5:25:13 PM (15 years ago)
Author:
gah
Message:

added particle size option, movie token for flowvis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r1493 r1497  
    8787    {Rappture::SWITCH_CUSTOM, "-position", "number",
    8888        offsetof(FlowParticlesValues, position), 0, 0, &positionSwitch},
     89    {Rappture::SWITCH_FLOAT, "-size", "float",
     90        offsetof(FlowParticlesValues, particleSize), 0},
    8991    {Rappture::SWITCH_END}
    9092};
     
    155157    _rendererPtr->setColor(Vector4(_sv.color.r, _sv.color.g, _sv.color.b,
    156158                _sv.color.a));
     159    _rendererPtr->particleSize(_sv.particleSize);
    157160    _rendererPtr->setAxis(_sv.position.axis);
    158161    _rendererPtr->active(!_sv.isHidden);
     
    19081911    Trace("FLOW started\n");
    19091912
    1910     Rappture::Outcome result;
     1913    Rappture::Outcome context;
    19111914    Rappture::AVTranslate movie(width, height, frameRate, bitRate);
    19121915
     
    19161919    }
    19171920
    1918     movie.init(result, fileName);
     1921    movie.init(context, fileName);
    19191922
    19201923    for (int i = 0; i < numFrames; i++) {
     
    19311934        // This is done before bmp_write_to_file because bmp_write_to_file
    19321935        // turns rgb data to bgr
    1933         movie.append(result, NanoVis::screen_buffer, pad);
     1936        movie.append(context, NanoVis::screen_buffer, pad);
    19341937        // NanoVis::bmp_write_to_file(frame_count, fileName);
    19351938    }
    19361939
    1937     movie.done(result);
     1940    movie.done(context);
    19381941    Trace("FLOW end\n");
    19391942
     
    19471950    // FIXME: find a way to get the data from the movie object as a void*
    19481951    Rappture::Buffer data;
    1949     if (!data.load(result, fileName)) {
     1952    if (!data.load(context, fileName)) {
    19501953        Tcl_AppendResult(interp, "can't load data from temporary movie file \"",
    1951                 fileName, "\": ", result.remark(), (char *)NULL);
     1954                fileName, "\": ", context.remark(), (char *)NULL);
    19521955        return TCL_ERROR;
    19531956    }
    19541957    // Build the command string for the client.
    19551958    char command[200];
    1956     sprintf(command,"nv>image -bytes %lu -type movie -token token\n",
    1957             (unsigned long)data.size());
     1959    sprintf(command,"nv>image -bytes %lu -type movie -token \"%s\"\n",
     1960            (unsigned long)data.size(), Tcl_GetString(objv[7]));
    19581961
    19591962    NanoVis::sendDataToClient(command, data.bytes(), data.size());
     
    19821985    {"next",     2, FlowNextOp,    2, 2, "",},
    19831986    {"reset",    1, FlowResetOp,   2, 2, "",},
    1984     {"video",    1, FlowVideoOp,   7, 7,       
    1985         "width height numFrames frameRate bitRate ",},
     1987    {"video",    1, FlowVideoOp,   8, 8,       
     1988        "width height numFrames frameRate bitRate token",},
    19861989};
    19871990static int nFlowCmdOps = NumCmdSpecs(flowCmdOps);
Note: See TracChangeset for help on using the changeset viewer.