1 #ifndef _RIVE_KEY_FRAME_HPP_
2 #define _RIVE_KEY_FRAME_HPP_
3 #include "rive/generated/animation/keyframe_base.hpp"
5 class CubicInterpolator;
7 class KeyFrame : public KeyFrameBase {
9 CubicInterpolator* m_Interpolator = nullptr;
13 inline float seconds() const { return m_Seconds; }
14 inline CubicInterpolator* interpolator() const { return m_Interpolator; }
16 void computeSeconds(int fps);
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;
23 StatusCode import(ImportStack& importStack) override;