#ifndef Model_h__ #define Model_h__ #include #include #include #include #include #include #include #include #include "ResourceManager.h" #include "Texture.h" #include "OBJ.h" class Model : public Resource { public: Model(std::shared_ptr resourceManager, OBJ &obj); struct TextureGroup { std::shared_ptr<::Texture> Texture; std::shared_ptr<::Texture> NormalMap; std::shared_ptr<::Texture> SpecularMap; unsigned int StartIndex; unsigned int EndIndex; }; GLuint VAO; std::vector TextureGroups; std::vector> texture; glm::mat4 GetMatrix(); std::vector Vertices; private: std::vector Normals; std::vector TangentNormals; std::vector BiTangentNormals; std::vector TextureCoords; GLuint VertexBuffer; GLuint NormalBuffer; GLuint TangentNormalsBuffer; GLuint BiTangentNormalsBuffer; GLuint TextureCoordBuffer; bool Loadobj( const char* path, std::vector &out_vertices, std::vector &out_normals, std::vector &out_TextureCoords ); void CreateBuffers( std::vector _Vertices, std::vector _Normals, std::vector _Tangents, std::vector _BiTangents, std::vector_TextureCoords ); void CreateTangents(); bool IsNear(float v1, float v2); void getSimilarVertexIndex(); }; #endif // Model_h__