Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / include / rive / animation / keyframe.hpp
1 #ifndef _RIVE_KEY_FRAME_HPP_
2 #define _RIVE_KEY_FRAME_HPP_
3 #include "rive/generated/animation/keyframe_base.hpp"
4 namespace rive {
5     class CubicInterpolator;
6
7     class KeyFrame : public KeyFrameBase {
8     private:
9         CubicInterpolator* m_Interpolator = nullptr;
10         float m_Seconds;
11
12     public:
13         inline float seconds() const { return m_Seconds; }
14         inline CubicInterpolator* interpolator() const { return m_Interpolator; }
15
16         void computeSeconds(int fps);
17
18         StatusCode onAddedDirty(CoreContext* context) override;
19         virtual void apply(Core* object, int propertyKey, float mix) = 0;
20         virtual void applyInterpolation(
21             Core* object, int propertyKey, float seconds, const KeyFrame* nextFrame, float mix) = 0;
22
23         StatusCode import(ImportStack& importStack) override;
24     };
25 } // namespace rive
26
27 #endif