Cafu Engine
cf::GameSys::ApproxBaseT Class Referenceabstract

A common base class for "approximators" (interpolators and extrapolators), so that approximators of different types can easily be managed together. More...

#include "Interpolator.hpp"

Inheritance diagram for cf::GameSys::ApproxBaseT:

Public Member Functions

virtual cf::TypeSys::VarBaseTGetVar () const =0
 Returns the variable that this is an interpolator for. More...
 
virtual void ReInit ()=0
 Re-initializes this interpolator to the variable's current value. More...
 
virtual void UpdateTargetValue ()=0
 Updates the interpolator to interpolate from the current interpolated value to the current value of the variable (the new target value). More...
 
virtual void UpdateAfterReprediction ()=0
 Updates the interpolator to account for the new target value after the local human player's reprediction has been performed. More...
 
virtual void UpdateAfterPrediction ()=0
 Updates the interpolator to account for the new target value after the local human player's prediction has been performed. More...
 
virtual void AdvanceTime (float Time)=0
 Advances the interpolation over the given time. More...
 
virtual void SetCurrentValue ()=0
 Assigns the interpolation's current value to the variable. More...
 
virtual void SetTargetValue ()=0
 Assigns the interpolation's target value to the variable. More...
 

Detailed Description

A common base class for "approximators" (interpolators and extrapolators), so that approximators of different types can easily be managed together.

ApproxBaseTs are used in ComponentBaseT in order to advance values over client frames in order to bridge the larger intervals between server frames, especially the origin and the orientation of movable NPC entities.

Member Function Documentation

virtual void cf::GameSys::ApproxBaseT::AdvanceTime ( float  Time)
pure virtual

Advances the interpolation over the given time.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual cf::TypeSys::VarBaseT* cf::GameSys::ApproxBaseT::GetVar ( ) const
pure virtual

Returns the variable that this is an interpolator for.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::ReInit ( )
pure virtual

Re-initializes this interpolator to the variable's current value.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::SetCurrentValue ( )
pure virtual

Assigns the interpolation's current value to the variable.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::SetTargetValue ( )
pure virtual

Assigns the interpolation's target value to the variable.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::UpdateAfterPrediction ( )
pure virtual

Updates the interpolator to account for the new target value after the local human player's prediction has been performed.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::UpdateAfterReprediction ( )
pure virtual

Updates the interpolator to account for the new target value after the local human player's reprediction has been performed.

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.

virtual void cf::GameSys::ApproxBaseT::UpdateTargetValue ( )
pure virtual

Updates the interpolator to interpolate from the current interpolated value to the current value of the variable (the new target value).

Implemented in cf::GameSys::VarSlerpT, and cf::GameSys::VarInterpolatorT< T >.


The documentation for this class was generated from the following file: