| 1084 | } |
| 1085 | |
| 1086 | static float getWeightAtKey(const std::vector<MorphTimeValues> &values, int key, unsigned int value) { |
| 1087 | for (auto mKey : values[key].mKeys) { |
| 1088 | if (mKey.mValue == value) { |
| 1089 | return mKey.mWeight; |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | // no value at key found, try to interpolate if present at other keys. if not, return zero |
| 1094 | // TODO: interpolation |
| 1095 | return 0.0f; |
| 1096 | } |
| 1097 | |
| 1098 | // ------------------------------------------------------------------------------------------------ |
| 1099 | // Constructs the animation for the given source anim |