关于.x文件的结构,哪位大狭帮我一下

agerlis 2004-11-21 10:29:44
// Created with Milkshape 3D DirectX .X File Exporter V2.0
我不知道下面的两个摸板的参数什么意思:
template XSkinMeshHeader {
<3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
WORD nMaxSkinWeightsPerVertex; //什么意思?
WORD nMaxSkinWeightsPerFace; //什么意思?
WORD nBones;
}

template SkinWeights {
<6f0d123b-bad2-4167-a0d0-80224f25fabb>
STRING transformNodeName;
DWORD nWeights;
array DWORD vertexIndices[nWeights]; //是不是就是文件中的mesh块中的哪个数的编号?
array float weights[nWeights]; //什么意思?
Matrix4x4 matrixOffset; //什么意思?
}

还有很多内外镶套的frame,那里面的16个数表示的巨正是什么意思,是不是他在世界坐标的位子
那如果是,那上面的第二个摸板中的matrixOffset是什么,IDirectXFileData在枚举后装的是什么数据,各位大狭帮帮小弟,小弟我想了很久想不出,又找不到资料。谢谢。
...全文
96 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Snow_1980 2004-11-22
  • 打赏
  • 举报
回复
SDK里有详细的说明
XSkinMeshHeader :
nMaxSkinWeightsPerVertex - Maximum number of transforms that affect a vertex in the mesh.

nMaxSkinWeightsPerFace - Maximum number of unique transforms that affect the three vertices of any face.

nBones - Number of bones that affect vertices in this mesh.

SkinWeights :
The name of the bone whose influence is being defined is transformNodeName, and nWeights is the number of vertices affected by this bone.

The vertices influenced by this bone are contained in vertexIndices, and the weights for each of the vertices influenced by this bone are contained in weights.

The matrix matrixOffset transforms the mesh vertices to the space of the bone. When concatenated to the bone's transform, this provides the world space coordinates of the mesh as affected by the bone.
Snow_1980 2004-11-22
  • 打赏
  • 举报
回复
那个长数是一个GUID,一般表示接口的ID,matrixOffset不知道,我也去查查看~
iwaiwai 2004-11-22
  • 打赏
  • 举报
回复
说错了 我是想问楼主呢 呵呵
iwaiwai 2004-11-22
  • 打赏
  • 举报
回复
想请问楼上的这是哪个程序的代码

是用来导出.x文件的吗
stonepeter 2004-11-22
  • 打赏
  • 举报
回复
:(有深度的问题.或许你可以去看看framework中的一代码.

8,303

社区成员

发帖
与我相关
我的任务
社区描述
游戏开发相关内容讨论专区
社区管理员
  • 游戏开发
  • 呆呆敲代码的小Y
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧