#pragma once #include "Header.h" #include "ModelLoader.h" #include "Vector.h" class Model { private: class Vertex { public: int position; int normal; int texcoord; }; class Face { public: list vertices; }; class Texture { GLuint index; public: Texture(const std::string &fileName); void bind(); }; class MaterialInfo { public: MaterialInfo(); std::string name; Texture* texture; bool hasTexture; bool hasDiffuse; Vec3f diffuseColor; bool hasAmbient; Vec3f ambientColor; bool hasSpecular; Vec3f specularColor; }; class ObjGroup { public: std::string name; int materialIndex; list faces; }; std::vector vertices; std::vector normals; std::vector texcoords; std::vector groups; std::vector materials; void loadMaterialFile(std::string fileName, std::string dirName); public: Model(std::string filename); ~Model(void); void draw(); };