⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mlallocmeshhierarchy.h

📁 这是一个混合动画的实例代码
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////
// 
// File: mlAllocMeshHierarchy.h
// 
// Author: Frank Luna (C) All Rights Reserved
//
// System: Athlon 1800+ XP, 512 DDR, Radeon 9500 Pro, Windows XP, MSVC++ 7.0 
//
// Desc: Implements the ID3DXAllocateHierarchy interface.
// In order to create and destroy an animation hierarchy using the 
// D3DXLoadMeshHierarchyFromX and D3DXFrameDestroy functions, we must 
// implement the ID3DXAllocateHierarchy interface.  In doing so we define how
// meshes and frames are created and destroyed, thereby giving us some 
// flexibility in the construction and destruction process.
//          
///////////////////////////////////////////////////////////////////////////////

#ifndef __mlAllocMeshHierarchyH__
#define __mlAllocMeshHierarchyH__

#include <d3dx9.h>

class AllocMeshHierarchy : public ID3DXAllocateHierarchy 
{
public:
	HRESULT STDMETHODCALLTYPE CreateFrame(
		THIS_ PCSTR Name,                            
		D3DXFRAME** ppNewFrame);                     

	HRESULT STDMETHODCALLTYPE CreateMeshContainer(
		PCSTR Name,                                  
		const D3DXMESHDATA* pMeshData,               
		const D3DXMATERIAL* pMaterials,             
		const D3DXEFFECTINSTANCE* pEffectInstances,  
		DWORD NumMaterials,                          
		const DWORD *pAdjacency,                     
		ID3DXSkinInfo* pSkinInfo,                    
        D3DXMESHCONTAINER** ppNewMeshContainer);     

	HRESULT STDMETHODCALLTYPE DestroyFrame(
		THIS_ D3DXFRAME* pFrameToFree);              

	HRESULT STDMETHODCALLTYPE DestroyMeshContainer(
		THIS_ D3DXMESHCONTAINER* pMeshContainerBase);
};

#endif // __mlAllocMeshHierarchyH__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -