47 lines
755 B
C++

#ifndef MESH_H
#define MESH_H
#include <vector>
#include <glm/vec3.hpp>
#include <glm/vec2.hpp>
class Material;
struct Mesh
{
typedef struct
{
glm::vec3 tangent;
glm::vec3 binormal;
} Tangents;
typedef struct
{
std::vector<unsigned int> indices;
Material* material;
} Group;
std::vector<glm::vec3> positions;
std::vector<glm::vec3> normals;
std::vector<glm::vec2> texCoords;
std::vector<Tangents> tangents;
std::vector<Group> indiceGroups;
bool hasNormals()
{
return normals.size() != 0;
}
bool hasTexCoords()
{
return texCoords.size() != 0;
}
bool hasTangents()
{
return tangents.size() != 0;
}
};
#endif // MESH_H