+
+inline aiMatrix4x4 mat4ToaiMatrix(glm::mat4 from) {
+ aiMatrix4x4 to;
+ for (int i = 0; i < 4; i++)
+ for (int j = 0; j < 4; j++)
+ to[i][j] = from[j][i];
+ return to;
+}
+
+class Model {
+
+ struct Animation {
+ double duration;
+ std::vector<const aiNodeAnim*> nodeAnims;
+ };
+
+ typedef std::map<std::string, std::pair<unsigned int, aiBone*>> BoneMap;
+ typedef std::map<std::string, std::vector<const Animation>> AnimMap;
+ typedef std::map<std::string, glm::mat4> BoneTransforms;
+
+ struct VertBones {
+ unsigned int ids[4] = {0, 0, 0 ,0};
+ float weights[4] = {1, 0, 0, 0};
+ };