7#include <PhosphorAnimation/phosphoranimation_export.h>
40 std::unique_ptr<Curve>
clone()
const override;
47 Type type = Type::CubicBezier;
56 qreal amplitude = 1.0;
65 return !(*
this == other);
69 static qreal evaluateElasticOut(qreal t, qreal amp, qreal per);
70 static qreal evaluateBounceOut(qreal t, qreal amp,
int n);
Polymorphic base for all animation curves.
Definition Curve.h:44
Parametric easing curve: cubic bezier, elastic, or bounce.
Definition Easing.h:18
Easing(Easing &&)=default
bool equals(const Curve &other) const override
Same typeId + same parameters.
static Easing fromString(const QString &str)
Parse from config string. Returns default OutCubic on failure.
qreal evaluate(qreal x) const override
Evaluate at normalized time t in [0,1]. May overshoot by design.
bool overshoots() const override
True if this curve may evaluate outside [0,1] during progression.
std::unique_ptr< Curve > clone() const override
Deep copy with identical parameters.
QString toString() const override
Serialize to "typeId:params" or bare "x1,y1,x2,y2" for cubic-bezier.
QString typeId() const override
Stable identifier for this curve subclass (e.g. "bezier", "spring").
bool operator==(const Easing &other) const
Type
Definition Easing.h:20
bool operator!=(const Easing &other) const
Definition Easing.h:63
Easing & operator=(Easing &&)=default
Easing & operator=(const Easing &)=default
Easing(const Easing &)=default
Definition AnimatedValue.h:31