- glm::mat4 boneOffset = pair.second.second;
-
- glm::mat4 boneTrans(1.f);
- /* if (boneTransforms.count(nodeName)) { */
- /* std::cerr << "got bone transform from map" << std::endl; */
- /* boneTrans = boneTransforms[nodeName]; */
- /* } */
- for (const Animation anim: animMap->at(nodeName)) {
- float t = fmod(tick, anim.duration);
- for (const aiNodeAnim *nodeAnim: anim.nodeAnims) {
- boneTrans = boneTrans * lerpPosition(nodeAnim, t);
- boneTrans = boneTrans * lerpRotation(nodeAnim, t);
- boneTrans = boneTrans * lerpScaling(nodeAnim, t);
- }
- }