
#ifndef H_LOAD_MQO_
#define H_LOAD_MQO_

struct mqoRoot;
struct mqoScene;
struct mqoMaterial;
struct mqoObject;
struct mqoVertex;
struct mqoFace;

struct mqoRoot {
	struct mqoScene *scene;
	int numMaterial;
	struct mqoMaterial *material;
	int numObject;
	int maxObject;
	struct mqoObject **object;
};

struct mqoScene {
	float pos[3];
	float lookat[3];
	float head;
	float pich;
	int ortho;
	float zoom2;
	float amb[3];
};

struct mqoMaterial {
	float color[4]; // RGBA
	float dif;
	float amb;
	float emi;
	float spc;
	float power;
	char tex[64];
};

struct mqoObject {
	char name[64];
	int visible;
	int shading;
	float facet;
	float color[3];
	int color_type;
	int numVertex;
	struct mqoVertex *vertices;
	int numFace;
	struct mqoFace *faces;
};

struct mqoVertex {
	float x;
	float y;
	float z;
};

struct mqoFace {
	int numVertex;
	int vIndex[4];
	int material;
	float uv[8];
};

struct mqoRoot *mqoLoadFile(const char *filename);
void mqoClose(struct mqoRoot *mqo);

#endif

