Class · aurore

aurore::Animatable

On this page
aurore/core/animation.hpp
#include <aurore/core/animation.hpp>

class aurore::Animatable : public aurore::FiniteTicking

Constructors 1

Animatable(float value = 0.0f)

Creates an animatable with the given initial value.

animation.hpp:47

Functions 9

float getValue()

Returns the current animatable value.

animation.hpp:52
void reset(float initialValue)

Stops and resets the animation, going back to the given initial value. All steps are removed. If an animation was already ongoing for that animatable, its end callback will be called.

animation.hpp:60
void reset()

Stops and resets the animation. The value will stay where it's at. All steps are removed. If an animation was already ongoing for that animatable, its end callback will be called.

animation.hpp:68
void addStep(float targetValue,int32_t duration,EasingFunction easing = EasingFunction::linear)

Adds an animation step to the target value, lasting the specified duration in milliseconds.

An animation can have multiple steps. Target value can be greater and lower than the previous step (it can go forwards or backwards). Easing function is optional, default is EasingFunction::linear.

Duration is int32_t due to internal limitations, so a step cannot last for longer than 2 147 483 647ms. The sum of the duration of all steps cannot exceed 71582min.

animation.hpp:79
float getProgress()

Returns the progress of the animation between 0.0f and 1.0f.

animation.hpp:84
operator float() const
operator float()
void operator=(const float value)
bool operator==(const float value)

Also the functions of aurore::FiniteTicking (2), aurore::Ticking (5).

Protected functions 3

virtual bool onUpdate(Time delta) override

Executed every frame while the ticking lives. Delta is the time difference in ms between the last frame and the current one. Must return false if the ticking is finished and should be removed from the list of active tickings. The end callback will automatically be called then.

Overrides aurore::Ticking::onUpdate

animation.hpp:92
virtual void onReset() override

Called when the ticking gets reset.

Overrides aurore::FiniteTicking::onReset

animation.hpp:94
virtual void onRewind() override

Called when the ticking gets rewound.

Overrides aurore::FiniteTicking::onRewind

animation.hpp:95

Read from Aurore's headers by Doxygen at each build · library/include