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

📄 md2.h

📁 小型的3D游戏引擎
💻 H
字号:
#ifndef _MD2LOADER_H_
#define _MD2LOADER_H_

#include "md2format.h"
#include "../texture.h"
#include "../math/point.h"
#include "model.h"

class GcMD2 : public GcModel
{
public:

	GcMD2();
	~GcMD2();

	bool Load(char *fileName, char *textureName);
	bool Load(char *fileName);

	// Load the skin
	bool LoadSkin(char *skinName, uint index);
	void SetNumberOfSkins(uint num);
	void SetActiveSkin(uint index) { activeSkin = index; }

	// Render / Animate
	bool Animate(int startFrame, int endFrame, float percent);
	bool RenderKeyFrame(int frame);

	// Unload the model
	void Destroy();

	// Convert the model to a GMD model
	bool SaveAsGMD(char *fileName);

private:

	int			numSkins;
	int			numFrames;
	int			numVertices;
	int			numTris;
	int			numTexCrds;
	int			frameSize;
	int			texWidth;
	int			texHeight;
	int			currentFrame;
	int			nextFrame;
	uint		activeSkin;
	float		interpol;
	MD2Tri		*triIndex;
	GcPoint2	*texCrds;
	GcPoint3	*vertexList;
	GcTexture	*texture;
};

#endif

⌨️ 快捷键说明

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