Rebel Fork Framework
|
#include <Urho3D/Replica/NetworkValue.h>
Classes | |
struct | InterpolationCache |
struct | TimeAndValue |
Public Types | |
using | NetworkValueType = NetworkValue< T, Traits > |
using | InternalType = typename Traits::InternalType |
using | ReturnType = typename Traits::ReturnType |
Public Member Functions | |
void | Setup (unsigned maxExtrapolation, float smoothingConstant, float snapThreshold) |
Update sampler settings. | |
ea::optional< ReturnType > | UpdateAndSample (const NetworkValueType &value, const NetworkTime &time, float timeStep) |
Update sampler state for new time and return current value. | |
Private Member Functions | |
float | GetExtrapolationFactor (const NetworkTime &time, NetworkFrame baseFrame, unsigned maxExtrapolation) const |
void | UpdateCorrection (const NetworkValueType &value, float timeStep) |
void | UpdateCache (const NetworkValueType &value, NetworkFrame frame) |
ReturnType | CalculateValueFromCache (const NetworkValueType &value, const NetworkTime &time) |
Private Attributes | |
unsigned | maxExtrapolation_ {} |
float | smoothingConstant_ {} |
float | snapThreshold_ {M_LARGE_VALUE} |
ea::optional< InterpolationCache > | interpolationCache_ |
ea::optional< TimeAndValue > | previousValue_ |
ea::optional< NetworkFrame > | extrapolationFrame_ |
ReturnType | valueCorrection_ {} |
Helper class that manages continuous sampling of NetworkValue on the client side. Performs extrapolation and error smoothing.