📄 cblockmesh.h
字号:
#ifndef CBlockMesh_h
#define CBlockMesh_h
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <d3d9.h>
#include <d3dx9math.h>
#include <d3dx9mesh.h>
#include "struct.h"
#include "CBlock.h"
////////////////////////////////////////////////////////////
//方块网格类
//根据方块的位置,颜色绘制方块
////////////////////////////////////////////////////////////
class CBlockMesh
{
public:
CBlockMesh();
~CBlockMesh();
bool Init( IDirect3DDevice9 *pD );
void Free();
void Draw( IDirect3DDevice9 *pD, int row, int col, int material );
void Draw( IDirect3DDevice9 *pD, const POSITION &position, int material );
void Draw( IDirect3DDevice9 *pD, const CBlock &block );
private:
void GetMatrix( D3DXMATRIX &out, int row, int col );
private:
float m_fSize; //方块的大小
ID3DXMesh * m_pMesh; //方块网格
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -