Radium Engine
1.5.0
KeyFramedValueController.hpp
1
#pragma once
2
#include <map>
3
#include <set>
4
5
#include <Core/Animation/KeyFramedValue.hpp>
6
7
namespace
Ra
{
8
namespace
Core {
9
namespace
Animation {
10
16
class
KeyFramedValueController
17
{
18
public
:
19
using
KeyFrame
=
Ra::Core::Animation::KeyFramedValueBase
;
20
using
InsertCallback = std::function<void(
const
Scalar&
/*t*/
)>;
21
using
UpdateCallback = std::function<void(
const
Scalar&
/*t*/
)>;
22
23
KeyFramedValueController
(
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
46
KeyFrame
*
m_value
;
47
51
std::string
m_name
;
52
56
InsertCallback
m_inserter
;
57
61
UpdateCallback
m_updater
;
62
};
63
64
}
// namespace Animation
65
}
// namespace Core
66
}
// namespace Ra
Ra::Core::Animation::KeyFramedValueBase
Definition:
KeyFramedValue.hpp:21
Ra::Core::Animation::KeyFramedValueController
Definition:
KeyFramedValueController.hpp:17
Ra::Core::Animation::KeyFramedValueController::m_updater
UpdateCallback m_updater
Definition:
KeyFramedValueController.hpp:61
Ra::Core::Animation::KeyFramedValueController::m_value
KeyFrame * m_value
Definition:
KeyFramedValueController.hpp:46
Ra::Core::Animation::KeyFramedValueController::insertKeyFrame
void insertKeyFrame(Scalar t)
Definition:
KeyFramedValueController.hpp:36
Ra::Core::Animation::KeyFramedValueController::m_inserter
InsertCallback m_inserter
Definition:
KeyFramedValueController.hpp:56
Ra::Core::Animation::KeyFramedValueController::updateKeyFrame
void updateKeyFrame(Scalar t)
Definition:
KeyFramedValueController.hpp:41
Ra::Core::Animation::KeyFramedValueController::m_name
std::string m_name
Definition:
KeyFramedValueController.hpp:51
Ra
Definition:
Cage.cpp:3
src
Core
Animation
KeyFramedValueController.hpp
Generated on Wed Apr 5 2023 15:07:30 for Radium Engine by
1.9.1