#ifndef _CASEMODEL_H_
#define _CASEMODEL_H_

#include "../App/EngineH.h"
#include <STRING>

struct T_OBJECT_0
{
	std::string				name;
	int						iNumVertex;
	std::vector<CVector3>	vertex;
	std::vector<CVector3>	texture;
	std::vector<CVector3>	normal;				// kazdej vertex ma jednu normalu, face ma tri normaly
};

class C_ASEMODEL_0
{
private :
	void(C_ASEMODEL_0::*pRender)();
	int						_renMode;
	bool					_bVBO;
	int						_num_object;
	std::string				_sError;
	std::vector<T_OBJECT_0> _vObject;		

	_SetError(std::string name_er);
	
	bool _LoadVersion1(ifstream &is);
	void _RenderObject();
	void _RenderVA();

public :
	C_ASEMODEL_0();
	~C_ASEMODEL_0();
	
public :
	void LoadModel(std::string name);
	bool LoadModelText(std::string name);
	bool LoadModelBinar(std::string name);
	void Render();
	void SetRenMode(int renMode)
	{
		_renMode = renMode;
	}
	void Translate(float x, float y, float z);
	
};

#endif //_CASEMODEL_H_