Linearly interpolates a value over a period of time. More...
#include "Interpolator.hpp"

Public Member Functions | |
| InterpolatorT (T &v) | |
| void | ReInit () |
| Used to re-initialize this interpolator at the current value. More... | |
| void | NotifyOverwriteUpdate () |
| The user calls this method in order to let the interpolator know that the interpolated value was changed externally. More... | |
| void | UpdateRef (const T &Ref) |
| Sets a new reference value: the value that we should interpolate to. More... | |
| void | Interpolate (float Time) |
| Advances the interpolation over the given time. More... | |
Linearly interpolates a value over a period of time.
The course of the interpolation is adapted/updated whenever a new reference value is set. This is mostly intended for game entities on clients, where we interpolate from the "current" value towards the reference value of the most recent server update. If the subsequent server update happens to arrives later than the one before it, our interpolation may (briefly) turn into an extrapolation for bridging the gap.
|
inlinevirtual |
Advances the interpolation over the given time.
Implements DeathMatch::ApproxBaseT.
|
inlinevirtual |
The user calls this method in order to let the interpolator know that the interpolated value was changed externally.
Implements DeathMatch::ApproxBaseT.
|
inlinevirtual |
Used to re-initialize this interpolator at the current value.
Implements DeathMatch::ApproxBaseT.
|
inline |
Sets a new reference value: the value that we should interpolate to.