#ifndef MESH_H #define MESH_H #include "vector3D.h" #include //Struct containing information relevant to the renderer about the vertices, normals and //texture coordinates of a model. Also keeps track of useful stuff for iterations. struct Mesh{ //Per vertex values int numVertices = 0; std::vector vertices; std::vector normals; std::vector texels; std::vector tangents; std::vector biTangents; //Per face values int numFaces = 0; std::vector fNormals; //Normals for the whole face std::vector vertexIndices; std::vector textureIndices; std::vector normalsIndices; //Simple mesh description for debugging. void describeMesh(); //Builds facet normals used in early back face culling void buildFacetNormals(); //Builds tangent and bitangent vectors for normal mapping void buildTangentSpace(); }; #endif