#include #include #include #include #ifndef ENTITY #define ENTITY #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE) class Entity { private: LPDIRECT3DDEVICE9 GraphicsDevice; //graphics device to use LPD3DXMESH EntityMesh; //the mesh for our entity DWORD NumMaterials; //Number of materials LPD3DXBUFFER MaterialBuffer; //buffer to load our materials LPDIRECT3DTEXTURE9* MeshTextures; //an array of textures for our mesh D3DMATERIAL9* MeshMaterials; //an array of materials for our mesh D3DVERTEXELEMENT9 VertexArray [MAX_FVF_DECL_SIZE]; //Array of our verticies public: Entity(void); Entity(LPDIRECT3DDEVICE9 GraphicsDevice); void LoadModel(std::string filename); void Render(); ~Entity(void); }; #endif #include #ifndef PLANET #define PLANET class Planet:public Entity { private: public: Planet(void); ~Planet(void); }; #endif