Ignore:
Timestamp:
Aug 31, 2010, 8:29:13 PM (14 years ago)
Author:
gah
Message:

re-merge with latest branches/blt4 changes

Location:
trunk/packages/vizservers
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/configure.in

    r1706 r1899  
    4545
    4646AC_C_BIGENDIAN
     47AC_CHECK_SIZEOF(int, 4)
     48AC_CHECK_SIZEOF(long, 4)
     49AC_CHECK_SIZEOF(long long, 8)
     50AC_CHECK_SIZEOF(void *, 4)
     51AC_CHECK_SIZEOF(float, 4)
     52
     53# Save the values as shell variables so that we can substitute them
     54# into bltHash.h for situtations where there's no bltInt.h.
     55
     56AC_SUBST(SIZEOF_INT, ${ac_cv_sizeof_int})
     57AC_SUBST(SIZEOF_LONG, ${ac_cv_sizeof_long})
     58AC_SUBST(SIZEOF_LONG_LONG, ${ac_cv_sizeof_long_long})
     59AC_SUBST(SIZEOF_VOID_P, ${ac_cv_sizeof_void_p})
     60AC_SUBST(SIZEOF_FLOAT, ${ac_cv_sizeof_float})
    4761
    4862LD_RPATH="";
     
    209223AC_MSG_RESULT([${DX_LIB_DIR}])
    210224
    211 AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h])
     225AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[
     226#define SIZEOF_LONG ${ac_cv_sizeof_long}
     227#if SIZEOF_LONG == 8
     228#  define INT64_C(c)  c ## L
     229#  define UINT64_C(c) c ## UL
     230#else
     231#  define INT64_C(c)  c ## LL
     232#  define UINT64_C(c) c ## ULL
     233#endif
     234])
    212235
    213236oldLIBS=$LIBS
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r1850 r1899  
    44#include <stddef.h>
    55#include <limits.h>
     6#include <stdint.h>
    67#include <poll.h>
    78#include <tcl.h>
     
    5556Rappture::SwitchSpec FlowCmd::_switches[] = {
    5657    {Rappture::SWITCH_BOOLEAN, "-arrows", "boolean",
    57         offsetof(FlowValues, showArrows), 0},
     58        offsetof(FlowValues, showArrows), 0},
    5859    {Rappture::SWITCH_CUSTOM, "-axis", "axis",
    59         offsetof(FlowValues, slicePos.axis), 0, 0, &axisSwitch},
     60        offsetof(FlowValues, slicePos.axis), 0, 0, &axisSwitch},
    6061    {Rappture::SWITCH_FLOAT, "-diffuse", "value",
    61         offsetof(FlowValues, diffuse), 0},
     62        offsetof(FlowValues, diffuse), 0},
    6263    {Rappture::SWITCH_BOOLEAN, "-hide", "boolean",
    63         offsetof(FlowValues, isHidden), 0},
     64        offsetof(FlowValues, isHidden), 0},
    6465    {Rappture::SWITCH_FLOAT, "-opacity", "value",
    65         offsetof(FlowValues, opacity), 0},
     66        offsetof(FlowValues, opacity), 0},
    6667    {Rappture::SWITCH_BOOLEAN, "-outline", "boolean",
    67         offsetof(FlowValues, showOutline), 0},
     68        offsetof(FlowValues, showOutline), 0},
    6869    {Rappture::SWITCH_CUSTOM, "-position", "number",
    69         offsetof(FlowValues, slicePos), 0, 0, &positionSwitch},
     70        offsetof(FlowValues, slicePos), 0, 0, &positionSwitch},
    7071    {Rappture::SWITCH_BOOLEAN, "-slice", "boolean",
    71         offsetof(FlowValues, sliceVisible), 0},
     72        offsetof(FlowValues, sliceVisible), 0},
    7273    {Rappture::SWITCH_FLOAT, "-specular", "value",
    73         offsetof(FlowValues, specular), 0},
     74        offsetof(FlowValues, specular), 0},
    7475    {Rappture::SWITCH_CUSTOM, "-transferfunction", "name",
    7576        offsetof(FlowValues, tfPtr), 0, 0, &transferFunctionSwitch},
    7677    {Rappture::SWITCH_BOOLEAN, "-volume", "boolean",
    77         offsetof(FlowValues, showVolume), 0},
     78        offsetof(FlowValues, showVolume), 0},
    7879    {Rappture::SWITCH_END}
    7980};
     
    8788        offsetof(FlowParticlesValues, isHidden), 0},
    8889    {Rappture::SWITCH_CUSTOM, "-position", "number",
    89         offsetof(FlowParticlesValues, position), 0, 0, &positionSwitch},
     90        offsetof(FlowParticlesValues, position), 0, 0, &positionSwitch},
    9091    {Rappture::SWITCH_FLOAT, "-size", "float",
    9192        offsetof(FlowParticlesValues, particleSize), 0},
     
    118119    _hashPtr = hPtr;
    119120    _sv.isHidden = false;
    120     _sv.position.axis = 0;                /* X_AXIS */
    121     _sv.position.value = 0.0f;       
     121    _sv.position.axis = 0;              /* X_AXIS */
     122    _sv.position.value = 0.0f; 
    122123    _sv.position.flags = RELPOS;
    123124    _sv.color.r = _sv.color.b = _sv.color.g = _sv.color.a = 1.0f;
    124125    _rendererPtr = new NvParticleRenderer(NMESH, NMESH,
    125                 /* Global nVidia Cg context */g_context);
     126                /* Global nVidia Cg context */g_context);
    126127}
    127128
     
    129130{
    130131    if (_rendererPtr != NULL) {
    131         delete _rendererPtr;
     132        delete _rendererPtr;
    132133    }
    133134    if (_hashPtr != NULL) {
    134         Tcl_DeleteHashEntry(_hashPtr);
     135        Tcl_DeleteHashEntry(_hashPtr);
    135136    }
    136137    Rappture::FreeSwitches(_switches, &_sv, 0);
     
    144145    Trace("rendering particles %s position=%g\n", _name, _sv.position.value);
    145146    Trace("rendering particles %s position=%g\n", _name,
    146           FlowCmd::GetRelativePosition(&_sv.position));
     147          FlowCmd::GetRelativePosition(&_sv.position));
    147148
    148149    _rendererPtr->setPos(FlowCmd::GetRelativePosition(&_sv.position));
     
    157158    _rendererPtr->setPos(FlowCmd::GetRelativePosition(&_sv.position));
    158159    _rendererPtr->setColor(Vector4(_sv.color.r, _sv.color.g, _sv.color.b,
    159                 _sv.color.a));
     160                _sv.color.a));
    160161    _rendererPtr->particleSize(_sv.particleSize);
    161162    _rendererPtr->setAxis(_sv.position.axis);
     
    168169    _hashPtr = hPtr;
    169170    _sv.isHidden = false;
    170     _sv.corner1.x = 0.0f;       
    171     _sv.corner1.y = 0.0f;       
    172     _sv.corner1.z = 0.0f;       
    173     _sv.corner2.x = 1.0f;       
    174     _sv.corner2.y = 1.0f;       
    175     _sv.corner2.z = 1.0f;       
     171    _sv.corner1.x = 0.0f;       
     172    _sv.corner1.y = 0.0f;       
     173    _sv.corner1.z = 0.0f;       
     174    _sv.corner2.x = 1.0f;       
     175    _sv.corner2.y = 1.0f;       
     176    _sv.corner2.z = 1.0f;       
    176177    _sv.lineWidth = 1.2f;
    177178    _sv.color.r = _sv.color.b = _sv.color.g = _sv.color.a = 1.0f;
     
    199200    sy = volPtr->height / (double)volPtr->width;
    200201    if (volPtr->depth > 0.0) {
    201         sz = volPtr->depth  / (double)volPtr->width;
     202        sz = volPtr->depth  / (double)volPtr->width;
    202203    }
    203204    glScaled(sx, sy, sz);
     
    209210
    210211    Trace("box is %g,%g %g,%g %g,%g\n",
    211           _sv.corner1.x, _sv.corner2.x,
    212           _sv.corner1.y, _sv.corner2.y,
    213           _sv.corner1.z, _sv.corner2.z);
     212          _sv.corner1.x, _sv.corner2.x,
     213          _sv.corner1.y, _sv.corner2.y,
     214          _sv.corner1.z, _sv.corner2.z);
    214215    Trace("world is %g,%g %g,%g %g,%g\n",
    215           min.x, max.x, min.y, max.y, min.z, max.z);
     216          min.x, max.x, min.y, max.y, min.z, max.z);
    216217
    217218    float x0, y0, z0, x1, y1, z1;
     
    219220    x1 = y1 = z1 = 0.0f;
    220221    if (max.y  > min.y) {
    221         y0 = (_sv.corner1.y - min.y) / (max.y - min.y);
    222         y1 = (_sv.corner2.y - min.y) / (max.y - min.y);
     222        y0 = (_sv.corner1.y - min.y) / (max.y - min.y);
     223        y1 = (_sv.corner2.y - min.y) / (max.y - min.y);
    223224    }
    224225    if (max.z > min.z) {
    225         z0 = (_sv.corner1.z - min.z) / (max.z - min.z);
    226         z1 = (_sv.corner2.z - min.z) / (max.z - min.z);
     226        z0 = (_sv.corner1.z - min.z) / (max.z - min.z);
     227        z1 = (_sv.corner2.z - min.z) / (max.z - min.z);
    227228    }
    228229    if (max.x > min.x) {
    229         x0 = (_sv.corner1.x - min.x) / (max.x - min.x);
    230         x1 = (_sv.corner2.x - min.x) / (max.x - min.x);
     230        x0 = (_sv.corner1.x - min.x) / (max.x - min.x);
     231        x1 = (_sv.corner2.x - min.x) / (max.x - min.x);
    231232    }
    232233    Trace("rendering box %g,%g %g,%g %g,%g\n", x0, x1, y0, y1, z0, z1);
     
    235236    glBegin(GL_LINE_LOOP);
    236237    {
    237         glVertex3d(x0, y0, z0);
    238         glVertex3d(x1, y0, z0);
    239         glVertex3d(x1, y1, z0);
    240         glVertex3d(x0, y1, z0);
     238        glVertex3d(x0, y0, z0);
     239        glVertex3d(x1, y0, z0);
     240        glVertex3d(x1, y1, z0);
     241        glVertex3d(x0, y1, z0);
    241242    }
    242243    glEnd();
    243244    glBegin(GL_LINE_LOOP);
    244245    {
    245         glVertex3d(x0, y0, z1);
    246         glVertex3d(x1, y0, z1);
    247         glVertex3d(x1, y1, z1);
    248         glVertex3d(x0, y1, z1);
     246        glVertex3d(x0, y0, z1);
     247        glVertex3d(x1, y0, z1);
     248        glVertex3d(x1, y1, z1);
     249        glVertex3d(x0, y1, z1);
    249250    }
    250251    glEnd();
     
    252253    glBegin(GL_LINE_LOOP);
    253254    {
    254         glVertex3d(x0, y0, z0);
    255         glVertex3d(x0, y0, z1);
    256         glVertex3d(x0, y1, z1);
    257         glVertex3d(x0, y1, z0);
     255        glVertex3d(x0, y0, z0);
     256        glVertex3d(x0, y0, z1);
     257        glVertex3d(x0, y1, z1);
     258        glVertex3d(x0, y1, z0);
    258259    }
    259260    glEnd();
     
    261262    glBegin(GL_LINE_LOOP);
    262263    {
    263         glVertex3d(x1, y0, z0);
    264         glVertex3d(x1, y0, z1);
    265         glVertex3d(x1, y1, z1);
    266         glVertex3d(x1, y1, z0);
     264        glVertex3d(x1, y0, z0);
     265        glVertex3d(x1, y0, z1);
     266        glVertex3d(x1, y1, z1);
     267        glVertex3d(x1, y1, z0);
    267268    }
    268269    glEnd();
     
    290291    _volPtr = NULL;
    291292    _cmdToken = Tcl_CreateObjCommand(interp, (char *)_name,
    292         (Tcl_ObjCmdProc *)FlowInstObjCmd, this, FlowInstDeleteProc);
     293        (Tcl_ObjCmdProc *)FlowInstObjCmd, this, FlowInstDeleteProc);
    293294    Tcl_InitHashTable(&_particlesTable, TCL_STRING_KEYS);
    294295    Tcl_InitHashTable(&_boxTable, TCL_STRING_KEYS);
     
    299300    Rappture::FreeSwitches(_switches, &_sv, 0);
    300301    if (_hashPtr != NULL) {
    301         Tcl_DeleteHashEntry(_hashPtr);
     302        Tcl_DeleteHashEntry(_hashPtr);
    302303    }
    303304    if (_fieldPtr != NULL) {
    304         delete _fieldPtr;
     305        delete _fieldPtr;
    305306    }
    306307    if (_dataPtr != NULL) {
    307         delete _dataPtr;
     308        delete _dataPtr;
    308309    }
    309310     if (_volPtr != NULL) {
    310         NanoVis::remove_volume(_volPtr);
    311         _volPtr = NULL;
     311        NanoVis::remove_volume(_volPtr);
     312        _volPtr = NULL;
    312313    }
    313314
     
    315316    FlowBoxIterator boxIter;
    316317    for (boxPtr = FirstBox(&boxIter); boxPtr != NULL;
    317         boxPtr = NextBox(&boxIter)) {
    318         boxPtr->disconnect();
    319         delete boxPtr;
    320     }       
     318        boxPtr = NextBox(&boxIter)) {
     319        boxPtr->disconnect();
     320        delete boxPtr;
     321    }   
    321322    FlowParticles *particlesPtr;
    322323    FlowParticlesIterator partIter;
    323324    for (particlesPtr = FirstParticles(&partIter); particlesPtr != NULL;
    324         particlesPtr = NextParticles(&partIter)) {
    325         particlesPtr->disconnect();
    326         delete particlesPtr;
    327     }       
     325        particlesPtr = NextParticles(&partIter)) {
     326        particlesPtr->disconnect();
     327        delete particlesPtr;
     328    }   
    328329    Tcl_DeleteHashTable(&_particlesTable);
    329330    Tcl_DeleteHashTable(&_boxTable);
     
    336337    FlowParticles *particlesPtr;
    337338    for (particlesPtr = FirstParticles(&iter); particlesPtr != NULL;
    338         particlesPtr = NextParticles(&iter)) {
    339         particlesPtr->Reset();
     339        particlesPtr = NextParticles(&iter)) {
     340        particlesPtr->Reset();
    340341    }
    341342}
     
    350351    FlowParticles *particlesPtr;
    351352    for (particlesPtr = FirstParticles(&iter); particlesPtr != NULL;
    352         particlesPtr = NextParticles(&iter)) {
    353         if (particlesPtr->visible()) {
    354             particlesPtr->Advect();
    355         }
     353        particlesPtr = NextParticles(&iter)) {
     354        if (particlesPtr->visible()) {
     355            particlesPtr->Advect();
     356        }
    356357    }
    357358}
     
    365366    FlowParticles *particlesPtr;
    366367    for (particlesPtr = FirstParticles(&iter); particlesPtr != NULL;
    367         particlesPtr = NextParticles(&iter)) {
    368         if (particlesPtr->visible()) {
    369             particlesPtr->Render();
    370         }
     368        particlesPtr = NextParticles(&iter)) {
     369        if (particlesPtr->visible()) {
     370            particlesPtr->Render();
     371        }
    371372    }
    372373    Trace("in Render before boxes %s\n", _name);
     
    382383    hPtr = Tcl_CreateHashEntry(&_particlesTable, particlesName, &isNew);
    383384    if (!isNew) {
    384         Tcl_AppendResult(interp, "particle injection plane \"",
    385                         particlesName, "\" already exists.", (char *)NULL);
    386         return TCL_ERROR;
     385        Tcl_AppendResult(interp, "particle injection plane \"",
     386                        particlesName, "\" already exists.", (char *)NULL);
     387        return TCL_ERROR;
    387388    }
    388389    particlesName = Tcl_GetHashKey(&_particlesTable, hPtr);
     
    390391    particlesPtr = new FlowParticles(particlesName, hPtr);
    391392    if (particlesPtr == NULL) {
    392         Tcl_AppendResult(interp, "can't allocate particle injection plane",
    393                 (char *)NULL);
    394         Tcl_DeleteHashEntry(hPtr);
    395         return TCL_ERROR;
     393        Tcl_AppendResult(interp, "can't allocate particle injection plane",
     394                (char *)NULL);
     395        Tcl_DeleteHashEntry(hPtr);
     396        return TCL_ERROR;
    396397    }
    397398    Tcl_SetHashValue(hPtr, particlesPtr);
     
    401402int
    402403FlowCmd::GetParticles(Tcl_Interp *interp, Tcl_Obj *objPtr,
    403                       FlowParticles **particlesPtrPtr)
     404                      FlowParticles **particlesPtrPtr)
    404405{
    405406    Tcl_HashEntry *hPtr;
    406407    hPtr = Tcl_FindHashEntry(&_particlesTable, Tcl_GetString(objPtr));
    407408    if (hPtr == NULL) {
    408         if (interp != NULL) {
    409             Tcl_AppendResult(interp, "can't find a particle injection plane \"",
    410                         Tcl_GetString(objPtr), "\"", (char *)NULL);
    411         }
    412         return TCL_ERROR;
     409        if (interp != NULL) {
     410            Tcl_AppendResult(interp, "can't find a particle injection plane \"",
     411                        Tcl_GetString(objPtr), "\"", (char *)NULL);
     412        }
     413        return TCL_ERROR;
    413414    }
    414415    *particlesPtrPtr = (FlowParticles *)Tcl_GetHashValue(hPtr);
     
    420421{
    421422    iterPtr->hashPtr = Tcl_FirstHashEntry(&_particlesTable,
    422         &iterPtr->hashSearch);
     423        &iterPtr->hashSearch);
    423424    if (iterPtr->hashPtr == NULL) {
    424         return NULL;
     425        return NULL;
    425426    }
    426427    return (FlowParticles *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    431432{
    432433    if (iterPtr->hashPtr == NULL) {
    433         return NULL;
     434        return NULL;
    434435    }
    435436    iterPtr->hashPtr = Tcl_NextHashEntry(&iterPtr->hashSearch);
    436437    if (iterPtr->hashPtr == NULL) {
    437         return NULL;
     438        return NULL;
    438439    }
    439440    return (FlowParticles *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    447448    hPtr = Tcl_CreateHashEntry(&_boxTable, Tcl_GetString(objPtr), &isNew);
    448449    if (!isNew) {
    449         Tcl_AppendResult(interp, "box \"", Tcl_GetString(objPtr),
    450                 "\" already exists in flow \"", name(), "\"", (char *)NULL);
    451         return TCL_ERROR;
     450        Tcl_AppendResult(interp, "box \"", Tcl_GetString(objPtr),
     451                "\" already exists in flow \"", name(), "\"", (char *)NULL);
     452        return TCL_ERROR;
    452453    }
    453454    const char *boxName;
     
    456457    boxPtr = new FlowBox(boxName, hPtr);
    457458    if (boxPtr == NULL) {
    458         Tcl_AppendResult(interp, "can't allocate box \"", boxName, "\"",
    459                         (char *)NULL);
    460         Tcl_DeleteHashEntry(hPtr);
    461         return TCL_ERROR;
     459        Tcl_AppendResult(interp, "can't allocate box \"", boxName, "\"",
     460                        (char *)NULL);
     461        Tcl_DeleteHashEntry(hPtr);
     462        return TCL_ERROR;
    462463    }
    463464    Tcl_SetHashValue(hPtr, boxPtr);
     
    471472    hPtr = Tcl_FindHashEntry(&_boxTable, Tcl_GetString(objPtr));
    472473    if (hPtr == NULL) {
    473         if (interp != NULL) {
    474             Tcl_AppendResult(interp, "can't find a box \"",
    475                 Tcl_GetString(objPtr), "\" in flow \"", name(), "\"",
    476                 (char *)NULL);
    477         }
    478         return TCL_ERROR;
     474        if (interp != NULL) {
     475            Tcl_AppendResult(interp, "can't find a box \"",
     476                Tcl_GetString(objPtr), "\" in flow \"", name(), "\"",
     477                (char *)NULL);
     478        }
     479        return TCL_ERROR;
    479480    }
    480481    *boxPtrPtr = (FlowBox *)Tcl_GetHashValue(hPtr);
     
    487488    iterPtr->hashPtr = Tcl_FirstHashEntry(&_boxTable, &iterPtr->hashSearch);
    488489    if (iterPtr->hashPtr == NULL) {
    489         return NULL;
     490        return NULL;
    490491    }
    491492    return (FlowBox *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    496497{
    497498    if (iterPtr->hashPtr == NULL) {
    498         return NULL;
     499        return NULL;
    499500    }
    500501    iterPtr->hashPtr = Tcl_NextHashEntry(&iterPtr->hashSearch);
    501502    if (iterPtr->hashPtr == NULL) {
    502         return NULL;
     503        return NULL;
    503504    }
    504505    return (FlowBox *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    512513    FlowParticlesIterator iter;
    513514    for (particlesPtr = FirstParticles(&iter); particlesPtr != NULL;
    514         particlesPtr = NextParticles(&iter)) {
    515         particlesPtr->Initialize();
    516     }       
     515        particlesPtr = NextParticles(&iter)) {
     516        particlesPtr->Initialize();
     517    }   
    517518}
    518519
     
    521522{
    522523    if (_volPtr != NULL) {
    523         fprintf(stderr, "from ScaleVectorField volId=%s\n", _volPtr->name());
    524         NanoVis::remove_volume(_volPtr);
    525         _volPtr = NULL;
     524        fprintf(stderr, "from ScaleVectorField volId=%s\n", _volPtr->name());
     525        NanoVis::remove_volume(_volPtr);
     526        _volPtr = NULL;
    526527    }
    527528    float *vdata;
    528529    vdata = GetScaledVector();
    529530    if (vdata == NULL) {
    530         return false;
     531        return false;
    531532    }
    532533    Volume *volPtr;
     
    534535    delete [] vdata;
    535536    if (volPtr == NULL) {
    536         return false;
     537        return false;
    537538    }
    538539    _volPtr = volPtr;
     
    540541    // Remove the associated vector field.
    541542    if (_fieldPtr != NULL) {
    542         delete _fieldPtr;
     543        delete _fieldPtr;
    543544    }
    544545    _fieldPtr = new NvVectorField();
    545546    if (_fieldPtr == NULL) {
    546         return false;
     547        return false;
    547548    }
    548549
     
    559560
    560561    _fieldPtr->setVectorField(_volPtr, loc,
    561         1.0f, height / width, depth  / width, NanoVis::magMax);
     562        1.0f, height / width, depth  / width, NanoVis::magMax);
    562563
    563564    if (NanoVis::licRenderer != NULL) {
    564565        NanoVis::licRenderer->setVectorField(_volPtr->id, loc,
    565                 1.0f / _volPtr->aspect_ratio_width,
    566                 1.0f / _volPtr->aspect_ratio_height,
    567                 1.0f / _volPtr->aspect_ratio_depth,
    568                 _volPtr->wAxis.max());
    569         SetCurrentPosition();
    570         SetAxis();
    571         SetActive();
     566                1.0f / _volPtr->aspect_ratio_width,
     567                1.0f / _volPtr->aspect_ratio_height,
     568                1.0f / _volPtr->aspect_ratio_depth,
     569                _volPtr->wAxis.max());
     570        SetCurrentPosition();
     571        SetAxis();
     572        SetActive();
    572573    }
    573574
     
    576577            //*(volPtr->get_location()),
    577578            1.0f,
    578             _volPtr->aspect_ratio_height / _volPtr->aspect_ratio_width,
    579             _volPtr->aspect_ratio_depth / _volPtr->aspect_ratio_width
     579            _volPtr->aspect_ratio_height / _volPtr->aspect_ratio_width,
     580            _volPtr->aspect_ratio_depth / _volPtr->aspect_ratio_width
    580581            //,volPtr->wAxis.max()
    581582            );
    582         Trace("Arrows enabled set to %d\n", _sv.showArrows);
    583         NanoVis::velocityArrowsSlice->axis(_sv.slicePos.axis);
    584         NanoVis::velocityArrowsSlice->slicePos(_sv.slicePos.value);
    585         NanoVis::velocityArrowsSlice->enabled(_sv.showArrows);
     583        Trace("Arrows enabled set to %d\n", _sv.showArrows);
     584        NanoVis::velocityArrowsSlice->axis(_sv.slicePos.axis);
     585        NanoVis::velocityArrowsSlice->slicePos(_sv.slicePos.value);
     586        NanoVis::velocityArrowsSlice->enabled(_sv.showArrows);
    586587    }
    587588    FlowParticles *particlesPtr;
    588589    FlowParticlesIterator partIter;
    589590    for (particlesPtr = FirstParticles(&partIter); particlesPtr != NULL;
    590         particlesPtr = NextParticles(&partIter)) {
    591         particlesPtr->SetVectorField(_volPtr);
    592     }       
     591        particlesPtr = NextParticles(&partIter)) {
     592        particlesPtr->SetVectorField(_volPtr);
     593    }   
    593594    return true;
    594595}
     
    600601    FlowBox *boxPtr;
    601602    for (boxPtr = FirstBox(&iter); boxPtr != NULL; boxPtr = NextBox(&iter)) {
    602         Trace("found box %s\n", boxPtr->name());
    603         if (boxPtr->visible()) {
    604             boxPtr->Render(_volPtr);
    605         }
     603        Trace("found box %s\n", boxPtr->name());
     604        if (boxPtr->visible()) {
     605            boxPtr->Render(_volPtr);
     606        }
    606607    }
    607608}
     
    614615    float *data = new float[n];
    615616    if (data == NULL) {
    616         return NULL;
     617        return NULL;
    617618    }
    618619    memset(data, 0, sizeof(float) * n);
     
    620621    const float *values = _dataPtr->values();
    621622    for (size_t iz=0; iz < _dataPtr->zNum(); iz++) {
    622         for (size_t iy=0; iy < _dataPtr->yNum(); iy++) {
    623             for (size_t ix=0; ix < _dataPtr->xNum(); ix++) {
    624                 double vx, vy, vz, vm;
    625                 vx = values[0];
    626                 vy = values[1];
    627                 vz = values[2];
    628                 vm = sqrt(vx*vx + vy*vy + vz*vz);
    629                 destPtr[0] = vm / NanoVis::magMax;
    630                 destPtr[1] = vx /(2.0*NanoVis::magMax) + 0.5;
    631                 destPtr[2] = vy /(2.0*NanoVis::magMax) + 0.5;
    632                 destPtr[3] = vz /(2.0*NanoVis::magMax) + 0.5;
    633                 values += 3;
    634                 destPtr += 4;
    635             }
    636         }
     623        for (size_t iy=0; iy < _dataPtr->yNum(); iy++) {
     624            for (size_t ix=0; ix < _dataPtr->xNum(); ix++) {
     625                double vx, vy, vz, vm;
     626                vx = values[0];
     627                vy = values[1];
     628                vz = values[2];
     629                vm = sqrt(vx*vx + vy*vy + vz*vz);
     630                destPtr[0] = vm / NanoVis::magMax;
     631                destPtr[1] = vx /(2.0*NanoVis::magMax) + 0.5;
     632                destPtr[2] = vy /(2.0*NanoVis::magMax) + 0.5;
     633                destPtr[3] = vz /(2.0*NanoVis::magMax) + 0.5;
     634                values += 3;
     635                destPtr += 4;
     636            }
     637        }
    637638    }
    638639    return data;
     
    645646
    646647    volPtr = NanoVis::load_volume(_name, _dataPtr->xNum(), _dataPtr->yNum(),
    647                                   _dataPtr->zNum(), 4, data,
    648                                   NanoVis::magMin, NanoVis::magMax, 0);
     648                                  _dataPtr->zNum(), 4, data,
     649                                  NanoVis::magMin, NanoVis::magMax, 0);
    649650    volPtr->xAxis.SetRange(_dataPtr->xMin(), _dataPtr->xMax());
    650651    volPtr->yAxis.SetRange(_dataPtr->yMin(), _dataPtr->yMax());
     
    655656    Vector3 physicalMax(NanoVis::xMax, NanoVis::yMax, NanoVis::zMax);
    656657    Trace("min=%g %g %g max=%g %g %g mag=%g %g\n",
    657             NanoVis::xMin, NanoVis::yMin, NanoVis::zMin,
    658             NanoVis::xMax, NanoVis::yMax, NanoVis::zMax,
    659             NanoVis::magMin, NanoVis::magMax);
     658            NanoVis::xMin, NanoVis::yMin, NanoVis::zMin,
     659            NanoVis::xMax, NanoVis::yMax, NanoVis::zMax,
     660            NanoVis::magMin, NanoVis::magMax);
    660661    volPtr->setPhysicalBBox(physicalMin, physicalMax);
    661662    //volPtr->set_n_slice(256 - _volIndex);
     
    689690static int
    690691FlowDataFileOp(ClientData clientData, Tcl_Interp *interp, int objc,
    691                Tcl_Obj *const *objv)
     692               Tcl_Obj *const *objv)
    692693{
    693694    Rappture::Outcome result;
     
    702703    }
    703704    if ((nComponents < 1) || (nComponents > 4)) {
    704         Tcl_AppendResult(interp, "bad # of components \"",
    705                         Tcl_GetString(objv[4]), "\"", (char *)NULL);
    706         return TCL_ERROR;
     705        Tcl_AppendResult(interp, "bad # of components \"",
     706                        Tcl_GetString(objv[4]), "\"", (char *)NULL);
     707        return TCL_ERROR;
    707708    }
    708709    Rappture::Buffer buf;
    709710    if (!buf.load(result, fileName)) {
    710         Tcl_AppendResult(interp, "can't load data from \"", fileName, "\": ",
    711                         result.remark(), (char *)NULL);
    712         return TCL_ERROR;
     711        Tcl_AppendResult(interp, "can't load data from \"", fileName, "\": ",
     712                        result.remark(), (char *)NULL);
     713        return TCL_ERROR;
    713714    }
    714715
     
    719720    char *bytes = (char *)buf.bytes();
    720721    if ((length > 4) && (strncmp(bytes, "<DX>", 4) == 0)) {
    721         if (!dataPtr->ImportDx(result, nComponents, length-4, bytes+4)) {
    722             Tcl_AppendResult(interp, result.remark(), (char *)NULL);
    723             delete dataPtr;
    724             return TCL_ERROR;
    725         }
     722        if (!dataPtr->ImportDx(result, nComponents, length-4, bytes+4)) {
     723            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     724            delete dataPtr;
     725            return TCL_ERROR;
     726        }
    726727    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    727         if (dataPtr->ParseBuffer(interp, buf) != TCL_OK) {
    728             delete dataPtr;
    729             return TCL_ERROR;
    730         }
     728        if (dataPtr->ParseBuffer(interp, buf) != TCL_OK) {
     729            delete dataPtr;
     730            return TCL_ERROR;
     731        }
    731732    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    732         Rappture::Unirect2d *u2dPtr;
    733         u2dPtr = new Rappture::Unirect2d(nComponents);
    734         if (u2dPtr->ParseBuffer(interp, buf) != TCL_OK) {
    735             delete u2dPtr;
    736             return TCL_ERROR;
    737         }
    738         dataPtr->Convert(u2dPtr);
    739         delete u2dPtr;
     733        Rappture::Unirect2d *u2dPtr;
     734        u2dPtr = new Rappture::Unirect2d(nComponents);
     735        if (u2dPtr->ParseBuffer(interp, buf) != TCL_OK) {
     736            delete u2dPtr;
     737            return TCL_ERROR;
     738        }
     739        dataPtr->Convert(u2dPtr);
     740        delete u2dPtr;
    740741    } else {
    741         fprintf(stderr, "header is %.14s\n", buf.bytes());
    742         if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
    743             Tcl_AppendResult(interp, result.remark(), (char *)NULL);
    744             delete dataPtr;
    745             return TCL_ERROR;
    746         }
     742        fprintf(stderr, "header is %.14s\n", buf.bytes());
     743        if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
     744            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     745            delete dataPtr;
     746            return TCL_ERROR;
     747        }
    747748    }
    748749    if (dataPtr->nValues() == 0) {
    749         delete dataPtr;
    750         Tcl_AppendResult(interp, "no data found in \"", fileName, "\"",
    751                         (char *)NULL);
    752         return TCL_ERROR;
     750        delete dataPtr;
     751        Tcl_AppendResult(interp, "no data found in \"", fileName, "\"",
     752                        (char *)NULL);
     753        return TCL_ERROR;
    753754    }
    754755    flowPtr->data(dataPtr);
     
    770771    int nBytes;
    771772    if (Tcl_GetIntFromObj(interp, objv[3], &nBytes) != TCL_OK) {
    772         Trace("Bad nBytes \"%s\"\n", Tcl_GetString(objv[3]));
     773        Trace("Bad nBytes \"%s\"\n", Tcl_GetString(objv[3]));
    773774        return TCL_ERROR;
    774775    }
    775776    if (nBytes <= 0) {
    776         Tcl_AppendResult(interp, "bad # bytes request \"",
    777                 Tcl_GetString(objv[3]), "\" for \"data follows\"", (char *)NULL);
    778         Trace("Bad nbytes %d\n", nBytes);
    779         return TCL_ERROR;
     777        Tcl_AppendResult(interp, "bad # bytes request \"",
     778                Tcl_GetString(objv[3]), "\" for \"data follows\"", (char *)NULL);
     779        Trace("Bad nbytes %d\n", nBytes);
     780        return TCL_ERROR;
    780781    }
    781782    int nComponents;
    782783    if (Tcl_GetIntFromObj(interp, objv[4], &nComponents) != TCL_OK) {
    783         Trace("Bad # of components \"%s\"\n", Tcl_GetString(objv[4]));
     784        Trace("Bad # of components \"%s\"\n", Tcl_GetString(objv[4]));
    784785        return TCL_ERROR;
    785786    }
    786787    if (nComponents <= 0) {
    787         Tcl_AppendResult(interp, "bad # of components request \"",
    788                 Tcl_GetString(objv[4]), "\" for \"data follows\"", (char *)NULL);
    789         Trace("Bad # of components %d\n", nComponents);
    790         return TCL_ERROR;
     788        Tcl_AppendResult(interp, "bad # of components request \"",
     789                Tcl_GetString(objv[4]), "\" for \"data follows\"", (char *)NULL);
     790        Trace("Bad # of components %d\n", nComponents);
     791        return TCL_ERROR;
    791792    }
    792793    Rappture::Buffer buf;
     
    802803    char *bytes = (char *)buf.bytes();
    803804    if ((length > 4) && (strncmp(bytes, "<DX>", 4) == 0)) {
    804         if (!dataPtr->ImportDx(result, nComponents, length - 4, bytes + 4)) {
    805             Tcl_AppendResult(interp, result.remark(), (char *)NULL);
    806             delete dataPtr;
    807             return TCL_ERROR;
    808         }
     805        if (!dataPtr->ImportDx(result, nComponents, length - 4, bytes + 4)) {
     806            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     807            delete dataPtr;
     808            return TCL_ERROR;
     809        }
    809810    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    810         if (dataPtr->ParseBuffer(interp, buf) != TCL_OK) {
    811             delete dataPtr;
    812             return TCL_ERROR;
    813         }
     811        if (dataPtr->ParseBuffer(interp, buf) != TCL_OK) {
     812            delete dataPtr;
     813            return TCL_ERROR;
     814        }
    814815    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    815         Rappture::Unirect2d *u2dPtr;
    816         u2dPtr = new Rappture::Unirect2d(nComponents);
    817         if (u2dPtr->ParseBuffer(interp, buf) != TCL_OK) {
    818             delete u2dPtr;
    819             return TCL_ERROR;
    820         }
    821         dataPtr->Convert(u2dPtr);
    822         delete u2dPtr;
     816        Rappture::Unirect2d *u2dPtr;
     817        u2dPtr = new Rappture::Unirect2d(nComponents);
     818        if (u2dPtr->ParseBuffer(interp, buf) != TCL_OK) {
     819            delete u2dPtr;
     820            return TCL_ERROR;
     821        }
     822        dataPtr->Convert(u2dPtr);
     823        delete u2dPtr;
    823824    } else {
    824         fprintf(stderr, "header is %.14s\n", buf.bytes());
    825         if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
    826             Tcl_AppendResult(interp, result.remark(), (char *)NULL);
    827             delete dataPtr;
    828             return TCL_ERROR;
    829         }
     825        fprintf(stderr, "header is %.14s\n", buf.bytes());
     826        if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
     827            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
     828            delete dataPtr;
     829            return TCL_ERROR;
     830        }
    830831    }
    831832    if (dataPtr->nValues() == 0) {
    832         delete dataPtr;
    833         Tcl_AppendResult(interp, "no data found in stream", (char *)NULL);
    834         return TCL_ERROR;
     833        delete dataPtr;
     834        Tcl_AppendResult(interp, "no data found in stream", (char *)NULL);
     835        return TCL_ERROR;
    835836    }
    836837    flowPtr->data(dataPtr);
    837838    {
    838839        char info[1024];
    839         ssize_t nWritten;
    840         size_t length;
     840        ssize_t nWritten;
     841        size_t length;
    841842
    842843        length = sprintf(info, "nv>data tag %s min %g max %g\n",
    843                 flowPtr->name(), dataPtr->magMin(), dataPtr->magMax());
     844                flowPtr->name(), dataPtr->magMin(), dataPtr->magMax());
    844845        nWritten  = write(0, info, length);
    845         assert(nWritten == (ssize_t)strlen(info));
     846        assert(nWritten == (ssize_t)strlen(info));
    846847    }
    847848    NanoVis::EventuallyRedraw(NanoVis::MAP_FLOWS);
     
    857858static int
    858859FlowDataOp(ClientData clientData, Tcl_Interp *interp, int objc,
    859            Tcl_Obj *const *objv)
     860           Tcl_Obj *const *objv)
    860861{
    861862    Tcl_ObjCmdProc *proc;
     
    873874{
    874875    if (posPtr->flags == RELPOS) {
    875         return posPtr->value;
     876        return posPtr->value;
    876877    }
    877878    switch (posPtr->axis) {
    878879    case AXIS_X: 
    879         return (posPtr->value - NanoVis::xMin) /
    880             (NanoVis::xMax - NanoVis::xMin);
     880        return (posPtr->value - NanoVis::xMin) /
     881            (NanoVis::xMax - NanoVis::xMin);
    881882    case AXIS_Y: 
    882         return (posPtr->value - NanoVis::yMin) /
    883             (NanoVis::yMax - NanoVis::yMin);
     883        return (posPtr->value - NanoVis::yMin) /
     884            (NanoVis::yMax - NanoVis::yMin);
    884885    case AXIS_Z: 
    885         return (posPtr->value - NanoVis::zMin) /
    886             (NanoVis::zMax - NanoVis::zMin);
     886        return (posPtr->value - NanoVis::zMin) /
     887            (NanoVis::zMax - NanoVis::zMin);
    887888    }
    888889    return 0.0;
     
    908909    iterPtr->hashPtr = Tcl_FirstHashEntry(&flowTable, &iterPtr->hashSearch);
    909910    if (iterPtr->hashPtr == NULL) {
    910         return NULL;
     911        return NULL;
    911912    }
    912913    return (FlowCmd *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    917918{
    918919    if (iterPtr->hashPtr == NULL) {
    919         return NULL;
     920        return NULL;
    920921    }
    921922    iterPtr->hashPtr = Tcl_NextHashEntry(&iterPtr->hashSearch);
    922923    if (iterPtr->hashPtr == NULL) {
    923         return NULL;
     924        return NULL;
    924925    }
    925926    return (FlowCmd *)Tcl_GetHashValue(iterPtr->hashPtr);
     
    932933    hPtr = Tcl_FindHashEntry(&flowTable, Tcl_GetString(objPtr));
    933934    if (hPtr == NULL) {
    934         if (interp != NULL) {
    935             Tcl_AppendResult(interp, "can't find a flow \"",
    936                              Tcl_GetString(objPtr), "\"", (char *)NULL);
    937         }
    938         return TCL_ERROR;
     935        if (interp != NULL) {
     936            Tcl_AppendResult(interp, "can't find a flow \"",
     937                             Tcl_GetString(objPtr), "\"", (char *)NULL);
     938        }
     939        return TCL_ERROR;
    939940    }
    940941    *flowPtrPtr = (FlowCmd *)Tcl_GetHashValue(hPtr);
     
    951952    hPtr = Tcl_CreateHashEntry(&flowTable, name, &isNew);
    952953    if (!isNew) {
    953         Tcl_AppendResult(interp, "flow \"", name, "\" already exists.",
    954                         (char *)NULL);
    955         return TCL_ERROR;
     954        Tcl_AppendResult(interp, "flow \"", name, "\" already exists.",
     955                        (char *)NULL);
     956        return TCL_ERROR;
    956957    }
    957958    Tcl_CmdInfo cmdInfo;
    958959    if (Tcl_GetCommandInfo(interp, name, &cmdInfo)) {
    959         Tcl_AppendResult(interp, "an another command \"", name,
    960                         "\" already exists.", (char *)NULL);
    961         return TCL_ERROR;
    962     }       
     960        Tcl_AppendResult(interp, "an another command \"", name,
     961                        "\" already exists.", (char *)NULL);
     962        return TCL_ERROR;
     963    }   
    963964    FlowCmd *flowPtr;
    964965    name = Tcl_GetHashKey(&flowTable, hPtr);
    965966    flowPtr = new FlowCmd(interp, name, hPtr);
    966967    if (flowPtr == NULL) {
    967         Tcl_AppendResult(interp, "can't allocate a flow object \"", name,
    968                         "\"", (char *)NULL);
    969         return TCL_ERROR;
     968        Tcl_AppendResult(interp, "can't allocate a flow object \"", name,
     969                        "\"", (char *)NULL);
     970        return TCL_ERROR;
    970971    }
    971972    Tcl_SetHashValue(hPtr, flowPtr);
     
    979980    FlowIterator iter;
    980981    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    981         flowPtr = NextFlow(&iter)) {
    982         flowPtr->disconnect();                /* Don't disrupt the hash walk */
    983         Tcl_DeleteCommand(interp, flowPtr->name());
     982        flowPtr = NextFlow(&iter)) {
     983        flowPtr->disconnect();          /* Don't disrupt the hash walk */
     984        Tcl_DeleteCommand(interp, flowPtr->name());
    984985    }
    985986    Tcl_DeleteHashTable(&flowTable);
     
    994995    /*
    995996     * Step 1.  Get the overall min and max magnitudes of all the
    996      *                flow vectors.
     997     *          flow vectors.
    997998     */
    998999    magMin = DBL_MAX, magMax = -DBL_MAX;
     
    10011002    FlowIterator iter;
    10021003    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    1003         flowPtr = NextFlow(&iter)) {
    1004         double min, max;
    1005         if (!flowPtr->isDataLoaded()) {
    1006             continue;
    1007         }
    1008         Rappture::Unirect3d *dataPtr;
    1009         dataPtr = flowPtr->data();
    1010         min = dataPtr->magMin();
    1011         max = dataPtr->magMax();
    1012         if (min < magMin) {
    1013             magMin = min;
    1014         }
    1015         if (max > magMax) {
    1016             magMax = max;
    1017         }
    1018         if (dataPtr->xMin() < xMin) {
    1019             xMin = dataPtr->xMin();
    1020         }
    1021         if (dataPtr->yMin() < yMin) {
    1022             yMin = dataPtr->yMin();
    1023         }
    1024         if (dataPtr->zMin() < zMin) {
    1025             zMin = dataPtr->zMin();
    1026         }
    1027         if (dataPtr->xMax() > xMax) {
    1028             xMax = dataPtr->xMax();
    1029         }
    1030         if (dataPtr->yMax() > yMax) {
    1031             yMax = dataPtr->yMax();
    1032         }
    1033         if (dataPtr->zMax() > zMax) {
    1034             zMax = dataPtr->zMax();
    1035         }
     1004        flowPtr = NextFlow(&iter)) {
     1005        double min, max;
     1006        if (!flowPtr->isDataLoaded()) {
     1007            continue;
     1008        }
     1009        Rappture::Unirect3d *dataPtr;
     1010        dataPtr = flowPtr->data();
     1011        min = dataPtr->magMin();
     1012        max = dataPtr->magMax();
     1013        if (min < magMin) {
     1014            magMin = min;
     1015        }
     1016        if (max > magMax) {
     1017            magMax = max;
     1018        }
     1019        if (dataPtr->xMin() < xMin) {
     1020            xMin = dataPtr->xMin();
     1021        }
     1022        if (dataPtr->yMin() < yMin) {
     1023            yMin = dataPtr->yMin();
     1024        }
     1025        if (dataPtr->zMin() < zMin) {
     1026            zMin = dataPtr->zMin();
     1027        }
     1028        if (dataPtr->xMax() > xMax) {
     1029            xMax = dataPtr->xMax();
     1030        }
     1031        if (dataPtr->yMax() > yMax) {
     1032            yMax = dataPtr->yMax();
     1033        }
     1034        if (dataPtr->zMax() > zMax) {
     1035            zMax = dataPtr->zMax();
     1036        }
    10361037    }
    10371038    Trace("MapFlows magMin=%g magMax=%g\n", NanoVis::magMin, NanoVis::magMax);
     
    10411042     */
    10421043    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    1043         flowPtr = NextFlow(&iter)) {
    1044         if (!flowPtr->isDataLoaded()) {
    1045             continue;                        // Flow exists, but no data has
    1046                                         // been loaded yet.
    1047         }
    1048         if (flowPtr->visible()) {
    1049             flowPtr->InitializeParticles();
    1050         }
    1051         if (!flowPtr->ScaleVectorField()) {
    1052             return false;
    1053         }
    1054         // FIXME: This doesn't work when there is more than one flow.
    1055         licRenderer->set_offset(flowPtr->GetRelativePosition());
     1044        flowPtr = NextFlow(&iter)) {
     1045        if (!flowPtr->isDataLoaded()) {
     1046            continue;                   // Flow exists, but no data has
     1047                                        // been loaded yet.
     1048        }
     1049        if (flowPtr->visible()) {
     1050            flowPtr->InitializeParticles();
     1051        }
     1052        if (!flowPtr->ScaleVectorField()) {
     1053            return false;
     1054        }
     1055        // FIXME: This doesn't work when there is more than one flow.
     1056        licRenderer->set_offset(flowPtr->GetRelativePosition());
    10561057        NanoVis::velocityArrowsSlice->slicePos(flowPtr->GetRelativePosition());
    10571058       
     
    10671068    FlowIterator iter;
    10681069    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    1069         flowPtr = NextFlow(&iter)) {
    1070         if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
    1071             flowPtr->Render();
    1072         }
     1070        flowPtr = NextFlow(&iter)) {
     1071        if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
     1072            flowPtr->Render();
     1073        }
    10731074    }
    10741075    flags &= ~REDRAW_PENDING;
     
    10821083
    10831084    if (licRenderer->active()) {
    1084         NanoVis::licRenderer->reset();
     1085        NanoVis::licRenderer->reset();
    10851086    }
    10861087    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    1087         flowPtr = NextFlow(&iter)) {
    1088         if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
    1089             flowPtr->ResetParticles();
    1090         }
     1088        flowPtr = NextFlow(&iter)) {
     1089        if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
     1090            flowPtr->ResetParticles();
     1091        }
    10911092    }
    10921093}   
     
    10981099    FlowIterator iter;
    10991100    for (flowPtr = FirstFlow(&iter); flowPtr != NULL;
    1100         flowPtr = NextFlow(&iter)) {
    1101         if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
    1102             flowPtr->Advect();
    1103         }
     1101        flowPtr = NextFlow(&iter)) {
     1102        if ((flowPtr->isDataLoaded()) && (flowPtr->visible())) {
     1103            flowPtr->Advect();
     1104        }
    11041105    }
    11051106}   
     
    11101111 * AxisSwitchProc --
    11111112 *
    1112  *        Convert a Tcl_Obj representing the label of a child node into its
    1113  *        integer node id.
     1113 *      Convert a Tcl_Obj representing the label of a child node into its
     1114 *      integer node id.
    11141115 *
    11151116 * Results:
    1116  *        The return value is a standard Tcl result.
     1117 *      The return value is a standard Tcl result.
    11171118 *
    11181119 *---------------------------------------------------------------------------
     
    11211122static int
    11221123AxisSwitchProc(
    1123     ClientData clientData,        /* Flag indicating if the node is considered
    1124                                 * before or after the insertion position. */
    1125     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1126     const char *switchName,        /* Not used. */
    1127     Tcl_Obj *objPtr,                /* String representation */
    1128     char *record,                /* Structure record */
    1129     int offset,                        /* Not used. */
    1130     int flags)                        /* Not used. */
     1124    ClientData clientData,      /* Flag indicating if the node is considered
     1125                                * before or after the insertion position. */
     1126    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1127    const char *switchName,     /* Not used. */
     1128    Tcl_Obj *objPtr,            /* String representation */
     1129    char *record,               /* Structure record */
     1130    int offset,                 /* Not used. */
     1131    int flags)                  /* Not used. */
    11311132{
    11321133    const char *string = Tcl_GetString(objPtr);
    11331134    if (string[1] == '\0') {
    1134         FlowCmd::SliceAxis *axisPtr = (FlowCmd::SliceAxis *)(record + offset);
     1135        FlowCmd::SliceAxis *axisPtr = (FlowCmd::SliceAxis *)(record + offset);
    11351136        char c;
    11361137        c = tolower((unsigned char)string[0]);
     
    11571158 * ColorSwitchProc --
    11581159 *
    1159  *        Convert a Tcl_Obj representing the label of a list of four color
    1160  *        components in to a RGBA color value.
     1160 *      Convert a Tcl_Obj representing the label of a list of four color
     1161 *      components in to a RGBA color value.
    11611162 *
    11621163 * Results:
    1163  *        The return value is a standard Tcl result.
     1164 *      The return value is a standard Tcl result.
    11641165 *
    11651166 *---------------------------------------------------------------------------
     
    11681169static int
    11691170ColorSwitchProc(
    1170     ClientData clientData,        /* Flag indicating if the node is considered
    1171                                 * before or after the insertion position. */
    1172     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1173     const char *switchName,        /* Not used. */
    1174     Tcl_Obj *objPtr,                /* String representation */
    1175     char *record,                /* Structure record */
    1176     int offset,                        /* Not used. */
    1177     int flags)                        /* Not used. */
     1171    ClientData clientData,      /* Flag indicating if the node is considered
     1172                                * before or after the insertion position. */
     1173    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1174    const char *switchName,     /* Not used. */
     1175    Tcl_Obj *objPtr,            /* String representation */
     1176    char *record,               /* Structure record */
     1177    int offset,                 /* Not used. */
     1178    int flags)                  /* Not used. */
    11781179{
    11791180    Tcl_Obj **objv;
     
    11821183
    11831184    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
    1184         return TCL_ERROR;
     1185        return TCL_ERROR;
    11851186    }
    11861187    if ((objc < 3) || (objc > 4)) {
    1187         Tcl_AppendResult(interp, "wrong # of elements in color definition",
    1188                         (char *)NULL);
    1189         return TCL_ERROR;
     1188        Tcl_AppendResult(interp, "wrong # of elements in color definition",
     1189                        (char *)NULL);
     1190        return TCL_ERROR;
    11901191    }
    11911192    float values[4];
     
    11931194    values[3] = 1.0f;
    11941195    for (i = 0; i < objc; i++) {
    1195         float value;
    1196 
    1197         if (GetFloatFromObj(interp, objv[i], &value) != TCL_OK) {
    1198             return TCL_ERROR;
    1199         }
    1200         if ((value < 0.0) || (value > 1.0)) {
    1201             Tcl_AppendResult(interp, "bad component value in \"",
    1202                 Tcl_GetString(objPtr), "\": color values must be [0..1]",
    1203                 (char *)NULL);
    1204             return TCL_ERROR;
    1205         }
    1206         values[i] = value;
    1207     }           
     1196        float value;
     1197
     1198        if (GetFloatFromObj(interp, objv[i], &value) != TCL_OK) {
     1199            return TCL_ERROR;
     1200        }
     1201        if ((value < 0.0) || (value > 1.0)) {
     1202            Tcl_AppendResult(interp, "bad component value in \"",
     1203                Tcl_GetString(objPtr), "\": color values must be [0..1]",
     1204                (char *)NULL);
     1205            return TCL_ERROR;
     1206        }
     1207        values[i] = value;
     1208    }      
    12081209    colorPtr->r = values[0];
    12091210    colorPtr->g = values[1];
     
    12181219 * PointSwitchProc --
    12191220 *
    1220  *        Convert a Tcl_Obj representing the a 3-D coordinate into
    1221  *        a point.
     1221 *      Convert a Tcl_Obj representing the a 3-D coordinate into
     1222 *      a point.
    12221223 *
    12231224 * Results:
    1224  *        The return value is a standard Tcl result.
     1225 *      The return value is a standard Tcl result.
    12251226 *
    12261227 *---------------------------------------------------------------------------
     
    12291230static int
    12301231PointSwitchProc(
    1231     ClientData clientData,        /* Flag indicating if the node is considered
    1232                                 * before or after the insertion position. */
    1233     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1234     const char *switchName,        /* Not used. */
    1235     Tcl_Obj *objPtr,                /* String representation */
    1236     char *record,                /* Structure record */
    1237     int offset,                        /* Not used. */
    1238     int flags)                        /* Not used. */
     1232    ClientData clientData,      /* Flag indicating if the node is considered
     1233                                * before or after the insertion position. */
     1234    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1235    const char *switchName,     /* Not used. */
     1236    Tcl_Obj *objPtr,            /* String representation */
     1237    char *record,               /* Structure record */
     1238    int offset,                 /* Not used. */
     1239    int flags)                  /* Not used. */
    12391240{
    12401241    FlowPoint *pointPtr = (FlowPoint *)(record + offset);
     
    12431244
    12441245    if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
    1245         return TCL_ERROR;
     1246        return TCL_ERROR;
    12461247    }
    12471248    if (objc != 3) {
    1248         Tcl_AppendResult(interp, "wrong # of elements for box coordinates: "
    1249                         " should be \"x y z\"", (char *)NULL);
    1250         return TCL_ERROR;
     1249        Tcl_AppendResult(interp, "wrong # of elements for box coordinates: "
     1250                        " should be \"x y z\"", (char *)NULL);
     1251        return TCL_ERROR;
    12511252    }
    12521253    float values[3];
    12531254    int i;
    12541255    for (i = 0; i < objc; i++) {
    1255         float value;
    1256 
    1257         if (GetFloatFromObj(interp, objv[i], &value) != TCL_OK) {
    1258             return TCL_ERROR;
    1259         }
    1260         values[i] = value;
    1261     }           
     1256        float value;
     1257
     1258        if (GetFloatFromObj(interp, objv[i], &value) != TCL_OK) {
     1259            return TCL_ERROR;
     1260        }
     1261        values[i] = value;
     1262    }      
    12621263    pointPtr->x = values[0];
    12631264    pointPtr->y = values[1];
     
    12711272 * PositionSwitchProc --
    12721273 *
    1273  *        Convert a Tcl_Obj representing the a 3-D coordinate into
    1274  *        a point.
     1274 *      Convert a Tcl_Obj representing the a 3-D coordinate into
     1275 *      a point.
    12751276 *
    12761277 * Results:
    1277  *        The return value is a standard Tcl result.
     1278 *      The return value is a standard Tcl result.
    12781279 *
    12791280 *---------------------------------------------------------------------------
     
    12821283static int
    12831284PositionSwitchProc(
    1284     ClientData clientData,        /* Flag indicating if the node is considered
    1285                                 * before or after the insertion position. */
    1286     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1287     const char *switchName,        /* Not used. */
    1288     Tcl_Obj *objPtr,                /* String representation */
    1289     char *record,                /* Structure record */
    1290     int offset,                        /* Not used. */
    1291     int flags)                        /* Not used. */
     1285    ClientData clientData,      /* Flag indicating if the node is considered
     1286                                * before or after the insertion position. */
     1287    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1288    const char *switchName,     /* Not used. */
     1289    Tcl_Obj *objPtr,            /* String representation */
     1290    char *record,               /* Structure record */
     1291    int offset,                 /* Not used. */
     1292    int flags)                  /* Not used. */
    12921293{
    12931294    FlowPosition *posPtr = (FlowPosition *)(record + offset);
     
    12981299    p = strrchr((char *)string, '%');
    12991300    if (p == NULL) {
    1300         float value;
    1301 
    1302         if (GetFloatFromObj(interp, objPtr, &value) != TCL_OK) {
    1303             return TCL_ERROR;
    1304         }
    1305         posPtr->value = value;
    1306         posPtr->flags = ABSPOS;
     1301        float value;
     1302
     1303        if (GetFloatFromObj(interp, objPtr, &value) != TCL_OK) {
     1304            return TCL_ERROR;
     1305        }
     1306        posPtr->value = value;
     1307        posPtr->flags = ABSPOS;
    13071308    } else {
    1308         double value;
    1309 
    1310         *p = '\0';
    1311         if (Tcl_GetDouble(interp, string, &value) != TCL_OK) {
    1312             return TCL_ERROR;
    1313         }
    1314         posPtr->value = (float)value * 0.01;
    1315         posPtr->flags = RELPOS;
     1309        double value;
     1310
     1311        *p = '\0';
     1312        if (Tcl_GetDouble(interp, string, &value) != TCL_OK) {
     1313            return TCL_ERROR;
     1314        }
     1315        posPtr->value = (float)value * 0.01;
     1316        posPtr->flags = RELPOS;
    13161317    }
    13171318    return TCL_OK;
     
    13231324 * TransferFunctionSwitchProc --
    13241325 *
    1325  *        Convert a Tcl_Obj representing the transfer function into a
    1326  *        TransferFunction pointer.  The transfer function must have been
    1327  *        previously defined.
     1326 *      Convert a Tcl_Obj representing the transfer function into a
     1327 *      TransferFunction pointer.  The transfer function must have been
     1328 *      previously defined.
    13281329 *
    13291330 * Results:
    1330  *        The return value is a standard Tcl result.
     1331 *      The return value is a standard Tcl result.
    13311332 *
    13321333 *---------------------------------------------------------------------------
     
    13351336static int
    13361337TransferFunctionSwitchProc(
    1337     ClientData clientData,        /* Flag indicating if the node is considered
    1338                                 * before or after the insertion position. */
    1339     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1340     const char *switchName,        /* Not used. */
    1341     Tcl_Obj *objPtr,                /* String representation */
    1342     char *record,                /* Structure record */
    1343     int offset,                        /* Not used. */
    1344     int flags)                        /* Not used. */
     1338    ClientData clientData,      /* Flag indicating if the node is considered
     1339                                * before or after the insertion position. */
     1340    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1341    const char *switchName,     /* Not used. */
     1342    Tcl_Obj *objPtr,            /* String representation */
     1343    char *record,               /* Structure record */
     1344    int offset,                 /* Not used. */
     1345    int flags)                  /* Not used. */
    13451346{
    13461347    TransferFunction **funcPtrPtr = (TransferFunction **)(record + offset);
     
    13611362 * VideoFormatSwitchProc --
    13621363 *
    1363  *        Convert a Tcl_Obj representing the video format into its
    1364  *        integer id.
     1364 *      Convert a Tcl_Obj representing the video format into its
     1365 *      integer id.
    13651366 *
    13661367 * Results:
    1367  *        The return value is a standard Tcl result.
     1368 *      The return value is a standard Tcl result.
    13681369 *
    13691370 *---------------------------------------------------------------------------
     
    13721373static int
    13731374VideoFormatSwitchProc(
    1374     ClientData clientData,        /* Not used. */
    1375     Tcl_Interp *interp,                /* Interpreter to send results back to */
    1376     const char *switchName,        /* Not used. */
    1377     Tcl_Obj *objPtr,                /* String representation */
    1378     char *record,                /* Structure record */
    1379     int offset,                        /* Not used. */
    1380     int flags)                        /* Not used. */
     1375    ClientData clientData,      /* Not used. */
     1376    Tcl_Interp *interp,         /* Interpreter to send results back to */
     1377    const char *switchName,     /* Not used. */
     1378    Tcl_Obj *objPtr,            /* String representation */
     1379    char *record,               /* Structure record */
     1380    int offset,                 /* Not used. */
     1381    int flags)                  /* Not used. */
    13811382{
    13821383    Rappture::AVTranslate::VideoFormats *formatPtr =
    1383         (Rappture::AVTranslate::VideoFormats *)(record + offset);
     1384        (Rappture::AVTranslate::VideoFormats *)(record + offset);
    13841385    const char *string;
    13851386    char c;
     
    13881389    c = string[0];
    13891390    if ((c == 'm') && (strcmp(string, "mpeg") == 0)) {
    1390         *formatPtr =  Rappture::AVTranslate::MPEG1;
     1391        *formatPtr =  Rappture::AVTranslate::MPEG1;
    13911392    } else if ((c == 't') && (strcmp(string, "theora") == 0)) {
    1392         *formatPtr = Rappture::AVTranslate::THEORA;
     1393        *formatPtr = Rappture::AVTranslate::THEORA;
    13931394    } else if ((c == 'm') && (strcmp(string, "mov") == 0)) {
    1394         *formatPtr = Rappture::AVTranslate::QUICKTIME;
     1395        *formatPtr = Rappture::AVTranslate::QUICKTIME;
    13951396    } else {
    1396         Tcl_AppendResult(interp, "bad video format \"", string,
     1397        Tcl_AppendResult(interp, "bad video format \"", string,
    13971398                     "\": should be mpeg, theora, or mov", (char*)NULL);
    13981399    }
     
    14021403static int
    14031404FlowConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1404                 Tcl_Obj *const *objv)
     1405                Tcl_Obj *const *objv)
    14051406{
    14061407    FlowCmd *flowPtr = (FlowCmd *)clientData;
    14071408
    14081409    if (flowPtr->ParseSwitches(interp, objc - 2, objv + 2) != TCL_OK) {
    1409         return TCL_ERROR;
     1410        return TCL_ERROR;
    14101411    }
    14111412    NanoVis::EventuallyRedraw(NanoVis::MAP_FLOWS);
     
    14151416static int
    14161417FlowParticlesAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1417                    Tcl_Obj *const *objv)
     1418                   Tcl_Obj *const *objv)
    14181419{
    14191420    FlowCmd *flowPtr = (FlowCmd *)clientData;
    14201421
    14211422    if (flowPtr->CreateParticles(interp, objv[3]) != TCL_OK) {
    1422         return TCL_ERROR;
     1423        return TCL_ERROR;
    14231424    }
    14241425    FlowParticles *particlesPtr;
    14251426    if (flowPtr->GetParticles(interp, objv[3], &particlesPtr) != TCL_OK) {
    1426         return TCL_ERROR;
     1427        return TCL_ERROR;
    14271428    }
    14281429    if (particlesPtr->ParseSwitches(interp, objc - 4, objv + 4) != TCL_OK) {
    1429         delete particlesPtr;
    1430         return TCL_ERROR;
     1430        delete particlesPtr;
     1431        return TCL_ERROR;
    14311432    }
    14321433    particlesPtr->Configure();
     
    14381439static int
    14391440FlowParticlesConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1440                         Tcl_Obj *const *objv)
     1441                        Tcl_Obj *const *objv)
    14411442{
    14421443    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    14441445    FlowParticles *particlesPtr;
    14451446    if (flowPtr->GetParticles(interp, objv[3], &particlesPtr) != TCL_OK) {
    1446         return TCL_ERROR;
     1447        return TCL_ERROR;
    14471448    }
    14481449    if (particlesPtr->ParseSwitches(interp, objc - 4, objv + 4) != TCL_OK) {
    1449         return TCL_ERROR;
     1450        return TCL_ERROR;
    14501451    }
    14511452    particlesPtr->Configure();
     
    14561457static int
    14571458FlowParticlesDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1458                       Tcl_Obj *const *objv)
     1459                      Tcl_Obj *const *objv)
    14591460{
    14601461    FlowCmd *flowPtr = (FlowCmd *)clientData;
    14611462    int i;
    14621463    for (i = 3; i < objc; i++) {
    1463         FlowParticles *particlesPtr;
    1464 
    1465         if (flowPtr->GetParticles(NULL, objv[i], &particlesPtr) == TCL_OK) {
    1466             delete particlesPtr;
    1467         }
     1464        FlowParticles *particlesPtr;
     1465
     1466        if (flowPtr->GetParticles(NULL, objv[i], &particlesPtr) == TCL_OK) {
     1467            delete particlesPtr;
     1468        }
    14681469    }
    14691470    NanoVis::EventuallyRedraw();
     
    14731474static int
    14741475FlowParticlesNamesOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1475                      Tcl_Obj *const *objv)
     1476                     Tcl_Obj *const *objv)
    14761477{
    14771478    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    14811482    FlowParticles *particlesPtr;
    14821483    for (particlesPtr = flowPtr->FirstParticles(&iter); particlesPtr != NULL;
    1483         particlesPtr = flowPtr->NextParticles(&iter)) {
    1484         Tcl_Obj *objPtr;
    1485 
    1486         objPtr = Tcl_NewStringObj(particlesPtr->name(), -1);
    1487         Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     1484        particlesPtr = flowPtr->NextParticles(&iter)) {
     1485        Tcl_Obj *objPtr;
     1486
     1487        objPtr = Tcl_NewStringObj(particlesPtr->name(), -1);
     1488        Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    14881489    }
    14891490    Tcl_SetObjResult(interp, listObjPtr);
     
    14961497 * FlowParticlesObjCmd --
    14971498 *
    1498  *         This procedure is invoked to process commands on behalf of the flow
    1499  *         object.
     1499 *      This procedure is invoked to process commands on behalf of the flow
     1500 *      object.
    15001501 *
    15011502 * Results:
    1502  *        A standard Tcl result.
     1503 *      A standard Tcl result.
    15031504 *
    15041505 * Side effects:
    1505  *        See the user documentation.
     1506 *      See the user documentation.
    15061507 *
    15071508 * $flow particles oper $name
     
    15111512    {"add",        1, FlowParticlesAddOp,        4, 0, "name ?switches?",},
    15121513    {"configure",  1, FlowParticlesConfigureOp,  4, 0, "name ?switches?",},
    1513     {"delete",           1, FlowParticlesDeleteOp,     4, 0, "?name...?"},
     1514    {"delete",     1, FlowParticlesDeleteOp,     4, 0, "?name...?"},
    15141515    {"names",      1, FlowParticlesNamesOp,      3, 4, "?pattern?"},
    15151516};
     
    15191520static int
    15201521FlowParticlesOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1521                Tcl_Obj *const *objv)
     1522               Tcl_Obj *const *objv)
    15221523{
    15231524    Tcl_ObjCmdProc *proc;
    15241525    proc = Rappture::GetOpFromObj(interp, nFlowParticlesOps, flowParticlesOps,
    1525         Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1526        Rappture::CMDSPEC_ARG2, objc, objv, 0);
    15261527    if (proc == NULL) {
    1527         return TCL_ERROR;
     1528        return TCL_ERROR;
    15281529    }
    15291530    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    15371538static int
    15381539FlowBoxAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1539                Tcl_Obj *const *objv)
     1540               Tcl_Obj *const *objv)
    15401541{
    15411542    FlowCmd *flowPtr = (FlowCmd *)clientData;
    15421543
    15431544    if (flowPtr->CreateBox(interp, objv[3]) != TCL_OK) {
    1544         return TCL_ERROR;
     1545        return TCL_ERROR;
    15451546    }
    15461547    FlowBox *boxPtr;
    15471548    if (flowPtr->GetBox(interp, objv[3], &boxPtr) != TCL_OK) {
    1548         return TCL_ERROR;
     1549        return TCL_ERROR;
    15491550    }
    15501551    if (boxPtr->ParseSwitches(interp, objc - 4, objv + 4) != TCL_OK) {
    1551         delete boxPtr;
    1552         return TCL_ERROR;
     1552        delete boxPtr;
     1553        return TCL_ERROR;
    15531554    }
    15541555    NanoVis::EventuallyRedraw();
     
    15591560static int
    15601561FlowBoxDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1561                    Tcl_Obj *const *objv)
     1562                   Tcl_Obj *const *objv)
    15621563{
    15631564    FlowCmd *flowPtr = (FlowCmd *)clientData;
    15641565    int i;
    15651566    for (i = 3; i < objc; i++) {
    1566         FlowBox *boxPtr;
    1567 
    1568         if (flowPtr->GetBox(NULL, objv[i], &boxPtr) == TCL_OK) {
    1569             delete boxPtr;
    1570         }
     1567        FlowBox *boxPtr;
     1568
     1569        if (flowPtr->GetBox(NULL, objv[i], &boxPtr) == TCL_OK) {
     1570            delete boxPtr;
     1571        }
    15711572    }
    15721573    NanoVis::EventuallyRedraw();
     
    15841585    FlowBox *boxPtr;
    15851586    for (boxPtr = flowPtr->FirstBox(&iter); boxPtr != NULL;
    1586         boxPtr = flowPtr->NextBox(&iter)) {
    1587         Tcl_Obj *objPtr;
    1588 
    1589         objPtr = Tcl_NewStringObj(boxPtr->name(), -1);
    1590         Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     1587        boxPtr = flowPtr->NextBox(&iter)) {
     1588        Tcl_Obj *objPtr;
     1589
     1590        objPtr = Tcl_NewStringObj(boxPtr->name(), -1);
     1591        Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    15911592    }
    15921593    Tcl_SetObjResult(interp, listObjPtr);
     
    15961597static int
    15971598FlowBoxConfigureOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1598                         Tcl_Obj *const *objv)
     1599                        Tcl_Obj *const *objv)
    15991600{
    16001601    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    16021603    FlowBox *boxPtr;
    16031604    if (flowPtr->GetBox(interp, objv[3], &boxPtr) != TCL_OK) {
    1604         return TCL_ERROR;
     1605        return TCL_ERROR;
    16051606    }
    16061607    if (boxPtr->ParseSwitches(interp, objc - 4, objv + 4) != TCL_OK) {
    1607         return TCL_ERROR;
     1608        return TCL_ERROR;
    16081609    }
    16091610    NanoVis::EventuallyRedraw();
     
    16161617 * FlowBoxOp--
    16171618 *
    1618  *         This procedure is invoked to process commands on behalf of the flow
    1619  *         object.
     1619 *      This procedure is invoked to process commands on behalf of the flow
     1620 *      object.
    16201621 *
    16211622 * Results:
    1622  *        A standard Tcl result.
     1623 *      A standard Tcl result.
    16231624 *
    16241625 * Side effects:
    1625  *        See the user documentation.
     1626 *      See the user documentation.
    16261627 *
    16271628 *---------------------------------------------------------------------------
     
    16301631    {"add",        1, FlowBoxAddOp,        4, 0, "name ?switches?",},
    16311632    {"configure",  1, FlowBoxConfigureOp,  4, 0, "name ?switches?",},
    1632     {"delete",           1, FlowBoxDeleteOp,     3, 0, "?name...?"},
     1633    {"delete",     1, FlowBoxDeleteOp,     3, 0, "?name...?"},
    16331634    {"names",      1, FlowBoxNamesOp,      3, 0, "?pattern?"},
    16341635};
     
    16381639static int
    16391640FlowBoxOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1640                Tcl_Obj *const *objv)
     1641               Tcl_Obj *const *objv)
    16411642{
    16421643    Tcl_ObjCmdProc *proc;
    16431644    proc = Rappture::GetOpFromObj(interp, nFlowBoxOps, flowBoxOps,
    1644         Rappture::CMDSPEC_ARG2, objc, objv, 0);
     1645        Rappture::CMDSPEC_ARG2, objc, objv, 0);
    16451646    if (proc == NULL) {
    1646         return TCL_ERROR;
     1647        return TCL_ERROR;
    16471648    }
    16481649    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    16671668static int
    16681669FlowLegendOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1669           Tcl_Obj *const *objv)
     1670          Tcl_Obj *const *objv)
    16701671{
    16711672    FlowCmd *flowPtr = (FlowCmd *)clientData;
     
    16981699 * FlowInstObjCmd --
    16991700 *
    1700  *         This procedure is invoked to process commands on behalf of the flow
    1701  *         object.
     1701 *      This procedure is invoked to process commands on behalf of the flow
     1702 *      object.
    17021703 *
    17031704 * Results:
    1704  *        A standard Tcl result.
     1705 *      A standard Tcl result.
    17051706 *
    17061707 * Side effects:
    1707  *        See the user documentation.
     1708 *      See the user documentation.
    17081709 *
    17091710 *---------------------------------------------------------------------------
     
    17121713    {"box",         1, FlowBoxOp,        2, 0, "oper ?args?"},
    17131714    {"configure",   1, FlowConfigureOp,  2, 0, "?switches?"},
    1714     {"data",            1, FlowDataOp,       2, 0, "oper ?args?"},
     1715    {"data",        1, FlowDataOp,       2, 0, "oper ?args?"},
    17151716    {"legend",      1, FlowLegendOp,     4, 4, "w h"},
    17161717    {"particles",   1, FlowParticlesOp,  2, 0, "oper ?args?"}
     
    17201721static int
    17211722FlowInstObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,
    1722                Tcl_Obj *const *objv)
     1723               Tcl_Obj *const *objv)
    17231724{
    17241725    Tcl_ObjCmdProc *proc;
    17251726    proc = Rappture::GetOpFromObj(interp, nFlowInstOps, flowInstOps,
    1726         Rappture::CMDSPEC_ARG1, objc, objv, 0);
     1727        Rappture::CMDSPEC_ARG1, objc, objv, 0);
    17271728    if (proc == NULL) {
    1728         return TCL_ERROR;
     1729        return TCL_ERROR;
    17291730    }
    17301731    assert(CheckGL(AT));
     
    17421743 * FlowInstDeleteProc --
    17431744 *
    1744  *        Deletes the command associated with the tree.  This is called only
    1745  *        when the command associated with the tree is destroyed.
     1745 *      Deletes the command associated with the tree.  This is called only
     1746 *      when the command associated with the tree is destroyed.
    17461747 *
    17471748 * Results:
    1748  *        None.
     1749 *      None.
    17491750 *
    17501751 *---------------------------------------------------------------------------
     
    17671768static int
    17681769FlowAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1769           Tcl_Obj *const *objv)
     1770          Tcl_Obj *const *objv)
    17701771{
    17711772    if (NanoVis::CreateFlow(interp, objv[2]) != TCL_OK) {
    1772         return TCL_ERROR;
     1773        return TCL_ERROR;
    17731774    }
    17741775    FlowCmd *flowPtr;
    17751776    if (NanoVis::GetFlow(interp, objv[2], &flowPtr) != TCL_OK) {
    1776         return TCL_ERROR;
     1777        return TCL_ERROR;
    17771778    }
    17781779    if (flowPtr->ParseSwitches(interp, objc - 3, objv + 3) != TCL_OK) {
    1779         Tcl_DeleteCommand(interp, flowPtr->name());
    1780         return TCL_ERROR;
     1780        Tcl_DeleteCommand(interp, flowPtr->name());
     1781        return TCL_ERROR;
    17811782    }
    17821783    Tcl_SetObjResult(interp, objv[2]);
     
    17951796static int
    17961797FlowDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1797              Tcl_Obj *const *objv)
     1798             Tcl_Obj *const *objv)
    17981799{
    17991800    int i;
    18001801
    18011802    for (i = 2; i < objc; i++) {
    1802         FlowCmd *flowPtr;
    1803 
    1804         if (NanoVis::GetFlow(interp, objv[i], &flowPtr) != TCL_OK) {
    1805             return TCL_ERROR;
    1806         }
    1807         Tcl_DeleteCommand(interp, flowPtr->name());
     1803        FlowCmd *flowPtr;
     1804
     1805        if (NanoVis::GetFlow(interp, objv[i], &flowPtr) != TCL_OK) {
     1806            return TCL_ERROR;
     1807        }
     1808        Tcl_DeleteCommand(interp, flowPtr->name());
    18081809    }
    18091810    NanoVis::EventuallyRedraw(NanoVis::MAP_FLOWS);
     
    18211822static int
    18221823FlowExistsOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1823              Tcl_Obj *const *objv)
     1824             Tcl_Obj *const *objv)
    18241825{
    18251826    bool value;
     
    18281829    value = false;
    18291830    if (NanoVis::GetFlow(NULL, objv[2], &flowPtr) == TCL_OK) {
    1830         value = true;
     1831        value = true;
    18311832    }
    18321833    Tcl_SetBooleanObj(Tcl_GetObjResult(interp), (int)value);
     
    18391840 * FlowGotoOp --
    18401841 *
    1841  *        flow goto number
     1842 *      flow goto number
    18421843 *
    18431844 *---------------------------------------------------------------------------
     
    18521853    }
    18531854    if ((nSteps < 0) || (nSteps > SHRT_MAX)) {
    1854         Tcl_AppendResult(interp, "flow goto: bad # of steps \"",
    1855                         Tcl_GetString(objv[2]), "\"", (char *)NULL);
    1856         return TCL_ERROR;
     1855        Tcl_AppendResult(interp, "flow goto: bad # of steps \"",
     1856                        Tcl_GetString(objv[2]), "\"", (char *)NULL);
     1857        return TCL_ERROR;
    18571858    }
    18581859    NanoVis::ResetFlows();
    18591860    if (NanoVis::flags & NanoVis::MAP_FLOWS) {
    1860         NanoVis::MapFlows();
     1861        NanoVis::MapFlows();
    18611862    }
    18621863    int i;
    18631864    NanoVis::AdvectFlows();
    18641865    for (i = 0; i < nSteps; i++) {
    1865         if (NanoVis::licRenderer->active()) {
    1866             NanoVis::licRenderer->convolve();
    1867         }
    1868         NanoVis::AdvectFlows();
     1866        if (NanoVis::licRenderer->active()) {
     1867            NanoVis::licRenderer->convolve();
     1868        }
     1869        NanoVis::AdvectFlows();
    18691870    }
    18701871    NanoVis::EventuallyRedraw();
     
    18821883static int
    18831884FlowNamesOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1884             Tcl_Obj *const *objv)
     1885            Tcl_Obj *const *objv)
    18851886{
    18861887    Tcl_Obj *listObjPtr;
     
    18891890    FlowIterator iter;
    18901891    for (flowPtr = NanoVis::FirstFlow(&iter); flowPtr != NULL;
    1891         flowPtr = NanoVis::NextFlow(&iter)) {
    1892         Tcl_Obj *objPtr;
    1893 
    1894         objPtr = Tcl_NewStringObj(flowPtr->name(), -1);
    1895         Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
     1892        flowPtr = NanoVis::NextFlow(&iter)) {
     1893        Tcl_Obj *objPtr;
     1894
     1895        objPtr = Tcl_NewStringObj(flowPtr->name(), -1);
     1896        Tcl_ListObjAppendElement(interp, listObjPtr, objPtr);
    18961897    }
    18971898    Tcl_SetObjResult(interp, listObjPtr);
     
    19051906    assert(NanoVis::licRenderer != NULL);
    19061907    if (NanoVis::flags & NanoVis::MAP_FLOWS) {
    1907         NanoVis::MapFlows();
     1908        NanoVis::MapFlows();
    19081909    }
    19091910    NanoVis::EventuallyRedraw();
     
    19221923
    19231924struct FlowVideoValues {
    1924     float frameRate;                        /* Frame rate */
    1925     int bitRate;                        /* Video bitrate */
    1926     int width, height;                        /* Dimensions of video frame. */
     1925    float frameRate;                    /* Frame rate */
     1926    int bitRate;                        /* Video bitrate */
     1927    int width, height;                  /* Dimensions of video frame. */
    19271928    int nFrames;
    19281929    Rappture::AVTranslate::VideoFormats format;
     
    19361937Rappture::SwitchSpec FlowCmd::videoSwitches[] = {
    19371938    {Rappture::SWITCH_FLOAT, "-bitrate", "value",
    1938         offsetof(FlowVideoValues, bitRate), 0},
     1939        offsetof(FlowVideoValues, bitRate), 0},
    19391940    {Rappture::SWITCH_CUSTOM, "-format", "string",
    19401941        offsetof(FlowVideoValues, format), 0, 0, &videoFormatSwitch},
    19411942    {Rappture::SWITCH_FLOAT, "-framerate", "value",
    1942         offsetof(FlowVideoValues, frameRate), 0},
     1943        offsetof(FlowVideoValues, frameRate), 0},
    19431944    {Rappture::SWITCH_INT, "-height", "integer",
    1944         offsetof(FlowVideoValues, height), 0},
     1945        offsetof(FlowVideoValues, height), 0},
    19451946    {Rappture::SWITCH_INT, "-numframes", "count",
    1946         offsetof(FlowVideoValues, nFrames), 0},
     1947        offsetof(FlowVideoValues, nFrames), 0},
    19471948    {Rappture::SWITCH_INT, "-width", "integer",
    1948         offsetof(FlowVideoValues, width), 0},
     1949        offsetof(FlowVideoValues, width), 0},
    19491950    {Rappture::SWITCH_END}
    19501951};
     
    19521953static int
    19531954FlowVideoOp(ClientData clientData, Tcl_Interp *interp, int objc,
    1954             Tcl_Obj *const *objv)
     1955            Tcl_Obj *const *objv)
    19551956{
    19561957    struct pollfd pollResults;
     
    19601961    pollResults.events = POLLIN;
    19611962
    1962 #define PENDING_TIMEOUT                10  /* milliseconds. */
     1963#define PENDING_TIMEOUT         10  /* milliseconds. */
    19631964    timeout = PENDING_TIMEOUT;
    19641965
     
    19671968
    19681969    token = Tcl_GetString(objv[2]);
    1969     values.frameRate = 25.0f;                // Default frame rate 25 fps
    1970     values.bitRate = 6.0e+6f;                // Default video bit rate.
     1970    values.frameRate = 25.0f;           // Default frame rate 25 fps
     1971    values.bitRate = 6.0e+6f;           // Default video bit rate.
    19711972    values.width = NanoVis::win_width;
    19721973    values.height = NanoVis::win_height;
     
    19741975    values.format = Rappture::AVTranslate::MPEG1;
    19751976    if (Rappture::ParseSwitches(interp, FlowCmd::videoSwitches,
    1976         objc - 3, objv + 3, &values, SWITCH_DEFAULTS) < 0) {
    1977         return TCL_ERROR;
     1977        objc - 3, objv + 3, &values, SWITCH_DEFAULTS) < 0) {
     1978        return TCL_ERROR;
    19781979    }
    19791980    if ((values.width < 0) || (values.width > SHRT_MAX) ||
    1980         (values.height < 0) || (values.height > SHRT_MAX)) {
    1981         Tcl_AppendResult(interp, "bad dimensions for video", (char *)NULL);
    1982         return TCL_ERROR;
     1981        (values.height < 0) || (values.height > SHRT_MAX)) {
     1982        Tcl_AppendResult(interp, "bad dimensions for video", (char *)NULL);
     1983        return TCL_ERROR;
    19831984    }
    19841985    if ((values.frameRate < 0.0f) || (values.frameRate > 30.0f)) {
    1985         Tcl_AppendResult(interp, "bad frame rate.", (char *)NULL);
    1986         return TCL_ERROR;
     1986        Tcl_AppendResult(interp, "bad frame rate.", (char *)NULL);
     1987        return TCL_ERROR;
    19871988    }
    19881989    if (values.bitRate < 0.0f) {
    1989         Tcl_AppendResult(interp, "bad bit rate.", (char *)NULL);
    1990         return TCL_ERROR;
     1990        Tcl_AppendResult(interp, "bad bit rate.", (char *)NULL);
     1991        return TCL_ERROR;
    19911992    }
    19921993    if (NanoVis::licRenderer == NULL) {
    1993         Tcl_AppendResult(interp, "no lic renderer.", (char *)NULL);
    1994         return TCL_ERROR;
     1994        Tcl_AppendResult(interp, "no lic renderer.", (char *)NULL);
     1995        return TCL_ERROR;
    19951996    }
    19961997    // Save the old dimensions of the offscreen buffer.
     
    20042005
    20052006    Rappture::AVTranslate movie(values.width, values.height, values.bitRate,
    2006         values.frameRate);
     2007        values.frameRate);
    20072008    char tmpFileName[200];
    20082009    sprintf(tmpFileName,"/tmp/flow%d.mpeg", getpid());
    20092010    if (!movie.init(context, tmpFileName)) {
    20102011        Tcl_AppendResult(interp, "can't initialized movie \"", tmpFileName,
    2011                 "\": ", context.remark(), (char *)NULL);
    2012         return TCL_ERROR;
     2012                "\": ", context.remark(), (char *)NULL);
     2013        return TCL_ERROR;
    20132014    }
    20142015    if ((values.width != oldWidth) || (values.height != oldHeight)) {
    2015         // Resize to the requested size.
    2016         NanoVis::resize_offscreen_buffer(values.width, values.height);
     2016        // Resize to the requested size.
     2017        NanoVis::resize_offscreen_buffer(values.width, values.height);
    20172018    }
    20182019    // Now compute the line padding for the offscreen buffer.
     
    20242025    bool canceled = false;
    20252026    for (int i = 1; i <= values.nFrames; i++) {
    2026         if (((i & 0xF) == 0) && (poll(&pollResults, 1, 0) > 0)) {
    2027             /* If there's another command on stdin, that means the client is
    2028              * trying to cancel this operation. */
    2029             canceled = true;
    2030             break;
    2031         }
    2032         if (NanoVis::licRenderer->active()) {
    2033             NanoVis::licRenderer->convolve();
    2034         }
    2035         NanoVis::AdvectFlows();
    2036         NanoVis::offscreen_buffer_capture();
     2027        if (((i & 0xF) == 0) && (poll(&pollResults, 1, 0) > 0)) {
     2028            /* If there's another command on stdin, that means the client is
     2029             * trying to cancel this operation. */
     2030            canceled = true;
     2031            break;
     2032        }
     2033        if (NanoVis::licRenderer->active()) {
     2034            NanoVis::licRenderer->convolve();
     2035        }
     2036        NanoVis::AdvectFlows();
     2037        NanoVis::offscreen_buffer_capture();
    20372038        NanoVis::display();
    20382039        NanoVis::read_screen();
     
    20432044    Trace("FLOW end\n");
    20442045    if (!canceled) {
    2045         Rappture::Buffer data;
    2046 
    2047         /* FIXME: find a way to get the data from the movie object as a
    2048         * void* */
    2049         if (!data.load(context, tmpFileName)) {
    2050             Tcl_AppendResult(interp, "can't load data from temporary file \"",
    2051                 tmpFileName, "\": ", context.remark(), (char *)NULL);
    2052             return TCL_ERROR;
    2053         }
    2054 
    2055         char command[200];
    2056         sprintf(command,"nv>image -bytes %lu -type movie -token \"%s\"\n",
    2057                 (unsigned long)data.size(), token);
    2058         NanoVis::sendDataToClient(command, data.bytes(), data.size());
     2046        Rappture::Buffer data;
     2047
     2048        /* FIXME: find a way to get the data from the movie object as a
     2049        * void* */
     2050        if (!data.load(context, tmpFileName)) {
     2051            Tcl_AppendResult(interp, "can't load data from temporary file \"",
     2052                tmpFileName, "\": ", context.remark(), (char *)NULL);
     2053            return TCL_ERROR;
     2054        }
     2055
     2056        char command[200];
     2057        sprintf(command,"nv>image -bytes %lu -type movie -token \"%s\"\n",
     2058                (unsigned long)data.size(), token);
     2059        NanoVis::sendDataToClient(command, data.bytes(), data.size());
    20592060    }
    20602061    if ((values.width != oldWidth) || (values.height != oldHeight)) {
    2061         NanoVis::resize_offscreen_buffer(oldWidth, oldHeight);
     2062        NanoVis::resize_offscreen_buffer(oldWidth, oldHeight);
    20622063    }
    20632064    NanoVis::ResetFlows();
    20642065    if (unlink(tmpFileName) != 0) {
    20652066        Tcl_AppendResult(interp, "can't unlink temporary movie file \"",
    2066                 tmpFileName, "\": ", Tcl_PosixError(interp), (char *)NULL);
    2067         return TCL_ERROR;
     2067                tmpFileName, "\": ", Tcl_PosixError(interp), (char *)NULL);
     2068        return TCL_ERROR;
    20682069    }
    20692070    return TCL_OK;
     
    20932094static int
    20942095FlowCmdProc(ClientData clientData, Tcl_Interp *interp, int objc,
    2095             Tcl_Obj *const *objv)
     2096            Tcl_Obj *const *objv)
    20962097{
    20972098    Tcl_ObjCmdProc *proc;
    20982099
    20992100    proc = Rappture::GetOpFromObj(interp, nFlowCmdOps, flowCmdOps,
    2100         Rappture::CMDSPEC_ARG1, objc, objv, 0);
     2101        Rappture::CMDSPEC_ARG1, objc, objv, 0);
    21012102    if (proc == NULL) {
    2102         return TCL_ERROR;
     2103        return TCL_ERROR;
    21032104    }
    21042105    return (*proc) (clientData, interp, objc, objv);
     
    21102111 * FlowCmdInitProc --
    21112112 *
    2112  *        This procedure is invoked to initialize the "tree" command.
     2113 *      This procedure is invoked to initialize the "tree" command.
    21132114 *
    21142115 * Results:
    2115  *        None.
     2116 *      None.
    21162117 *
    21172118 * Side effects:
    2118  *        Creates the new command and adds a new entry into a global Tcl
    2119  *        associative array.
     2119 *      Creates the new command and adds a new entry into a global Tcl
     2120 *      associative array.
    21202121 *
    21212122 *---------------------------------------------------------------------------
     
    21412142  if (line == endPtr) {
    21422143      vtkErrorMacro(<<"Premature EOF reading first line! " << " for file: "
    2143                     << (this->FileName?this->FileName:"(Null FileName)"));
     2144                    << (this->FileName?this->FileName:"(Null FileName)"));
    21442145      return false;
    21452146  }
    21462147  if (sscanf(line, "# vtk DataFile Version %s", version) != 1) {
    21472148      vtkErrorMacro(<< "Unrecognized file type: "<< line << " for file: "
    2148                     << (this->FileName?this->FileName:"(Null FileName)"));
     2149                    << (this->FileName?this->FileName:"(Null FileName)"));
    21492150      return false;
    21502151  }   
     
    21532154  if (line == endPtr) {
    21542155      vtkErrorMacro(<<"Premature EOF reading title! " << " for file: "
    2155                     << (this->FileName?this->FileName:"(Null FileName)"));
     2156                    << (this->FileName?this->FileName:"(Null FileName)"));
    21562157      return false;
    21572158  }
     
    21662167  if (line == endPtr) {
    21672168      vtkErrorMacro(<<"Premature EOF reading file type!" << " for file: "
    2168                     << (this->FileName?this->FileName:"(Null FileName)"));
     2169                    << (this->FileName?this->FileName:"(Null FileName)"));
    21692170      return false;
    21702171  }
     
    21762177  } else {
    21772178      vtkErrorMacro(<< "Unrecognized file type: "<< line << " for file: "
    2178                     << (this->FileName?this->FileName:"(Null FileName)"));
     2179                    << (this->FileName?this->FileName:"(Null FileName)"));
    21792180      _fileType = 0;
    21802181      return false;
     
    21852186  if (line == endPtr) {
    21862187      vtkErrorMacro(<<"Premature EOF reading file type!" << " for file: "
    2187                     << (this->FileName?this->FileName:"(Null FileName)"));
     2188                    << (this->FileName?this->FileName:"(Null FileName)"));
    21882189      return false;
    21892190  }
     
    21932194      line = getline(&p, endPtr);
    21942195      if (line == endPtr) {
    2195           // EOF
     2196          // EOF
    21962197      }
    21972198      type = GetWord(line, &endPtr);
    21982199      if (strncasecmp(word, "structured_grid", 15) == 0) {
    2199           vtkErrorMacro(<< "Cannot read dataset type: " << line);
    2200           return 1;
     2200          vtkErrorMacro(<< "Cannot read dataset type: " << line);
     2201          return 1;
    22012202      }
    22022203    // Read keyword and dimensions
  • trunk/packages/vizservers/nanovis/Makefile.in

    r1703 r1899  
    107107CFLAGS          = @CFLAGS@
    108108EXTRA_CFLAGS    = -Wall
    109 DEFINES         = @DEFINES@
    110 CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
     109DEFINES         =
     110CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
    111111
    112112OBJS            = \
  • trunk/packages/vizservers/nanovis/RpAVTranslate.h

    r1850 r1899  
    1818
    1919extern "C" {
    20 #define __STDC_CONSTANT_MACROS 1
     20#ifndef INT64_C
     21#if SIZEOF_LONG == 8
     22#  define INT64_C(c)  c ## L
     23#  define UINT64_C(c) c ## UL
     24#else
     25#  define INT64_C(c)  c ## LL
     26#  define UINT64_C(c) c ## ULL
     27# endif
     28#endif
    2129#ifdef HAVE_FFMPEG_AVFORMAT_H
    2230#include <ffmpeg/avformat.h>
     
    5361    size_t _height;
    5462    size_t _bitRate;
    55     float _frameRate;                // frames/seconds
     63    float _frameRate;           // frames/seconds
    5664    size_t _videoOutbufSize;
    5765    uint8_t *_videoOutbuf;
    5866
    5967    size_t width(void) {
    60         return _width;
     68        return _width;
    6169    }
    6270    void width(size_t width) {
    63         _width = width;
     71        _width = width;
    6472    }
    6573    size_t height(void) {
    66         return _width;
     74        return _width;
    6775    }
    6876    void height(size_t width) {
    69         _width = width;
     77        _width = width;
    7078    }
    7179    size_t bitRate(void) {
    72         return _bitRate;
     80        return _bitRate;
    7381    }
    7482    void bitRate(size_t bitRate) {
    75         _bitRate = bitRate;
     83        _bitRate = bitRate;
    7684    }
    7785    float frameRate(void) {
    78         return _frameRate;
     86        return _frameRate;
    7987    }
    8088    void frameRate(size_t frameRate) {
    81         _frameRate = frameRate;
     89        _frameRate = frameRate;
    8290    }
    8391    AVOutputFormat *_fmtPtr;
  • trunk/packages/vizservers/nanovis/nanovis.cpp

    r1703 r1899  
    3030#include <string>
    3131#include <sys/resource.h>
     32#include <sys/stat.h>
    3233#include <sys/time.h>
    3334#include <sys/times.h>
  • trunk/packages/vizservers/nanovis/nvconf.h.in

    r1353 r1899  
    8888#undef PACKAGE_TARNAME
    8989
     90/* Define to the home page for this package. */
     91#undef PACKAGE_URL
     92
    9093/* Define to the version of this package. */
    9194#undef PACKAGE_VERSION
     95
     96/* The size of `float', as computed by sizeof. */
     97#undef SIZEOF_FLOAT
     98
     99/* The size of `int', as computed by sizeof. */
     100#undef SIZEOF_INT
     101
     102/* The size of `long', as computed by sizeof. */
     103#undef SIZEOF_LONG
     104
     105/* The size of `long long', as computed by sizeof. */
     106#undef SIZEOF_LONG_LONG
     107
     108/* The size of `void *', as computed by sizeof. */
     109#undef SIZEOF_VOID_P
    92110
    93111/* Define to 1 if you have the ANSI C header files. */
Note: See TracChangeset for help on using the changeset viewer.