Changeset 2975


Ignore:
Timestamp:
Apr 19, 2012 11:40:03 AM (10 years ago)
Author:
ldelgass
Message:

Unfriend NanoVis? from VolumeRenderer?, use getVolumeInterpolator() method instead
of accessing private member pointer.

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

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/VolumeRenderer.h

    r2974 r2975  
    6363    }
    6464
    65     friend class NanoVis;
    66 
    6765private:
    6866    void initShaders();
  • trunk/packages/vizservers/nanovis/nanovis.cpp

    r2972 r2975  
    14231423void NanoVis::update()
    14241424{
    1425     if (volRenderer->_volumeInterpolator->isStarted()) {
     1425    VolumeInterpolator *volInterp = volRenderer->getVolumeInterpolator();
     1426    if (volInterp->isStarted()) {
    14261427        struct timeval clock;
    14271428        gettimeofday(&clock, NULL);
     
    14291430
    14301431        elapsed_time = clock.tv_sec + clock.tv_usec/1000000.0 -
    1431             volRenderer->_volumeInterpolator->getStartTime();
     1432            volInterp->getStartTime();
    14321433
    14331434        TRACE("%lf %lf\n", elapsed_time,
    1434                volRenderer->_volumeInterpolator->getInterval());
     1435              volInterp->getInterval());
    14351436        float fraction;
    14361437        float f;
    14371438
    1438         f = fmod((float) elapsed_time, (float)volRenderer->_volumeInterpolator->getInterval());
     1439        f = fmod((float) elapsed_time, (float)volInterp->getInterval());
    14391440        if (f == 0.0) {
    14401441            fraction = 0.0f;
    14411442        } else {
    1442             fraction = f / volRenderer->_volumeInterpolator->getInterval();
     1443            fraction = f / volInterp->getInterval();
    14431444        }
    14441445        TRACE("fraction : %f\n", fraction);
    1445         volRenderer->_volumeInterpolator->update(fraction);
     1446        volInterp->update(fraction);
    14461447    }
    14471448}
Note: See TracChangeset for help on using the changeset viewer.