取自《Focus On 3D Terrain Programming》中的一段:
//--------------------------------------------------------------
// 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[];
int j = iStride;
int i; //go through(遍历) the height band and apply the erosion filter
for( i=; i<iCount-; i++ )
{
fpBand[j]= fFilter*v + ( -fFilter )*fpBand[j]; v = fpBand[j];
j+= iStride;
}
}
滤波的一段代码,其中iStride就是步长,fFilter就是系数,为此,可以把函数参数名改为以下名称似乎更能说明函数功能:
void FilterHeightBand(float* fpBand,int iStep,int iCount,float fFilterFactor)

《Focus On 3D Terrain Programming》中一段代码的注释一的更多相关文章

  1. 《Focus On 3D Terrain Programming》中一段代码的注释三

    取自<Focus On 3D Terrain Programming>中的一段: //--------------------------------------------------- ...

  2. 《Focus On 3D Terrain Programming》中一段代码的注释二

    取自<Focus On 3D Terrain Programming>中的一段: bool CTERRAIN::MakeTerrainFault( int iSize, int iIter ...

  3. 【鸡渣饲料系列】《Introdution to 3D Game Programming With DirectX11》 代码转移至vs2015

    <Introdution to 3D Game Programming With DirectX11>我是从这本书学习的directx,被称为“龙书”dx11版,由于是通过这本书学习的所以 ...

  4. bootstrap 中这段代码 使bundles 失败

    _:-ms-fullscreen, :root input[type="date"], _:-ms-fullscreen, :root input[type="time& ...

  5. SQL SERVER中如何查找存储过程中一段代码

    select b.name ,a.text from syscomments a,sysobjects b where and object_id(b.name)=a.id and b.xtype i ...

  6. phpstorm 代码注释后,撤销某段代码的注释的,快捷键是什么?

    phpstorm 的代码注释有两种风格,一种是双斜杠,另一种是 /* ...  */风格,两者的快捷键都是开关式(即按第一次为注释,再按一次为撤销注释),快捷键如下: 1.双斜杠注释   Ctrl + ...

  7. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第七章:在Direct3D中绘制(二)

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第七章:在Direct3D中绘制(二) 代码工程地址: https:/ ...

  8. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制 代码工程地址: https://gi ...

  9. Introduction to 3D Game Programming with DirectX 11 翻译--开篇

    Direct3D 11简介 Direct3D 11是一个渲染库,用于在Windows平台上使用现代图形硬件编写高性能3D图形应用程序.Direct3D是一个windows底层库,因为它的应用程序编程接 ...

随机推荐

  1. ArcGIS Portal 10.4 本地坐标系的web 3d地形展示制作说明

    原文:ArcGIS Portal 10.4 本地坐标系的web 3d地形展示制作说明 ArcGIS Portal 10.4 本地坐标系的web 3d地形展示制作说明 By 李远祥 ArcGIS Por ...

  2. http://www.blogjava.net/xzclog/archive/2011/09/29/359789.html

    http://www.blogjava.net/xzclog/archive/2011/09/29/359789.html http://bbs.csdn.net/topics/380187593

  3. SET Statements (Transact-SQL)

    The Transact-SQL programming language provides several SET statements that change the current sessio ...

  4. each的用法

    $(selector).each(function(index,element)) function(index,element) 必需.为每个匹配元素规定运行的函数. index - 选择器的 in ...

  5. Spring MVC框架下在java代码中访问applicationContext.xml文件中配置的文件(可以用于读取配置文件内容)

    <bean id="propertyConfigurer" class="com.****.framework.core.SpringPropertiesUtil& ...

  6. Power-BI绿色开发平台

  7. jQuery 插件 获取URL参数

    jQuery 获取URL参数的插件 jQuery Url Query String 下载地址:http://plugins.jquery.com/getUrlQueryString.js/   var ...

  8. Maven 命令操作项目

    1.创建一个多模块的Java项目 shift+鼠标右键 创建项目命令: 旧版: mvn archetype:create -DgroupId=com.qhong -DartifactId=MavenP ...

  9. python set add 导致问题 TypeError: unhashable type: 'list'

    问题复现 >>> a = set() >>> b = set() >>> b.add(1) >>> a.add(b) Trace ...

  10. ios-点击图片放大,背景变半透明

    在view中点击一个图片,图片放大,背景变半透明,图片不会变透明的效果图如下 思路:图片框是一个按钮,监听点击事件. 当点击图片后:改变图片的frame,使图片放大,并且在controller.vie ...