14#include <AUI/Common/AObject.h>
15#include <AUI/Common/AVector.h>
16#include <glm/gtc/matrix_transform.hpp>
17#include "Curves/linear.h"
18#include "Curves/bezier.h"
19#include "Curves/viscous_fluid.h"
24using AAnimationCurve = std::function<float(
float)>;
28 AView* mView =
nullptr;
30 float mCurrentTheta = 0;
33 bool mIsPlaying =
true;
34 bool mIsRepeating =
false;
36 std::chrono::milliseconds mLastFrameTime = std::chrono::milliseconds(0);
47 virtual void doPostRender(
AView* view,
float theta,
IRenderer& render) {};
49 void translateToCenter(
IRenderer& render);
50 void translateToCorner(
IRenderer& render);
57 void setCurve(
const std::function<
float(
float)>& curve) {
65 void setDuration(
float period) {
69 void setRepeating(
bool repeating) {
70 mIsRepeating = repeating;
73 [[nodiscard]]
const AView* getView()
const {
77 void setView(
AView* view) {
Definition: AAnimator.h:26
virtual void doAnimation(AView *view, float theta, IRenderer &render)
Does the animation (sets matrix, colors, etc...)
Definition: AAnimator.h:45
A std::vector with AUI extensions.
Definition: AVector.h:38
Base class of all UI objects.
Definition: AView.h:77
Base class for rendering.
Definition: IRenderer.h:149
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177