Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimation::CurveState Struct Reference

Mutable state for stateful curve progression (springs carry position+velocity across frames; stateless curves share the struct for uniform caller treatment). More...

#include <phosphor-animation/include/PhosphorAnimation/Curve.h>

Public Attributes

qreal value = 0.0
 
qreal velocity = 0.0
 
qreal time = 0.0
 
qreal startValue = 0.0
 Start of current segment — stateless step() lerps from here to target.
 
qreal duration = 1.0
 Segment duration in seconds. Stateful curves ignore this.
 

Detailed Description

Mutable state for stateful curve progression (springs carry position+velocity across frames; stateless curves share the struct for uniform caller treatment).

All time fields are in real seconds.

Member Data Documentation

◆ duration

qreal PhosphorAnimation::CurveState::duration = 1.0

Segment duration in seconds. Stateful curves ignore this.

◆ startValue

qreal PhosphorAnimation::CurveState::startValue = 0.0

Start of current segment — stateless step() lerps from here to target.

For retarget: set startValue = value, time = 0, then pass new target. Stateful curves (Spring) ignore this; they derive continuity from value/velocity.

◆ time

qreal PhosphorAnimation::CurveState::time = 0.0

◆ value

qreal PhosphorAnimation::CurveState::value = 0.0

◆ velocity

qreal PhosphorAnimation::CurveState::velocity = 0.0

The documentation for this struct was generated from the following file: