mesh.h 616 B

123456789101112131415161718192021222324
  1. #ifndef MESH_H
  2. #define MESH_H
  3. #include "vector3D.h"
  4. #include <vector>
  5. //Struct containing information relevant to the renderer about the vertices, normals and
  6. //texture coordinates of a model. Also keeps track of useful stuff for iterations.
  7. struct Mesh{
  8. int numVertices = 0;
  9. std::vector<Vector3f> vertices;
  10. std::vector<Vector3f> normals;
  11. std::vector<Vector3f> texels;
  12. int numFaces = 0;
  13. std::vector<Vector3i> vertexIndices;
  14. std::vector<Vector3i> textureIndices;
  15. std::vector<Vector3i> normalsIndices;
  16. //Simple mesh description for debugging.
  17. void describeMesh();
  18. };
  19. #endif