Radium Engine  1.5.20
Loading...
Searching...
No Matches
KeyFramedValueController.hpp
1#pragma once
2#include <map>
3#include <set>
4
5#include <Core/Animation/KeyFramedValue.hpp>
6
7namespace Ra {
8namespace Core {
9namespace Animation {
10
17{
18 public:
20 using InsertCallback = std::function<void( const Scalar& /*t*/ )>;
21 using UpdateCallback = std::function<void( const Scalar& /*t*/ )>;
22
24 KeyFrame* value = nullptr,
25 std::string&& name = "__INVALID__",
26 InsertCallback inserter = []( const Scalar& ) {},
27 UpdateCallback updater = []( const Scalar& ) {} ) :
28 m_value( value ),
29 m_name( std::move( name ) ),
30 m_inserter( inserter ),
31 m_updater( updater ) {}
32
36 void insertKeyFrame( Scalar t ) { m_inserter( t ); }
37
41 void updateKeyFrame( Scalar t ) { m_updater( t ); }
42
47
52
57
62};
63
64} // namespace Animation
65} // namespace Core
66} // namespace Ra
T move(T... args)
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3