|
楼主 |
发表于 2003-8-16 11:37:00
|
显示全部楼层
Re:HELP(简单问题-mesh 优化的过程)
D:\DXSDK\Samples\Media\cube.x
type
x y z
num
vertices
0.996094 1.000000 -0.995850
0
vertices
-0.995850 1.000000 -0.995850
1
vertices
-0.995850 1.000000 0.996094
2
vertices
0.996094 1.000000 0.996094
3
vertices
0.996094 -0.999756 -0.995850
4
vertices
-0.995850 -0.999756 -0.995850
5
vertices
-0.995850 -0.999756 0.996094
6
vertices
0.996094 -0.999756 0.996094
7
indices
0 1 2
1
indices
0 2 3
2
indices
0 4 5
3
indices
0 5 1
4
indices
1 5 6
5
indices
1 6 2
6
indices
2 6 7
7
indices
2 7 3
8
indices
3 7 4
9
indices
3 4 0
10
indices
4 7 6
11
indices
4 6 5
12
end_file
以上是未优化的MESH顶点和索引的排列顺序,
当调用ID3DXMesh::Optimize方法后,得到如下排列顺序:
D:\DXSDK\Samples\Media\cube.x
type
x y z
num
vertices
0.996094 -0.999756 -0.995850
0
vertices
-0.995850 -0.999756 0.996094
1
vertices
-0.995850 -0.999756 -0.995850
2
vertices
0.996094 -0.999756 0.996094
3
vertices
-0.995850 1.000000 0.996094
4
vertices
-0.995850 1.000000 -0.995850
5
vertices
0.996094 1.000000 -0.995850
6
vertices
0.996094 1.000000 0.996094
7
indices
0 1 2
1
indices
0 3 1
2
indices
4 1 3
3
indices
5 1 4
4
indices
5 2 1
5
indices
6 2 5
6
indices
6 0 2
7
indices
7 0 6
8
indices
7 3 0
9
indices
4 3 7
10
indices
6 4 7
11
indices
6 5 4
12
end_file
以上数据是从D3D8 OptimizedMesh sample中提取出
ID3DXMesh::Optimize此算法的过程有人知道吗
|
|