Luanti 5.19.0-dev
Loading...
Searching...
No Matches
SmoothTranslator< T > Struct Template Reference

#include <content_cao.h>

Collaboration diagram for SmoothTranslator< T >:

Public Member Functions

 SmoothTranslator ()=default
void init (T current)
void update (T new_target, bool is_end_position=false, float update_interval=-1)
void translate (f32 dtime)

Public Attributes

T val_old
T val_current
T val_target
f32 anim_time = 0
f32 anim_time_counter = 0
bool aim_is_end = true

Constructor & Destructor Documentation

◆ SmoothTranslator()

template<typename T>
SmoothTranslator< T >::SmoothTranslator ( )
default

References init(), translate(), and update().

Here is the call graph for this function:

Member Function Documentation

◆ init()

template<typename T>
void SmoothTranslator< T >::init ( T current)

Referenced by SmoothTranslator(), GenericCAO::processInitData(), and GenericCAO::processMessage().

Here is the caller graph for this function:

◆ translate()

template<typename T>
void SmoothTranslator< T >::translate ( f32 dtime)

References aim_is_end, anim_time, anim_time_counter, val_current, val_old, and val_target.

Referenced by SmoothTranslator(), and GenericCAO::step().

Here is the caller graph for this function:

◆ update()

template<typename T>
void SmoothTranslator< T >::update ( T new_target,
bool is_end_position = false,
float update_interval = -1 )

References aim_is_end, anim_time, anim_time_counter, val_current, val_old, and val_target.

Referenced by SmoothTranslator(), GenericCAO::processMessage(), and GenericCAO::step().

Here is the caller graph for this function:

Member Data Documentation

◆ aim_is_end

template<typename T>
bool SmoothTranslator< T >::aim_is_end = true

Referenced by GenericCAO::step(), translate(), and update().

◆ anim_time

template<typename T>
f32 SmoothTranslator< T >::anim_time = 0

Referenced by GenericCAO::step(), translate(), and update().

◆ anim_time_counter

template<typename T>
f32 SmoothTranslator< T >::anim_time_counter = 0

Referenced by translate(), and update().

◆ val_current

template<typename T>
T SmoothTranslator< T >::val_current

◆ val_old

template<typename T>
T SmoothTranslator< T >::val_old

Referenced by translate(), and update().

◆ val_target

template<typename T>
T SmoothTranslator< T >::val_target

Referenced by GenericCAO::step(), translate(), and update().


The documentation for this struct was generated from the following files: