7#include <PhosphorAnimation/phosphoranimation_export.h>
27 qreal startValue = 0.0;
44class PHOSPHORANIMATION_EXPORT
Curve
95 virtual std::unique_ptr<Curve>
clone()
const = 0;
Animation-wide UI bounds (duration, stagger interval).
Polymorphic base for all animation curves.
Definition Curve.h:45
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:85
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:68
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:62
constexpr double MaxCurveProgress
Definition AnimationLimits.h:198
constexpr double MinCurveProgress
Overshoot envelope for a curve's OUTPUT.
Definition AnimationLimits.h:197
Definition AnimatedValue.h:32
qreal boundCurveProgress(qreal progress)
Bound a curve's output to the overshoot envelope [Limits::MinCurveProgress, Limits::MaxCurveProgress]...
Definition Curve.h:118
Mutable state for stateful curve progression (springs carry position+velocity across frames; stateles...
Definition Curve.h:20