Changeset 1295 for trunk/packages/vizservers/nanovis/Command.cpp
- Timestamp:
- Mar 6, 2009, 9:27:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r1291 r1295 1848 1848 } 1849 1849 NanoVis::initParticle(); 1850 1851 // send the movie back to the client 1852 // FIXME: find a way to get the data from the movie object as a char* 1853 Rappture::Buffer data; 1854 data.load(fileName); 1855 char command[512]; 1856 sprintf(command,"nv>file -bytes %lu\n",data.size()); 1857 NanoVis::sendDataToClient(command,data.bytes(),data.size()); 1858 1850 1859 return TCL_OK; 1851 1860 } … … 1936 1945 1937 1946 static int 1947 FlowPlayOp(ClientData cdata, Tcl_Interp *interp, int objc, 1948 Tcl_Obj *const *objv) 1949 { 1950 if (NanoVis::licRenderer && 1951 !NanoVis::licRenderer->isActivated()) { 1952 NanoVis::licRenderer->activate(); 1953 } 1954 if (NanoVis::particleRenderer && 1955 !NanoVis::particleRenderer->isActivated()) { 1956 NanoVis::particleRenderer->activate(); 1957 } 1958 1959 Trace("sending flow playback frame\n"); 1960 1961 // Generate the latest frame and send it back to the client 1962 if (NanoVis::licRenderer && 1963 NanoVis::licRenderer->isActivated()) { 1964 NanoVis::licRenderer->convolve(); 1965 } 1966 if (NanoVis::particleRenderer && 1967 NanoVis::particleRenderer->isActivated()) { 1968 NanoVis::particleRenderer->advect(); 1969 } 1970 NanoVis::offscreen_buffer_capture(); //enable offscreen render 1971 NanoVis::display(); 1972 1973 NanoVis::read_screen(); 1974 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1975 1976 // NanoVis::bmp_write_to_file(frame_count, fileName); 1977 1978 Trace("FLOW end\n"); 1979 return TCL_OK; 1980 } 1981 1982 static int 1938 1983 FlowResetOp(ClientData cdata, Tcl_Interp *interp, int objc, 1939 1984 Tcl_Obj *const *objv) … … 1973 2018 {"data", 1, FlowDataOp, 3, 0, "oper ?args?",}, 1974 2019 {"lic", 1, FlowLicOp, 3, 3, "on|off",}, 1975 {"particle", 1, FlowParticleOp, 3, 0, "oper ?args?",}, 2020 {"particle", 2, FlowParticleOp, 3, 0, "oper ?args?",}, 2021 {"play", 2, FlowPlayOp, 2, 2, "",}, 1976 2022 {"reset", 1, FlowResetOp, 2, 2, "",}, 1977 2023 {"vectorid", 1, FlowVectorIdOp, 3, 3, "index",}, … … 1983 2029 * CLIENT COMMAND: 1984 2030 * flow data follows <value> 1985 * flow capture 2031 * flow capture frames filename 1986 2032 * flow lic on|off 1987 2033 * flow particle visible on|off 1988 2034 * flow particle slice <volumeId> 1989 2035 * flow particle slicepos <value> 2036 * flow play 1990 2037 * flow reset 1991 2038 * flow vectorid <volumeId>
Note: See TracChangeset
for help on using the changeset viewer.