Changeset 2814


Ignore:
Timestamp:
Mar 6, 2012 12:58:23 PM (12 years ago)
Author:
ldelgass
Message:

Fix warnings

Location:
trunk/packages/vizservers/nanovis
Files:
3 edited

Legend:

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

    r2809 r2814  
    7979void *ParticleSystem::dataLoadMain(void *data)
    8080{
    81     ParticleSystem* particleSystem = (ParticleSystem*) data;
     81    ParticleSystem *particleSystem = (ParticleSystem *)data;
    8282    CircularFifo<float*, 10>& queue = particleSystem->_queue;
    8383
     
    9090
    9191    int curIndex = startIndex;
    92     float flowWidth = particleSystem->_flowWidth;
    93     float flowHeight = particleSystem->_flowHeight;
    94     float flowDepth = particleSystem->_flowDepth;
     92    int flowWidth = particleSystem->_flowWidth;
     93    int flowHeight = particleSystem->_flowHeight;
     94    int flowDepth = particleSystem->_flowDepth;
    9595
    9696    const char* fileNameFormat = particleSystem->_fileNameFormat.c_str();
     
    108108                sprintf(buff, fileNameFormat, curIndex);
    109109                //std::string path = vrFilePath::getInstance()->getPath(buff);
     110#ifdef WANT_TRACE
    110111                float t = clock() /(float) CLOCKS_PER_SEC;
     112#endif
    111113                LoadProcessedFlowRaw(buff, flowWidth, flowHeight, flowDepth, queue.array[tail]);
     114#ifdef WANT_TRACE
    112115                float ti = clock() / (float) CLOCKS_PER_SEC;
    113                 printf("%f\n",ti - t);
     116                TRACE("LoadProcessedFlowRaw time: %f\n", ti - t);
     117#endif
    114118                queue.push();
    115119                TRACE("%d loaded\n", curIndex);
     
    10731077#ifdef WANT_TRACE
    10741078                    float t = clock() /(float) CLOCKS_PER_SEC;
     1079#endif
    10751080                    _vectorFields[0]->updatePixels(data);
     1081#ifdef WANT_TRACE
    10761082                    float ti = clock() / (float) CLOCKS_PER_SEC;
    1077                     TRACE("pixels %f\n",ti - t);
     1083                    TRACE("updatePixels time: %f\n", ti - t);
    10781084#endif
    10791085                    _queue.pop();
     
    11741180        for (unsigned int i = 0; i < _emitters.size(); ++i) {
    11751181            // TBD..
    1176             unsigned int numOfNewParticles = randomRange(_emitters[i]->_minNumOfNewParticles, _emitters[i]->_maxNumOfNewParticles) * deltaT;
     1182            unsigned int numOfNewParticles = (unsigned int)(randomRange(_emitters[i]->_minNumOfNewParticles, _emitters[i]->_maxNumOfNewParticles) * deltaT);
    11771183            for (unsigned int k = 0; k < numOfNewParticles; ++k) {
    11781184                float3 position = _emitters[i]->_position;
  • trunk/packages/vizservers/nanovis/ParticleSystemFactory.cpp

    r2805 r2814  
    114114            pointSize = (float) atof(attrs[i + 1]);
    115115        } else if (!strcmp(attrs[i], "vector-field-x")) {
    116             fieldWidth = (float) atof(attrs[i + 1]);
     116            fieldWidth = atoi(attrs[i + 1]);
    117117        } else if (!strcmp(attrs[i], "vector-field-y")) {
    118             fieldHeight = (float) atof(attrs[i + 1]);
     118            fieldHeight = atoi(attrs[i + 1]);
    119119        } else if (!strcmp(attrs[i], "vector-field-z")) {
    120             fieldDepth = (float) atof(attrs[i + 1]);
     120            fieldDepth = atoi(attrs[i + 1]);
    121121        } else if (!strcmp(attrs[i], "sort-enabled")) {
    122122            if (!strcmp(attrs[i + 1], "true"))
  • trunk/packages/vizservers/nanovis/PointSet.cpp

    r2798 r2814  
    5252    int index;
    5353    float d = _max - _min;
    54     for (/*empty*/; c <= end; c = (PCA::Cluster*)((char *)c+sizeof(PCA::Cluster))){
     54    for (; c <= end; c = (PCA::Cluster*)((char *)c+sizeof(PCA::Cluster))){
    5555        points = c->points;
    5656        numOfPoints = c->numOfPoints;
    57        
     57
    5858        for (int i = 0; i < numOfPoints; ++i) {
    59             index = (points[i].value - _min) / d  * (colorCount - 1);
     59            index = (int)((points[i].value - _min) / d  * (colorCount - 1));
    6060            if (index >= colorCount) {
    6161                index = colorCount - 1;
Note: See TracChangeset for help on using the changeset viewer.