CLinearSplineInterpolator.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "ISplineInterpolator.h"
5 
6 
7 namespace ion
8 {
9  namespace Animation
10  {
11 
12  template <typename T>
14  {
15 
16  public:
17 
18  virtual T Interpolate(ISpline<T> const & Path, int const Index, float const Mu);
19 
20  };
21 
22  template <typename T>
23  T CLinearSplineInterpolator<T>::Interpolate(ISpline<T> const & Path, int const Index, float const Mu)
24  {
25  return Path.GetNode(Index) * (1.f - Mu) + Path.GetNode(Index + 1) * Mu;
26  }
27 
28  }
29 }
Definition: CLinearSplineInterpolator.h:13
Definition: ISplineInterpolator.h:14
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
Definition: ISpline.h:13
virtual TSplineNode const & GetNode(int const Index) const =0
virtual T Interpolate(ISpline< T > const &Path, int const Index, float const Mu)
Definition: CLinearSplineInterpolator.h:23