Changeset 4612 for nanovis/branches/1.1/VolumeInterpolator.cpp
- Timestamp:
- Aug 2, 2014, 11:06:20 AM (10 years ago)
- Location:
- nanovis/branches/1.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nanovis/branches/1.1
- Property svn:mergeinfo changed
/trunk/packages/vizservers/nanovis merged: 3597
- Property svn:mergeinfo changed
-
nanovis/branches/1.1/VolumeInterpolator.cpp
r3502 r4612 125 125 126 126 void 127 VolumeInterpolator::addVolume(Volume * refPtr)127 VolumeInterpolator::addVolume(Volume *volume) 128 128 { 129 129 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()) { 134 134 TRACE("The volume should be the same width, height, number of components"); 135 135 return; 136 136 } 137 137 } 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(); 140 140 _numBytes = _dataCount * _numComponents * sizeof(float); 141 Vector3f loc = refPtr->location();141 Vector3f loc = volume->location(); 142 142 _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()); 151 151 152 152 _volume->numSlices(256-1); … … 156 156 _volume->visible(true); 157 157 _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()); 163 163 _volume->isosurface(0); 164 164 TRACE("VOL : location %f %f %f\n\tid : %s", loc.x, loc.y, loc.z, 165 refPtr->name());165 volume->name()); 166 166 } 167 167 _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()); 169 169 } 170 170
Note: See TracChangeset
for help on using the changeset viewer.