x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
Game3DObject.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\DarkPuzzle\GameEngine\Game3DObject.h
旋转
特效
属性
历史版本
#pragma once //#include "DXUT\Core\DXUT.h" //#include "GameLevel.h" #include "GameScreen.h" namespace DarkBattle{ class Game3DObject: public GameScreen { private: #define ADJACENCY_EPSILON 0.0001f char* name; ID3DXMesh* pMesh; DWORD numMaterials; D3DMATERIAL9* pMaterials;//size of numMaterials IDirect3DTexture9** ppTextures;//size of numMaterials IDirect3DTexture9** ppTexturesBump;//size of numMaterials char** pTextureNames;//size of numMeterials bool hasShadowMesh; ID3DXMesh* pShadowMesh; //use to extrude the shadow struct CEdgeMapping { int m_anOldEdge[2]; // vertex index of the original edge int m_aanNewEdge[2][2]; // vertex indexes of the new edge // First subscript = index of the new edge // Second subscript = index of the vertex for the edge public: CEdgeMapping() { FillMemory( m_anOldEdge, sizeof(m_anOldEdge), -1 ); FillMemory( m_aanNewEdge, sizeof(m_aanNewEdge), -1 ); } }; static int FindEdgeInMappingTable( int nV1, int nV2, CEdgeMapping *pMapping, int nCount ); static HRESULT GenerateShadowMesh( IDirect3DDevice9 *pd3dDevice, ID3DXMesh *pMesh, ID3DXMesh **ppOutMesh ); static IDirect3DTexture9* loadTextureFromFile(IDirect3DDevice9* pd3dDevice,const char* fileName); static IDirect3DTexture9* createTexture(IDirect3DDevice9* pd3dDevice,const char* fileName); static void destroyAllTextures(); static char* trimNumericChars(const char* source); protected: Game3DObject(IDirect3DDevice9* pd3dDevice, const char* fileName, bool hasShadow); public: virtual ~Game3DObject(void); void OnFrameMove(float elapsedTime){};//nothing void OnRender(IDirect3DDevice9* pd3dDevice); void OnResetDevice(IDirect3DDevice9* pd3dDevice){////nothing here, cause everything is in the static pool }; void OnLostDevice(){//nothing here, cause everything is in the static pool }; static void ReleaseAll3DObjects(); static void ResetAll3DObjects(IDirect3DDevice9* pd3dDevice); static Game3DObject* Create3DObject(IDirect3DDevice9* pd3dDevice, const char* fileName, bool hasShadow); static Game3DObject* Get3DObject(const char* name); static void DestroyAll3DObjects(); }; }
Game3DObject.h
网页地址
文件地址
上一页
28/65
下一页
下载
( 2 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.