标签:des style blog io ar color os sp for
//-------------------------------------------------------------- // Name: CTERRAIN::FilterHeightBand - private // Description: Apply the erosion filter to an individual // band of height values // Arguments: -fpBand: the band to be filtered // -iStride: how far to advance per pass // -iCount: Number of passes to make // -fFilter: the filter strength // Return Value: None //-------------------------------------------------------------- void CTERRAIN::FilterHeightBand(float* fpBand, int iStride, int iCount, float fFilter ) { float v= fpBand[0]; int j = iStride; int i; //go through(遍历) the height band and apply the erosion filter for( i=0; i<iCount-1; i++ ) { fpBand[j]= fFilter*v + ( 1-fFilter )*fpBand[j]; v = fpBand[j]; j+= iStride; } }
标签:des style blog io ar color os sp for
原文地址:http://www.cnblogs.com/QQ122252656/p/4157367.html