Changeset 2877 for trunk/packages/vizservers/nanovis/FlowCmd.cpp
- Timestamp:
- Mar 23, 2012 1:31:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/FlowCmd.cpp
r2875 r2877 34 34 #include "Unirect.h" 35 35 #include "VelocityArrowsSlice.h" 36 #include "Volume.h" 36 37 37 38 #define RELPOS 0 … … 294 295 memset(&_sv, 0, sizeof(FlowValues)); 295 296 _sv.sliceVisible = 1; 296 _sv.tfPtr = NanoVis::get _transfunc("default");297 _sv.tfPtr = NanoVis::getTransfunc("default"); 297 298 298 299 Tcl_InitHashTable(&_particlesTable, TCL_STRING_KEYS); … … 317 318 } 318 319 if (_volPtr != NULL) { 319 NanoVis::remove _volume(_volPtr);320 NanoVis::removeVolume(_volPtr); 320 321 _volPtr = NULL; 321 322 } … … 530 531 if (_volPtr != NULL) { 531 532 TRACE("from ScaleVectorField volId=%s\n", _volPtr->name()); 532 NanoVis::remove _volume(_volPtr);533 NanoVis::removeVolume(_volPtr); 533 534 _volPtr = NULL; 534 535 } … … 575 576 NanoVis::licRenderer-> 576 577 setVectorField(_volPtr->id, loc, 577 1.0f / _volPtr->aspect _ratio_width,578 1.0f / _volPtr->aspect _ratio_height,579 1.0f / _volPtr->aspect _ratio_depth,578 1.0f / _volPtr->aspectRatioWidth, 579 1.0f / _volPtr->aspectRatioHeight, 580 1.0f / _volPtr->aspectRatioDepth, 580 581 _volPtr->wAxis.max()); 581 582 SetCurrentPosition(); … … 589 590 //*(volPtr->get_location()), 590 591 1.0f, 591 _volPtr->aspect _ratio_height / _volPtr->aspect_ratio_width,592 _volPtr->aspect _ratio_depth / _volPtr->aspect_ratio_width592 _volPtr->aspectRatioHeight / _volPtr->aspectRatioWidth, 593 _volPtr->aspectRatioDepth / _volPtr->aspectRatioWidth 593 594 //,volPtr->wAxis.max() 594 595 ); … … 657 658 Volume *volPtr; 658 659 659 volPtr = NanoVis::load _volume(_name, _dataPtr->xNum(), _dataPtr->yNum(),660 661 660 volPtr = NanoVis::loadVolume(_name, _dataPtr->xNum(), _dataPtr->yNum(), 661 _dataPtr->zNum(), 4, data, 662 NanoVis::magMin, NanoVis::magMax, 0); 662 663 volPtr->xAxis.SetRange(_dataPtr->xMin(), _dataPtr->xMax()); 663 664 volPtr->yAxis.SetRange(_dataPtr->yMin(), _dataPtr->yMax()); … … 672 673 NanoVis::magMin, NanoVis::magMax); 673 674 volPtr->setPhysicalBBox(physicalMin, physicalMax); 674 //volPtr-> set_n_slice(256 - _volIndex);675 // volPtr->set_n_slice(512- _volIndex);676 //volPtr->n _slices(256-n);675 //volPtr->numSlices(256 - _volIndex); 676 //volPtr->numSlices(512 - _volIndex); 677 //volPtr->numSlices(256 - n); 677 678 // TBD.. 678 679 /* Don't set the slice number until we're are about to render the 679 680 volume. */ 680 volPtr->disable _cutplane(0);681 volPtr->disable _cutplane(1);682 volPtr->disable _cutplane(2);681 volPtr->disableCutplane(0); 682 volPtr->disableCutplane(1); 683 volPtr->disableCutplane(2); 683 684 684 685 /* Initialize the volume with the previously configured values. */ 685 686 volPtr->transferFunction(_sv.tfPtr); 686 volPtr->data _enabled(_sv.showVolume);687 volPtr->dataEnabled(_sv.showVolume); 687 688 volPtr->outline(_sv.showOutline); 688 volPtr->opacity _scale(_sv.opacity);689 volPtr->opacityScale(_sv.opacity); 689 690 volPtr->specular(_sv.specular); 690 691 volPtr->diffuse(_sv.diffuse); … … 695 696 float dz0 = -0.5*volPtr->depth/volPtr->width; 696 697 volPtr->location(Vector3(dx0, dy0, dz0)); 697 Volume::update _pending = true;698 Volume::updatePending = true; 698 699 return volPtr; 699 700 } … … 765 766 } 766 767 flowPtr->data(dataPtr); 767 NanoVis:: EventuallyRedraw(NanoVis::MAP_FLOWS);768 NanoVis::eventuallyRedraw(NanoVis::MAP_FLOWS); 768 769 return TCL_OK; 769 770 } … … 857 858 assert(nWritten == (ssize_t)strlen(info)); 858 859 } 859 NanoVis:: EventuallyRedraw(NanoVis::MAP_FLOWS);860 NanoVis::eventuallyRedraw(NanoVis::MAP_FLOWS); 860 861 return TCL_OK; 861 862 } … … 1331 1332 TransferFunction **funcPtrPtr = (TransferFunction **)(record + offset); 1332 1333 TransferFunction *funcPtr; 1333 funcPtr = NanoVis::get _transfunc(Tcl_GetString(objPtr));1334 funcPtr = NanoVis::getTransfunc(Tcl_GetString(objPtr)); 1334 1335 if (funcPtr == NULL) { 1335 1336 Tcl_AppendResult(interp, "transfer function \"", Tcl_GetString(objPtr), … … 1350 1351 return TCL_ERROR; 1351 1352 } 1352 NanoVis:: EventuallyRedraw(NanoVis::MAP_FLOWS);1353 NanoVis::eventuallyRedraw(NanoVis::MAP_FLOWS); 1353 1354 return TCL_OK; 1354 1355 } … … 1372 1373 } 1373 1374 particlesPtr->Configure(); 1374 NanoVis:: EventuallyRedraw();1375 NanoVis::eventuallyRedraw(); 1375 1376 Tcl_SetObjResult(interp, objv[3]); 1376 1377 return TCL_OK; … … 1391 1392 } 1392 1393 particlesPtr->Configure(); 1393 NanoVis:: EventuallyRedraw(NanoVis::MAP_FLOWS);1394 NanoVis::eventuallyRedraw(NanoVis::MAP_FLOWS); 1394 1395 return TCL_OK; 1395 1396 } … … 1408 1409 } 1409 1410 } 1410 NanoVis:: EventuallyRedraw();1411 NanoVis::eventuallyRedraw(); 1411 1412 return TCL_OK; 1412 1413 } … … 1486 1487 return TCL_ERROR; 1487 1488 } 1488 NanoVis:: EventuallyRedraw();1489 NanoVis::eventuallyRedraw(); 1489 1490 Tcl_SetObjResult(interp, objv[3]); 1490 1491 return TCL_OK; … … 1504 1505 } 1505 1506 } 1506 NanoVis:: EventuallyRedraw();1507 NanoVis::eventuallyRedraw(); 1507 1508 return TCL_OK; 1508 1509 } … … 1541 1542 return TCL_ERROR; 1542 1543 } 1543 NanoVis:: EventuallyRedraw();1544 NanoVis::eventuallyRedraw(); 1544 1545 return TCL_OK; 1545 1546 } … … 1613 1614 NanoVis::MapFlows(); 1614 1615 } 1615 NanoVis::render _legend(tf, NanoVis::magMin, NanoVis::magMax, w, h, label);1616 NanoVis::renderLegend(tf, NanoVis::magMin, NanoVis::magMax, w, h, label); 1616 1617 return TCL_OK; 1617 1618 } … … 1681 1682 } 1682 1683 Tcl_SetObjResult(interp, objv[2]); 1683 NanoVis:: EventuallyRedraw();1684 NanoVis::eventuallyRedraw(); 1684 1685 return TCL_OK; 1685 1686 } … … 1699 1700 Tcl_DeleteCommand(interp, flowPtr->name()); 1700 1701 } 1701 NanoVis:: EventuallyRedraw(NanoVis::MAP_FLOWS);1702 NanoVis::eventuallyRedraw(NanoVis::MAP_FLOWS); 1702 1703 return TCL_OK; 1703 1704 } … … 1746 1747 NanoVis::AdvectFlows(); 1747 1748 } 1748 NanoVis:: EventuallyRedraw();1749 NanoVis::eventuallyRedraw(); 1749 1750 return TCL_OK; 1750 1751 } … … 1777 1778 NanoVis::MapFlows(); 1778 1779 } 1779 NanoVis:: EventuallyRedraw();1780 NanoVis::eventuallyRedraw(); 1780 1781 NanoVis::licRenderer->convolve(); 1781 1782 NanoVis::AdvectFlows(); … … 1880 1881 values.frameRate = 25.0f; // Default frame rate 25 fps 1881 1882 values.bitRate = 6000000; // Default video bit rate. 1882 values.width = NanoVis::win _width;1883 values.height = NanoVis::win _height;1883 values.width = NanoVis::winWidth; 1884 values.height = NanoVis::winHeight; 1884 1885 values.nFrames = 100; 1885 1886 values.format = Rappture::AVTranslate::MPEG1; … … 1907 1908 // Save the old dimensions of the offscreen buffer. 1908 1909 int oldWidth, oldHeight; 1909 oldWidth = NanoVis::win _width;1910 oldHeight = NanoVis::win _height;1910 oldWidth = NanoVis::winWidth; 1911 oldHeight = NanoVis::winHeight; 1911 1912 1912 1913 TRACE("FLOW started\n"); … … 1926 1927 if ((values.width != oldWidth) || (values.height != oldHeight)) { 1927 1928 // Resize to the requested size. 1928 NanoVis::resize _offscreen_buffer(values.width, values.height);1929 NanoVis::resizeOffscreenBuffer(values.width, values.height); 1929 1930 } 1930 1931 // Now compute the line padding for the offscreen buffer. … … 1946 1947 } 1947 1948 NanoVis::AdvectFlows(); 1948 NanoVis::offscreen _buffer_capture();1949 NanoVis::offscreenBufferCapture(); 1949 1950 NanoVis::display(); 1950 NanoVis::read _screen();1951 NanoVis::readScreen(); 1951 1952 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1952 movie.append(context, NanoVis::screen _buffer, pad);1953 movie.append(context, NanoVis::screenBuffer, pad); 1953 1954 } 1954 1955 movie.done(context); … … 1971 1972 } 1972 1973 if ((values.width != oldWidth) || (values.height != oldHeight)) { 1973 NanoVis::resize _offscreen_buffer(oldWidth, oldHeight);1974 NanoVis::resizeOffscreenBuffer(oldWidth, oldHeight); 1974 1975 } 1975 1976 NanoVis::ResetFlows();
Note: See TracChangeset
for help on using the changeset viewer.