FlatUI
An open source project by
FPL.
|
Describes a curve's typical shape. More...
#include <flatui.h>
Describes a curve's typical shape.
Public Member Functions | |
AnimCurveDescription (AnimType type, float typical_delta_distance, float typical_total_time, float bias) | |
Public Attributes | |
AnimType | type |
float | typical_delta_distance |
float | typical_total_time |
float | bias |
float flatui::AnimCurveDescription::bias |
When type is kAnimEaseInEaseOut: Determines how much the curve should ease-in and how much it should ease-out. Should be a value from 0.0 to 1.0. Examples of potential bias values and what they would represent: 0.0: ease-in but no ease out (a.k.a. "fly-out"). 0.3: ease-in more slowly and ease-out more quickly (i.e. less responsive). 0.5: symmetrical curve: equal ease-in and ease-out. 0.7: ease-out more slowly and ease-in more quickly (i.e. more reponsive). 1.0: ease-out but no ease in (a.k.a. "fly-in").
When type is kAnimSpring: Determines how much the amplitude is dampened every oscillation. Some examples, 0.5: each peak is half the amplitude of the previous peak. 1.0: each peak has the same amplitude. Oscillates forever. 1.2: each peak is 20% larger than the previous peak. Grows forever.
AnimType flatui::AnimCurveDescription::type |
The overall shape of the motion curve. This value determines the meaning of the variables below.
float flatui::AnimCurveDescription::typical_delta_distance |
The amount the animated value would change in a common or worst-case situation. Used together with typical_total_time below to describe the "typical" curve.
The "typical" curve allows you to parameterize the motion in an intuitive way. You provide the distance and time required to travel a common or worst-case situation, and the curve's mathematical parameters are calculated from that situation. This is much easier, for example, than specifying the second derivatives explicitly.
float flatui::AnimCurveDescription::typical_total_time |
The time required for the value to travel typical_delta_distance, assuming it started at a velocity of zero. See typical_delta_distance for further details on the "typical" curve.