Changeset 1497 for trunk/packages/vizservers/nanovis/FlowCmd.cpp
- Timestamp:
- Jun 9, 2009, 5:25:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/FlowCmd.cpp
r1493 r1497 87 87 {Rappture::SWITCH_CUSTOM, "-position", "number", 88 88 offsetof(FlowParticlesValues, position), 0, 0, &positionSwitch}, 89 {Rappture::SWITCH_FLOAT, "-size", "float", 90 offsetof(FlowParticlesValues, particleSize), 0}, 89 91 {Rappture::SWITCH_END} 90 92 }; … … 155 157 _rendererPtr->setColor(Vector4(_sv.color.r, _sv.color.g, _sv.color.b, 156 158 _sv.color.a)); 159 _rendererPtr->particleSize(_sv.particleSize); 157 160 _rendererPtr->setAxis(_sv.position.axis); 158 161 _rendererPtr->active(!_sv.isHidden); … … 1908 1911 Trace("FLOW started\n"); 1909 1912 1910 Rappture::Outcome result;1913 Rappture::Outcome context; 1911 1914 Rappture::AVTranslate movie(width, height, frameRate, bitRate); 1912 1915 … … 1916 1919 } 1917 1920 1918 movie.init( result, fileName);1921 movie.init(context, fileName); 1919 1922 1920 1923 for (int i = 0; i < numFrames; i++) { … … 1931 1934 // This is done before bmp_write_to_file because bmp_write_to_file 1932 1935 // turns rgb data to bgr 1933 movie.append( result, NanoVis::screen_buffer, pad);1936 movie.append(context, NanoVis::screen_buffer, pad); 1934 1937 // NanoVis::bmp_write_to_file(frame_count, fileName); 1935 1938 } 1936 1939 1937 movie.done( result);1940 movie.done(context); 1938 1941 Trace("FLOW end\n"); 1939 1942 … … 1947 1950 // FIXME: find a way to get the data from the movie object as a void* 1948 1951 Rappture::Buffer data; 1949 if (!data.load( result, fileName)) {1952 if (!data.load(context, fileName)) { 1950 1953 Tcl_AppendResult(interp, "can't load data from temporary movie file \"", 1951 fileName, "\": ", result.remark(), (char *)NULL);1954 fileName, "\": ", context.remark(), (char *)NULL); 1952 1955 return TCL_ERROR; 1953 1956 } 1954 1957 // Build the command string for the client. 1955 1958 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])); 1958 1961 1959 1962 NanoVis::sendDataToClient(command, data.bytes(), data.size()); … … 1982 1985 {"next", 2, FlowNextOp, 2, 2, "",}, 1983 1986 {"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",}, 1986 1989 }; 1987 1990 static int nFlowCmdOps = NumCmdSpecs(flowCmdOps);
Note: See TracChangeset
for help on using the changeset viewer.