最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DirectX9 3D 快速上手 7
时间:2022-07-02 11:32:37 编辑:袖梨 来源:一聚教程网
这里我想继续写点和Mesh有关的东西,毕竟我们可能还需要对它有很多别的要求。在3D游戏的实际运用中,一般来说都是运用低多边形模型,简称低模。这样才能有更加好的速度来运行游戏,恰好DX中有提供给我们这样的函数让我们来控制读入的Mesh的复杂程度。
public void WeldVertices (
Microsoft.DirectX.Direct3D.WeldEpsilonsFlags flags ,//标志
Microsoft.DirectX.Direct3D.WeldEpsilons epsilons ,
Microsoft.DirectX.Direct3D.GraphicsStream adjacencyIn ,
Microsoft.DirectX.Direct3D.GraphicsStream adjacencyOut ,
out int[] faceRemap ,
Microsoft.DirectX.Direct3D.GraphicsStream vertexRemap )
这个方法能实现简化模型的目的,前2个参数用来确定怎么简化模型,
第一个标志一共包括以下几个:
Member
Value
Description
DoNotSplit
8
Instructs the weld to allow vertices to be modified only, not removed. This flag is valid only if WeldPartialMatches is set. It is useful to modify vertices so that they are equal, but not to allow vertices to be removed.
只有当WeldPartialMatches参数指定时才能生效,不允许分离定点
DoNotRemoveVertices
4
Instructs the weld to allow vertices to be modified only, not removed. This flag is valid only if WeldPartialMatches is set. It is useful to modify vertices to be equal, but not to allow vertices to be removed.
只有当WeldPartialMatches参数指定时才能生效,不能移除定点,只能修改
WeldPartialMatches
2
If a given vertex component is within epsilon, instructs the weld to modify partially matched vertices so that both components are equal. If all components are equal, one of the vertices is removed.
public void WeldVertices (
Microsoft.DirectX.Direct3D.WeldEpsilonsFlags flags ,//标志
Microsoft.DirectX.Direct3D.WeldEpsilons epsilons ,
Microsoft.DirectX.Direct3D.GraphicsStream adjacencyIn ,
Microsoft.DirectX.Direct3D.GraphicsStream adjacencyOut ,
out int[] faceRemap ,
Microsoft.DirectX.Direct3D.GraphicsStream vertexRemap )
这个方法能实现简化模型的目的,前2个参数用来确定怎么简化模型,
第一个标志一共包括以下几个:
Member
Value
Description
DoNotSplit
8
Instructs the weld to allow vertices to be modified only, not removed. This flag is valid only if WeldPartialMatches is set. It is useful to modify vertices so that they are equal, but not to allow vertices to be removed.
只有当WeldPartialMatches参数指定时才能生效,不允许分离定点
DoNotRemoveVertices
4
Instructs the weld to allow vertices to be modified only, not removed. This flag is valid only if WeldPartialMatches is set. It is useful to modify vertices to be equal, but not to allow vertices to be removed.
只有当WeldPartialMatches参数指定时才能生效,不能移除定点,只能修改
WeldPartialMatches
2
If a given vertex component is within epsilon, instructs the weld to modify partially matched vertices so that both components are equal. If all components are equal, one of the vertices is removed.
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21