6#include <PhosphorAnimation/phosphoranimation_export.h>
26 qreal startValue = 0.0;
43class PHOSPHORANIMATION_EXPORT
Curve
84 virtual std::unique_ptr<Curve>
clone()
const = 0;
Polymorphic base for all animation curves.
Definition Curve.h:44
virtual void step(qreal dt, CurveState &state, qreal target) const
Advance state by dt real seconds toward target.
virtual QString toString() const =0
Serialize to "typeId:params" or bare "x1,y1,x2,y2" for cubic-bezier.
virtual qreal settleTime() const
Approximate settle time in seconds.
Definition Curve.h:74
Curve(const Curve &)=default
virtual std::unique_ptr< Curve > clone() const =0
Deep copy with identical parameters.
Curve & operator=(Curve &&)=default
virtual bool overshoots() const
True if this curve may evaluate outside [0,1] during progression.
Definition Curve.h:67
Curve & operator=(const Curve &)=default
virtual QString typeId() const =0
Stable identifier for this curve subclass (e.g. "bezier", "spring").
virtual qreal evaluate(qreal t) const =0
Evaluate at normalized time t in [0,1]. May overshoot by design.
virtual bool equals(const Curve &other) const
Same typeId + same parameters.
virtual bool isStateful() const
True if this curve requires persistent CurveState across frames.
Definition Curve.h:61
Definition AnimatedValue.h:31
Mutable state for stateful curve progression (springs carry position+velocity across frames; stateles...
Definition Curve.h:19