Add a gitattributes file
[opengl.git] / blendshapes.hpp
1 #include "model.hpp"
2
3 struct Blendshape {
4         std::string name;
5         std::vector<glm::vec3> deltas;
6         float weight;
7 };
8
9 struct BlendshapeModel {
10         Model *model;
11         std::vector<glm::vec3> neutral;
12         std::vector<Blendshape> blendshapes;
13         std::vector<std::vector<float>> animation;
14         unsigned long curFrame = 0;
15 };
16
17 typedef std::pair<int, int> VertIdx;
18
19 void loadBlendshapes(std::string dir, Program p, BlendshapeModel *bsModel);
20 /* void createBlendshapes(std::vector<std::string> blendshapes, std::string neutral, Program p, BlendshapeModel *res); */
21
22 void interpolateBlendshapes(BlendshapeModel *b);
23
24 void solveWeights(BlendshapeModel *b, std::map<VertIdx, glm::vec3> manips);
25
26 void stepBlendshapeAnim(BlendshapeModel *b);