MeshObject.h
资源名称:g.rar [点击查看]
上传用户:laitongbao
上传日期:2021-02-20
资源大小:8176k
文件大小:1k
源码类别:
射击游戏
开发平台:
Visual C++
- #pragma once
- #include "NodeObject.h"
- /*
- 网格类:继承NodeObject
- 用于显示.x文件
- */
- class MeshObject : public NodeObject
- {
- friend class TransitionController;
- friend class ShaderController;
- friend class FileController;
- friend class SceneTree;
- public:
- MeshObject(MeshObject&mo);
- MeshObject(TCHAR* name,VECTOR3 pos = VECTOR3());
- virtual ~MeshObject(){};
- void DrawObject();
- void PreDraw(){};
- void CleanUp();
- void GetBoundingBox(VECTOR3&min,VECTOR3&max);
- void SetLumination(float value);//设置物体自发光亮度
- void LoadMeshData (TCHAR * meshname);
- private:
- ID3DXMesh *m_mesh;
- DWORD m_numMaterials;
- LPD3DXBUFFER m_matBuffer;//网格的材质
- LPDIRECT3DTEXTURE9* m_pMeshTextures;// 贴图组的头指针
- D3DMATERIAL9* m_pMeshMaterials;// 材质组的头指针
- float selfLumination;
- };