MCPcopy Create free account
hub / github.com/assimp/assimp / getWeightAtKey

Function getWeightAtKey

code/AssetLib/Collada/ColladaLoader.cpp:1086–1096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1084}
1085
1086static 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

Callers 1

CreateAnimationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected