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

📄 model.h

📁 絲路server源碼 Silk Road server source
💻 H
字号:
#ifndef MODEL_H
#define MODEL_H

#include "vec3d.h"
#include "mpq.h"
#include "modelheaders.h"
//#include "quaternion.h"
#include <vector>

class Model;
class WMOInstance;

Vec3D fixCoordSystem(Vec3D v);




class Model
{ 
public:
	ModelHeader header;
	ModelAnimation *anims;
	int *globalSequences;
	
public:
	bool animGeometry,animTextures,animBones;
	bool animated;

	bool isAnimated(MPQFile &f);
	ModelVertex *origVertices;
	Vec3D *vertices, *normals;
	uint16 *indices;
	size_t nIndices;
	
	bool open();
	bool ConvertToVMAPModel(char * outfilename);

public:

	bool ok;
	bool ind;

	float rad;
	float trans;
	bool animcalc;
	int anim, animtime;

	Model(std::string &filename);
	~Model();
	
private:
	std::string filename;
	char outfilename;
};

class ModelInstance 
{
public:
	Model *model;

	int id;

	Vec3D pos, rot;
	unsigned int d1, scale;

	float frot,w,sc;

	int light;
	Vec3D ldir;
	Vec3D lcol;

	ModelInstance() {}
	ModelInstance(MPQFile &f,const char* ModelInstName,const char*MapName, FILE *pDirfile);

};

#endif

⌨️ 快捷键说明

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