27#include "../curves/constant.h"
28#include "../curves/easing.h"
29#include "../curves/linear.h"
30#include "../curves/spring.h"
56 Animator (std::unique_ptr<Controller> controller_ =
nullptr);
98 void gotoTime (juce::int64 timeInMs);
105 bool addAnimation (std::unique_ptr<AnimationType> animation);
142 int getAnimations (
int id, std::vector<AnimationType*>& animations);
155 bool updateTarget (
int id,
int valIndex,
float newTarget);
165 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
Animator)
167 std::unique_ptr<Controller> controller;
169 std::vector<std::unique_ptr<AnimationType>> animations;
Abstract base class; all the real action happens in the derived templated Animation class,...
Definition: animation.h:39
A class that can own Animation objects and execute them at a regular interval.
Definition: animator.h:47
void cleanup()
Definition: animator.cpp:138
AnimationType * getAnimation(int id)
Definition: animator.cpp:151
bool setFrameRate(int rateInHz)
Attempt to set the controller's frame rate.
Definition: animator.cpp:51
bool updateTarget(int id, int valIndex, float newTarget)
Pass a new ending value to the animation at id, if it is still in progress. Not all animated value cl...
Definition: animator.cpp:178
void setController(std::unique_ptr< Controller > controller)
Set a new controller object, replacing (and destryoying) the current one.
Definition: animator.cpp:40
float getFrameRate() const
get the (reported) frame rate of the controller. This may be the rate that was requested or a rate th...
Definition: animator.cpp:62
int getAnimations(int id, std::vector< AnimationType * > &animations)
Definition: animator.cpp:162
bool cancelAnimation(int id, bool moveToEndPosition)
Definition: animator.cpp:113
void gotoTime(juce::int64 timeInMs)
Update all active animations with a new time.
Definition: animator.cpp:73
bool addAnimation(std::unique_ptr< AnimationType > animation)
Definition: animator.cpp:92
bool cancelAllAnimations(bool moveToEndPosition)
Definition: animator.cpp:133
Controller * getController() const
return a pointer to the active controller object.
Definition: animator.cpp:46
juce::CriticalSection mutex
Definition: animator.h:173
Definition: controller.h:78