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

📄 gmd.h

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

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

class GcGMD : public GcModel
{
public:

	GcGMD();
	~GcGMD();

	// Load the model
	bool Load(char *fileName, char *skinName);
	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);

	// Destroy the model
	void Destroy();

private:

	GMDHeader	header;
	GMDTri		*triangles;
	GcPoint3	*vertices;
	GcPoint2	*texCoords;
	GcTexture	*texture;
	float		interpol;
	int			currentFrame;
	int			nextFrame;
	uint		activeSkin;
};


#endif

⌨️ 快捷键说明

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