CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::UIAnimationEasing< T > Class Template Referencefinal

These constants describe the curve of an animation—that is, the relative speed of an animation from start to finish. More...

#include <CeresEngine/UI/UIAnimation.hpp>

Public Types

using FunctionRef = T(*)(double, const T &, const T &) noexcept
 

Public Member Functions

constexpr UIAnimationEasing (const FunctionRef function)
 
T operator() (const double t, const T &a, const T &b) const noexcept
 

Static Public Attributes

static UIAnimationEasing EaseInOut
 Describes an S-curve in which the animation slowly speeds up and then slows down near the end of the animation.
 
static const UIAnimationEasing EaseIn
 Describes an animation that slows down as it reaches the end.
 
static const UIAnimationEasing EaseOut
 Describes an animation that slowly speeds up from the start.
 
static const UIAnimationEasing Linear
 Describes an animation in which there is no change in frame rate.
 

Private Attributes

FunctionRef mFunction
 

Detailed Description

template<typename T>
class CeresEngine::UIAnimationEasing< T >

These constants describe the curve of an animation—that is, the relative speed of an animation from start to finish.

Member Typedef Documentation

◆ FunctionRef

template<typename T >
using CeresEngine::UIAnimationEasing< T >::FunctionRef = T (*)(double, const T&, const T&) noexcept

Constructor & Destructor Documentation

◆ UIAnimationEasing()

template<typename T >
constexpr CeresEngine::UIAnimationEasing< T >::UIAnimationEasing ( const FunctionRef  function)
inlineconstexpr

Member Function Documentation

◆ operator()()

template<typename T >
T CeresEngine::UIAnimationEasing< T >::operator() ( const double  t,
const T a,
const T b 
) const
inlinenoexcept

Member Data Documentation

◆ EaseIn

Describes an animation that slows down as it reaches the end.

◆ EaseInOut

template<typename T >
UIAnimationEasing CeresEngine::UIAnimationEasing< T >::EaseInOut
static

Describes an S-curve in which the animation slowly speeds up and then slows down near the end of the animation.

This constant is the default.

◆ EaseOut

Describes an animation that slowly speeds up from the start.

◆ Linear

template<typename T >
const UIAnimationEasing< T > CeresEngine::UIAnimationEasing< T >::Linear
inlinestatic
Initial value:
= +[](double t, const T& a, const T& b) noexcept -> T {
return lerp(t, a, b);
}
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25

Describes an animation in which there is no change in frame rate.

◆ mFunction

template<typename T >
FunctionRef CeresEngine::UIAnimationEasing< T >::mFunction
private

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