
本站地址:http://www.bajiao123.com

托管的 Direct3D之 使用 Frame Hierarchy 创建动画(翻译)
public class CustomAllocateHierarchy : AllocateHierarchy{ //保存我们迟些要用到的DirectX 文件的路径
private string xFilePath; public CustomAllocateHierarchy(string xFilePath) : base() { this.xFilePath = xFilePath; } public override Frame CreateFrame(string name) { return new CustomFrame(name); } public override MeshContainer CreateMeshContainer(string name, MeshData meshData, ExtendedMaterial[] materials, EffectInstance[] effectInstances, GraphicsStream adjacency, SkinInformation skinInfo) { CustomMeshContainer mc = new CustomMeshContainer(this.xFilePath, name, meshData, materials, effectInstances, adjacency, skinInfo); mc.Initialize(); return mc; } }
我们定义的CustomAllocateHierarchy 保存了我们将要加载的 DirectX文件的路径在xFilePath字段。迟些在我们建mesh对象时要用到它。 CreateFrame 方法创建一个CustomFrame 类的实例。CreateMeshContainer方法创建一个
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
本站地址:http://www.bajiao123.com

