Mesh.h
资源名称:3DRPG.rar [点击查看]
上传用户:cjwanglu
上传日期:2013-07-10
资源大小:4744k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- #include <d3dx9.h>
- #include <mmsystem.h>
- #include "Game.h"
- #define SafeRelease(pObject) if(pObject!=NULL){pObject->Release();pObject=NULL;}
- #define MESH_D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1)
- class CMesh
- {
- public:
- CMesh(LPDIRECT3DDEVICE9 d3dd, LPSTR str );
- virtual ~CMesh();
- void RenderMesh();
- void Translate(POSITION ppos);
- void Translation(NPOSITION ppos);
- LPD3DXMESH m_pMesh;
- D3DXMATRIX matWorld;
- private:
- LPDIRECT3DDEVICE9 m_pD3DDevice;
- D3DMATERIAL9 * m_pMaterial;
- LPDIRECT3DTEXTURE9 * m_pTexture;
- DWORD m_dwNumOfMaterials;
- };