neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
easing.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  neogfx
 

Typedefs

typedef std::optional< easingneogfx::optional_easing
 
typedef std::array< easing, 43 > neogfx::standard_easings_t
 

Enumerations

enum class  neogfx::easing_class : uint32_t {
  neogfx::Linear = 0x0000 , neogfx::Quad = 0x0001 , neogfx::Cubic = 0x0002 , neogfx::Quart = 0x0003 ,
  neogfx::Quint = 0x0004 , neogfx::Sine = 0x0005 , neogfx::Expo = 0x0006 , neogfx::Circ = 0x0007 ,
  neogfx::Elastic = 0x0008 , neogfx::Back = 0x0009 , neogfx::Bounce = 0x000A , neogfx::Zero = 0x000B ,
  neogfx::One = 0x000C , neogfx::In = 0x0100 , neogfx::Out = 0x0200 , neogfx::Reverse = 0x0400 ,
  neogfx::InOut = In | Out , neogfx::OutIn = In | Out | Reverse , neogfx::Inverted = 0x0800 , neogfx::Constant = 0x1000 ,
  neogfx::CLASS_MASK = 0x00FF , neogfx::DIRECTION_MASK = 0xFF00
}
 
enum class  neogfx::easing : std::uint32_t {
  neogfx::Linear = static_cast<std::uint32_t>(easing_class::Linear) , neogfx::InLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::In) , neogfx::OutLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::Out) , neogfx::InOutLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::InOut) ,
  neogfx::OutInLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::OutIn) , neogfx::InQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::In) , neogfx::OutQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::Out) , neogfx::InOutQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::InOut) ,
  neogfx::OutInQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::OutIn) , neogfx::InCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::In) , neogfx::OutCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::Out) , neogfx::InOutCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::InOut) ,
  neogfx::OutInCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::OutIn) , neogfx::InQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::In) , neogfx::OutQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::Out) , neogfx::InOutQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::InOut) ,
  neogfx::OutInQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::OutIn) , neogfx::InQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::In) , neogfx::OutQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::Out) , neogfx::InOutQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::InOut) ,
  neogfx::OutInQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::OutIn) , neogfx::InSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::In) , neogfx::OutSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::Out) , neogfx::InOutSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::InOut) ,
  neogfx::OutInSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::OutIn) , neogfx::InExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::In) , neogfx::OutExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::Out) , neogfx::InOutExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::InOut) ,
  neogfx::OutInExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::OutIn) , neogfx::InCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::In) , neogfx::OutCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::Out) , neogfx::InOutCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::InOut) ,
  neogfx::OutInCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::OutIn) , neogfx::InElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::In) , neogfx::OutElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::Out) , neogfx::InOutElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::InOut) ,
  neogfx::OutInElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::OutIn) , neogfx::InBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::In) , neogfx::OutBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::Out) , neogfx::InOutBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::InOut) ,
  neogfx::OutInBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::OutIn) , neogfx::InBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::In) , neogfx::OutBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::Out) , neogfx::InOutBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::InOut) ,
  neogfx::OutInBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::OutIn) , neogfx::Zero = static_cast<std::uint32_t>(easing_class::Zero | easing_class::Constant) , neogfx::One = static_cast<std::uint32_t>(easing_class::One | easing_class::Constant) , neogfx::InvertedLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::Inverted) ,
  neogfx::InvertedInLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInLinear = static_cast<std::uint32_t>(easing_class::Linear | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInQuad = static_cast<std::uint32_t>(easing_class::Quad | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInCubic = static_cast<std::uint32_t>(easing_class::Cubic | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInQuart = static_cast<std::uint32_t>(easing_class::Quart | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInQuint = static_cast<std::uint32_t>(easing_class::Quint | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInSine = static_cast<std::uint32_t>(easing_class::Sine | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInExpo = static_cast<std::uint32_t>(easing_class::Expo | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInCirc = static_cast<std::uint32_t>(easing_class::Circ | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInElastic = static_cast<std::uint32_t>(easing_class::Elastic | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInBack = static_cast<std::uint32_t>(easing_class::Back | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedInBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::In | easing_class::Inverted) , neogfx::InvertedOutBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::Out | easing_class::Inverted) , neogfx::InvertedInOutBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::InOut | easing_class::Inverted) , neogfx::InvertedOutInBounce = static_cast<std::uint32_t>(easing_class::Bounce | easing_class::OutIn | easing_class::Inverted) ,
  neogfx::InvertedZero = static_cast<std::uint32_t>(easing_class::Zero | easing_class::Constant | easing_class::Inverted) , neogfx::InvertedOne = static_cast<std::uint32_t>(easing_class::One | easing_class::Constant | easing_class::Inverted)
}
 

Functions

template<typename T >
neogfx::ease_linear (T t)
 
template<typename T >
neogfx::ease_in_sine (T t)
 
template<typename T >
neogfx::ease_out_sine (T t)
 
template<typename T >
neogfx::ease_in_out_sine (T t)
 
template<typename T >
neogfx::ease_out_in_sine (T t)
 
template<typename T >
neogfx::ease_in_quad (T t)
 
template<typename T >
neogfx::ease_out_quad (T t)
 
template<typename T >
neogfx::ease_in_out_quad (T t)
 
template<typename T >
neogfx::ease_out_in_quad (T t)
 
template<typename T >
neogfx::ease_in_cubic (T t)
 
template<typename T >
neogfx::ease_out_cubic (T t)
 
template<typename T >
neogfx::ease_in_out_cubic (T t)
 
template<typename T >
neogfx::ease_out_in_cubic (T t)
 
template<typename T >
neogfx::ease_in_quart (T t)
 
template<typename T >
neogfx::ease_out_quart (T t)
 
template<typename T >
neogfx::ease_in_out_quart (T t)
 
template<typename T >
neogfx::ease_out_in_quart (T t)
 
template<typename T >
neogfx::ease_in_quint (T t)
 
template<typename T >
neogfx::ease_out_quint (T t)
 
template<typename T >
neogfx::ease_in_out_quint (T t)
 
template<typename T >
neogfx::ease_out_in_quint (T t)
 
template<typename T >
neogfx::ease_in_expo (T t)
 
template<typename T >
neogfx::ease_out_expo (T t)
 
template<typename T >
neogfx::ease_in_out_expo (T t)
 
template<typename T >
neogfx::ease_out_in_expo (T t)
 
template<typename T >
neogfx::ease_in_circ (T t)
 
template<typename T >
neogfx::ease_out_circ (T t)
 
template<typename T >
neogfx::ease_in_out_circ (T t)
 
template<typename T >
neogfx::ease_out_in_circ (T t)
 
template<typename T , typename Arg = T>
neogfx::ease_in_back (T t, Arg s=1.70158)
 
template<typename T , typename Arg = T>
neogfx::ease_out_back (T t, T s=1.70158)
 
template<typename T , typename Arg = T>
neogfx::ease_in_out_back (T t, Arg s=1.70158)
 
template<typename T , typename Arg = T>
neogfx::ease_out_in_back (T t, Arg s=1.70158)
 
template<typename T , typename Arg = T>
neogfx::ease_in_elastic (T t, Arg a=0.5, Arg p=0.25)
 
template<typename T , typename Arg = T>
neogfx::ease_out_elastic (T t, Arg a=0.5, Arg p=0.25)
 
template<typename T , typename Arg = T>
neogfx::ease_in_out_elastic (T t, Arg a=0.5, Arg p=0.25)
 
template<typename T , typename Arg = T>
neogfx::ease_out_in_elastic (T t, Arg a=0.5, Arg p=0.25)
 
template<typename T >
neogfx::ease_out_bounce (T t)
 
template<typename T >
neogfx::ease_in_bounce (T t)
 
template<typename T >
neogfx::ease_in_out_bounce (T t)
 
template<typename T >
neogfx::ease_out_in_bounce (T t)
 
template<typename T >
neogfx::ease_zero (T)
 
template<typename T >
neogfx::ease_one (T)
 
constexpr easing_class neogfx::operator| (easing_class lhs, easing_class rhs)
 
constexpr easing_class neogfx::operator& (easing_class lhs, easing_class rhs)
 
constexpr easing_class neogfx::operator~ (easing_class lhs)
 
constexpr easing neogfx::operator| (easing lhs, easing_class rhs)
 
constexpr easing neogfx::operator& (easing lhs, easing_class rhs)
 
const standard_easings_tneogfx::standard_easings ()
 
uint32_t neogfx::standard_easing_index (easing aEasing)
 
template<typename T >
neogfx::ease (easing e, T t)
 
template<typename T >
neogfx::ease (easing_class in, easing_class out, T t)
 
template<typename T >
neogfx::ease (easing e1, easing e2, T t)
 
template<typename T >
neogfx::ease (easing e1, easing e2, easing e3, easing e4, T t)
 
template<typename T >
neogfx::ease (easing e, T t, T b, T c, T d)
 
template<typename T >
neogfx::partitioned_ease (easing e1, easing e2, T t, double w1=1.0, double w2=1.0)
 
template<typename T >
neogfx::partitioned_ease (easing e1, easing e2, easing e3, easing e4, T t, double w1=1.0, double w2=1.0, double w3=1.0, double w4=1.0)
 
std::string const & neogfx::to_string (easing e)