MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ImportCurve

Function ImportCurve

Source/Engine/Tools/ModelTool/ModelTool.Assimp.cpp:637–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637void ImportCurve(aiVectorKey* keys, uint32 keysCount, LinearCurve<Float3>& curve)
638{
639 if (keys == nullptr || keysCount == 0)
640 return;
641
642 const auto keyframes = curve.Resize(keysCount);
643
644 for (uint32 i = 0; i < keysCount; i++)
645 {
646 auto& aKey = keys[i];
647 auto& key = keyframes[i];
648
649 key.Time = (float)aKey.mTime;
650 key.Value = ToFloat3(aKey.mValue);
651 }
652}
653
654void ImportCurve(aiQuatKey* keys, uint32 keysCount, LinearCurve<Quaternion>& curve)
655{

Callers 1

ImportAnimationFunction · 0.70

Calls 3

ToFloat3Function · 0.70
ToQuaternionFunction · 0.70
ResizeMethod · 0.45

Tested by

no test coverage detected