timer_interval
Timer looping over a time interval [t_min, t_max] (periodic animations).
Derives from: timer_basic
Fields and methods
Members of the struct timer_interval. Most of what you do with a CGP type goes through the free functions listed below.
Fields
float t_min | Lower bound of the interval in which t loops, 0 by default. |
float t_max | Upper bound (excluded) of the interval in which t loops, 1 by default. |
Methods
| Builds a running timer whose time t starts at t_min and loops in [t_min, t_max) (asserts t_max > t_min). src | |
| Advances t as timer_basic::update() and wraps it back into [t_min, t_max), returning the time step; a step longer than t_max - t_min is discarded (t unchanged) and 0 is returned. src |
Inherited from timer_basic (4 members)
Fields
float t | Accumulated time in seconds, multiplied by scale, 0 until the second update(). |
float scale | Multiplier applied to the elapsed real time (1 by default; larger values accelerate the animation). |
Functions taking a timer_interval
None.
Functions returning a timer_interval
None.
Operators
None.