Ignore:
Timestamp:
Aug 2, 2014, 11:06:20 AM (10 years ago)
Author:
ldelgass
Message:

merge r3597 from trunk

Location:
nanovis/branches/1.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.1

  • nanovis/branches/1.1/VolumeInterpolator.cpp

    r3502 r4612  
    125125
    126126void
    127 VolumeInterpolator::addVolume(Volume *refPtr)
     127VolumeInterpolator::addVolume(Volume *volume)
    128128{
    129129    if (_volumes.size() != 0) {
    130         if (_volumes[0]->width() != refPtr->width() ||
    131             _volumes[0]->height() != refPtr->height() ||   
    132             _volumes[0]->depth() != refPtr->depth() ||
    133             _volumes[0]->numComponents() != refPtr->numComponents()) {
     130        if (_volumes[0]->width() != volume->width() ||
     131            _volumes[0]->height() != volume->height() ||   
     132            _volumes[0]->depth() != volume->depth() ||
     133            _volumes[0]->numComponents() != volume->numComponents()) {
    134134            TRACE("The volume should be the same width, height, number of components");
    135135            return;
    136136        }
    137137    } else {
    138         _dataCount = refPtr->width() * refPtr->height() * refPtr->depth();
    139         _numComponents = refPtr->numComponents();
     138        _dataCount = volume->width() * volume->height() * volume->depth();
     139        _numComponents = volume->numComponents();
    140140        _numBytes = _dataCount * _numComponents * sizeof(float);
    141         Vector3f loc = refPtr->location();
     141        Vector3f loc = volume->location();
    142142        _volume = new Volume(loc.x, loc.y, loc.z,
    143                              refPtr->width(),
    144                              refPtr->height(),
    145                              refPtr->depth(),
    146                              refPtr->numComponents(),
    147                              refPtr->data(),
    148                              refPtr->wAxis.min(),
    149                              refPtr->wAxis.max(),
    150                              refPtr->nonZeroMin());
     143                             volume->width(),
     144                             volume->height(),
     145                             volume->depth(),
     146                             volume->numComponents(),
     147                             volume->data(),
     148                             volume->wAxis.min(),
     149                             volume->wAxis.max(),
     150                             volume->nonZeroMin());
    151151
    152152        _volume->numSlices(256-1);
     
    156156        _volume->visible(true);
    157157        _volume->dataEnabled(true);
    158         _volume->ambient(refPtr->ambient());
    159         _volume->diffuse(refPtr->diffuse());
    160         _volume->specularLevel(refPtr->specularLevel());
    161         _volume->specularExponent(refPtr->specularExponent());
    162         _volume->opacityScale(refPtr->opacityScale());
     158        _volume->ambient(volume->ambient());
     159        _volume->diffuse(volume->diffuse());
     160        _volume->specularLevel(volume->specularLevel());
     161        _volume->specularExponent(volume->specularExponent());
     162        _volume->opacityScale(volume->opacityScale());
    163163        _volume->isosurface(0);
    164164        TRACE("VOL : location %f %f %f\n\tid : %s", loc.x, loc.y, loc.z,
    165                refPtr->name());
     165               volume->name());
    166166    }
    167167    _volumes.push_back(_volume);
    168     TRACE("a Volume[%s] is added to VolumeInterpolator", refPtr->name());
     168    TRACE("a Volume[%s] is added to VolumeInterpolator", volume->name());
    169169}
    170170
Note: See TracChangeset for help on using the changeset viewer.