when I was adding animations I created SkinnedModel, SkinnedMesh, and SkinnedVertex which are pretty much identical to their non skinned types:
struct Vertex
{
glm::vec3 position;
glm::vec3 normal;
glm::vec2 texCoords;
glm::vec3 tangent;
};
struct SkinnedVertex
{
glm::vec3 position;
glm::vec3 normal;
glm::vec2 texCoords;
int boneIDs[4];
float boneWeights[4];
glm::vec3 tangent;
};
struct Model
{
Mesh mesh;
Material material;
std::vector<Texture> textures;
};
struct SkinnedModel
{
SkinnedMesh mesh;
Material material;
std::vector<Texture> textures;
};
Model LoadModel(const std::string& filepath);
SkinnedModel LoadSkinnedModel(const std::string& filepath);
I'm starting to have second thoughts if this was the right decision because if I had character.fbx and house.fbx like sure the house doesn't have a skeleton or anything, but I feel like I should still be able to treat both as a model and do things like GetModel()