x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
Game3DObject.h - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\DarkPuzzle\GameEngine\Game3DObject.h
Girar
Efecto
Propiedad
Historial
#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
Dirección de la página
Dirección del archivo
Anterior
28/65
Siguiente
Descargar
( 2 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.