header_utils
Loading...
Searching...
No Matches
tweener.h
1#pragma once
2
6
7#include "geometry/geometry_common.h"
8#include "enum_flags.h"
9
10namespace ghassanpl
11{
12 enum class tween_flags
13 {
14
15 };
16
17 template <typename T, enum_flags<uint64_t> FLAGS>
18 struct tween_computer
19 {
20
21 };
22
23 struct tween_options
24 {
25 enum_flags<tween_flags> m_flags = {};
29 };
30
31 struct tweening_system
32 {
33 template <typename GETTER, typename SETTER, typename TYPE_TWEEN, typename DURATION_TYPE>
34 struct ITween
35 {
36 virtual ~ITween() noexcept = default;
37
38 ITween(GETTER&& getter, SETTER&& setter, TYPE_TWEEN&& to, DURATION_TYPE&& duration, tween_options options)
39 : m_start_value(getter())
40 , m_end_value(std::forward<TYPE_TWEEN>(to))
41 , m_getter(std::forward<GETTER>(getter))
42 , m_setter(std::forward<SETTER>(setter))
43 , m_options(options)
44 {
45 }
46
47 protected:
48
49 TYPE_TWEEN m_start_value = {};
50 TYPE_TWEEN m_end_value = {};
51 GETTER m_getter = {};
52 SETTER m_setter = {};
53
54 tween_options m_options = {};
55
56 tween_computer<TYPE_TWEEN, enum_flags<uint64_t>{}> m_computer = {};
57 };
58
59 template <typename GETTER, typename SETTER, typename TYPE_TWEEN, typename DURATION_TYPE>
60 auto tween(TYPE_TWEEN& target, GETTER&& getter, SETTER&& setter, TYPE_TWEEN&& to, DURATION_TYPE&& duration)
61 {
62
63 }
64 };
65
66}
constexpr CONTAINER to(RANGE &&range, TYPES &&... args)
to<container>();
Definition ranges.h:386
Primary namespace for everything in this library.
Definition align+rec2.h:10