Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math > API/Runtime/Core/Math/FMath
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
Include | #include "Math/UnrealMathUtility.h" |
template<class U>
static constexpr U CubicCRSplineInterp
&40;
const U & P0,
const U & P1,
const U & P2,
const U & P3,
const float T0,
const float T1,
const float T2,
const float T3,
const float T
&41;
Remarks
Cubic Catmull-Rom Spline interpolation. Based on http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf Curves are guaranteed to pass through the control points and are easily chained together. Equation supports abitrary parameterization. eg. Uniform=0,1,2,3 ; chordal= |Pn - Pn-1| ; centripetal = |Pn - Pn-1|^0.5 P0 - The control point preceding the interpolation range. P1 - The control point starting the interpolation range. P2 - The control point ending the interpolation range. P3 - The control point following the interpolation range. T0-3 - The interpolation parameters for the corresponding control points. T - The interpolation factor in the range 0 to 1. 0 returns P1. 1 returns P2.