Changeset 777 for trunk


Ignore:
Timestamp:
Jul 9, 2007 5:14:09 PM (17 years ago)
Author:
vrinside
Message:

modified creation of zincblende volume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/nanovis/NvZincBlendeReconstructor.cpp

    r617 r777  
    9696        // The reasone why index is multiplied by 4 is that one unit cell has half of eight atoms
    9797        // ,i.e. four atoms are mapped into RGBA component of one texel
    98         return ((int) (indexZ - 1)+ (int) (indexX - 1) * width + (int) (indexY - 1) * width * height) * 4;
     98        //return ((int) (indexZ - 1)+ (int) (indexX - 1) * width + (int) (indexY - 1) * width * height) * 4;
     99        return ((int) (indexX - 1)+ (int) (indexY - 1) * width + (int) (indexZ - 1) * width * height) * 4;
    99100    }
    100101};
     
    137138    _NvAtomInfo* srcPtr = (_NvAtomInfo*) data;
    138139
    139     float vmin, vmax;
     140    float vmin, vmax, nzero_min;
    140141    float* component4A, *component4B;
    141142    int index;
     
    162163        vmax = _NvMax3(_NvMax4(component4A), _NvMax4(component4B), vmax);
    163164        vmin = _NvMin3(_NvMin4(component4A), _NvMin4(component4B), vmin);
     165
     166        if (vmin != 0.0 && vmin < nzero_min)
     167        {
     168            nzero_min = vmin;   
     169        }
    164170    }
    165171
     
    182188                                            width, height, depth, 1, 4,
    183189                                            fourAnionVolume, fourCationVolume,
    184                                             vmin, vmax, cellSize);
     190                                            vmin, vmax, nzero_min, cellSize);
    185191
    186192    return zincBlendeVolume;
Note: See TracChangeset for help on using the changeset viewer.