MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / interpolateLinear

Function interpolateLinear

Source/Falcor/Scene/Animation/Animation.cpp:86–94  ·  view source on GitHub ↗

This function performs linear extrapolation when either t < 0 or t > 1

Source from the content-addressed store, hash-verified

84
85 // This function performs linear extrapolation when either t < 0 or t > 1
86 Animation::Keyframe interpolateLinear(const Animation::Keyframe& k0, const Animation::Keyframe& k1, float t)
87 {
88 Animation::Keyframe result;
89 result.translation = lerp(k0.translation, k1.translation, t);
90 result.scaling = lerp(k0.scaling, k1.scaling, t);
91 result.rotation = slerp(k0.rotation, k1.rotation, t);
92 result.time = math::lerp(k0.time, k1.time, (double)t);
93 return result;
94 }
95
96 Animation::Keyframe interpolateHermite(const Animation::Keyframe& k0, const Animation::Keyframe& k1, const Animation::Keyframe& k2, const Animation::Keyframe& k3, float t)
97 {

Callers 2

animateMethod · 0.85
interpolateMethod · 0.85

Calls 2

slerpFunction · 0.85
lerpFunction · 0.50

Tested by

no test coverage detected