⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 render3d.h

📁 liu7788414
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -