render3d.h

来自「liu7788414」· C头文件 代码 · 共 52 行

H
52
字号
#ifndef RENDER3D_H
#define RENDER3D_H
#include "mesh.h"
#include "graphics3d.h"

class CRender3D
{
public:
	void RenderModel(int modelid, CMatrix44 *pWorldMat, int frameid = 0, int texid=-1);
	static void GetWorldMat(int *pos, int*rot, CMatrix44 *);
	static void GetWorldMat(Vector4s *pos, Vector4s*rot, CMatrix44 *);

	void SetModelCount(int count) { m_Models = new CMesh[count];	m_modelCnt = count;};
	
	CRender3D();
	~CRender3D();

	void SetEngine(void);
	unsigned short * SetColorBuffer(unsigned short *);
	CMesh *m_Models;

	////////////////////////////////////



	bool LoadModel(char* modelfile, int index);

	void ReleaseModel(int = -1);

//	void RenderModel(int modelid, int* pos, int* rot, int frameid=1);
	void RenderActionModel(int modelid, int actionid, int frameid, int* pos, int* rot);

	// draw color mask over ball
	void DrawBallColorMask(int x, int y, int percentile);

	void StartRender3D();
	void EndRender3D();
	void ReleaseTex();

	void UpdateCamera();
	CGraphics3D *GetG3d(){ return m_pG3D;};
	CMesh * GetModelMesh(int id) { if(id>=0 && id < m_modelCnt) return &m_Models[id]; else return NULL;	};
	
//	CEngine *m_pEngine;
protected:
	CGraphics3D *m_pG3D;
	CRenderTarget *m_pTarget;
	int m_modelCnt;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?