Etterna 0.74.4
Loading...
Searching...
No Matches
Tween.h
1#ifndef TWEEN_H
2#define TWEEN_H
3
4#include "Etterna/Models/Misc/EnumHelper.h"
5
6struct lua_State;
7using Lua = lua_State;
8
10enum TweenType
11{
12 TWEEN_LINEAR,
13 TWEEN_ACCELERATE,
14 TWEEN_DECELERATE,
15 TWEEN_SPRING,
16 TWEEN_BEZIER,
17 NUM_TweenType,
18 TweenType_Invalid
19};
21#define FOREACH_TweenType(tt) FOREACH_ENUM(TweenType, tt)
22LuaDeclareType(TweenType);
23
28class ITween
29{
30 public:
32 virtual ~ITween() = default;
33 [[nodiscard]] virtual auto Tween(float f) const -> float = 0;
34 [[nodiscard]] virtual auto Copy() const -> ITween* = 0;
35
36 static auto CreateFromType(TweenType iType) -> ITween*;
37 static auto CreateFromStack(Lua* L, int iStackPos) -> ITween*;
38};
39
40#endif
The interface for simple interpolation.
Definition Tween.h:29
virtual ~ITween()=default
Create the initial interface.