Sleeping Wombat Common Library  0.50.0
swCommonLibrary
Classes | Functions
DefaultInterpolators Namespace Reference

Interpolators helpers functions. More...

Classes

struct  is_param_animation_enabled
 Trait for enabling types for parameter animation. More...
 

Functions

 DEFINE_SPECIALIZATION (float, CreateLinear)
 
 DEFINE_SPECIALIZATION (double, CreateLinear)
 
 DEFINE_SPECIALIZATION (char, CreateLinear)
 
 DEFINE_SPECIALIZATION (uint8, CreateLinear)
 
 DEFINE_SPECIALIZATION (int8, CreateLinear)
 
 DEFINE_SPECIALIZATION (uint16, CreateLinear)
 
 DEFINE_SPECIALIZATION (int16, CreateLinear)
 
 DEFINE_SPECIALIZATION (uint32, CreateLinear)
 
 DEFINE_SPECIALIZATION (int32, CreateLinear)
 
 DEFINE_SPECIALIZATION (uint64, CreateLinear)
 
 DEFINE_SPECIALIZATION (int64, CreateLinear)
 
 DEFINE_SPECIALIZATION (float, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (double, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (char, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (uint8, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (int8, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (uint16, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (int16, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (uint32, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (int32, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (uint64, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (int64, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (bool, CreateDiscrete)
 
 DEFINE_SPECIALIZATION (float, CreateCosinus)
 
 DEFINE_SPECIALIZATION (double, CreateCosinus)
 
 DEFINE_SPECIALIZATION (char, CreateCosinus)
 
 DEFINE_SPECIALIZATION (uint8, CreateCosinus)
 
 DEFINE_SPECIALIZATION (int8, CreateCosinus)
 
 DEFINE_SPECIALIZATION (uint16, CreateCosinus)
 
 DEFINE_SPECIALIZATION (int16, CreateCosinus)
 
 DEFINE_SPECIALIZATION (uint32, CreateCosinus)
 
 DEFINE_SPECIALIZATION (int32, CreateCosinus)
 
 DEFINE_SPECIALIZATION (uint64, CreateCosinus)
 
 DEFINE_SPECIALIZATION (int64, CreateCosinus)
 
template<typename KeyType >
UPtr< IInterpolator< KeyType > > CreateLinear (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< KeyType > > CreateDiscrete (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< KeyType > > CreateCosinus (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< KeyType > > Create (InterpolatorType type, const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< std::is_floating_point< KeyType >::value, KeyType >::type > > Create (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 Function for creating default interpolators for different types of keys. Specialize this template in .cpp file. More...
 
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< std::is_integral< KeyType >::value, KeyType >::type > > Create (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<>
UPtr< IInterpolator< bool > > Create (const Key< bool > &leftKey, const Key< bool > &rightKey, UPtr< const IInterpolator< bool > > &leftInterpolator, UPtr< const IInterpolator< bool > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< std::is_enum< KeyType >::value, KeyType >::type > > Create (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< std::is_same< KeyType, std::basic_string< typename KeyType::value_type > >::value, KeyType >::type > > Create (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< is_param_animation_enabled< KeyType >::value, KeyType >::type > > Create (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 
 DECLARE_SPECIALIZATON (float, CreateLinear)
 
 DECLARE_SPECIALIZATON (double, CreateLinear)
 
 DECLARE_SPECIALIZATON (char, CreateLinear)
 
 DECLARE_SPECIALIZATON (uint8, CreateLinear)
 
 DECLARE_SPECIALIZATON (int8, CreateLinear)
 
 DECLARE_SPECIALIZATON (uint16, CreateLinear)
 
 DECLARE_SPECIALIZATON (int16, CreateLinear)
 
 DECLARE_SPECIALIZATON (uint32, CreateLinear)
 
 DECLARE_SPECIALIZATON (int32, CreateLinear)
 
 DECLARE_SPECIALIZATON (uint64, CreateLinear)
 
 DECLARE_SPECIALIZATON (int64, CreateLinear)
 
 DECLARE_SPECIALIZATON (float, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (double, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (char, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (uint8, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (int8, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (uint16, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (int16, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (uint32, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (int32, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (uint64, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (int64, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (bool, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (std::wstring, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (std::string, CreateDiscrete)
 
 DECLARE_SPECIALIZATON (float, CreateCosinus)
 
 DECLARE_SPECIALIZATON (double, CreateCosinus)
 
 DECLARE_SPECIALIZATON (char, CreateCosinus)
 
 DECLARE_SPECIALIZATON (uint8, CreateCosinus)
 
 DECLARE_SPECIALIZATON (int8, CreateCosinus)
 
 DECLARE_SPECIALIZATON (uint16, CreateCosinus)
 
 DECLARE_SPECIALIZATON (int16, CreateCosinus)
 
 DECLARE_SPECIALIZATON (uint32, CreateCosinus)
 
 DECLARE_SPECIALIZATON (int32, CreateCosinus)
 
 DECLARE_SPECIALIZATON (uint64, CreateCosinus)
 
 DECLARE_SPECIALIZATON (int64, CreateCosinus)
 

Detailed Description

Interpolators helpers functions.

Function Documentation

template<typename KeyType >
UPtr< IInterpolator< KeyType > > DefaultInterpolators::Create ( InterpolatorType  type,
const Key< KeyType > &  leftKey,
const Key< KeyType > &  rightKey,
UPtr< const IInterpolator< KeyType > > &  leftInterpolator,
UPtr< const IInterpolator< KeyType > > &  rightInterpolator 
)
Todo:
Implement Bezier interpolator.
Todo:
Implement Bezier interpolator.
template<typename KeyType >
UPtr< IInterpolator< typename std::enable_if< std::is_floating_point< KeyType >::value, KeyType >::type > > DefaultInterpolators::Create ( const Key< KeyType > &  leftKey,
const Key< KeyType > &  rightKey,
UPtr< const IInterpolator< KeyType > > &  leftInterpolator,
UPtr< const IInterpolator< KeyType > > &  rightInterpolator 
)
inline

Function for creating default interpolators for different types of keys. Specialize this template in .cpp file.

Note
Left or right interpolator can be nullptr, but keys always exist.