|
group2 0.1.0
CSE 125 Group 2
|
Fixed-size tween pool. No heap allocations. More...
#include <HudTween.hpp>
Public Member Functions | |
| void | tween (float *target, float to, float duration, HudEaseFn ease=easeOutQuad) |
| Start or replace a tween on target from its current value to to. | |
| void | tween (float *target, float from, float to, float duration, HudEaseFn ease=easeOutQuad) |
| Start or replace a tween on target from from to to. | |
| void | cancel (float *target) |
| Cancel any active tween targeting target. | |
| void | update (float dt) |
| Tick all active tweens by dt seconds. | |
Static Public Attributes | |
| static constexpr int | k_maxTweens = 64 |
Private Member Functions | |
| HudTweenEntry * | findSlot (float *target) |
| Find an existing tween on target, or the first free slot. | |
Private Attributes | |
| HudTweenEntry | entries_ [k_maxTweens] = {} |
Fixed-size tween pool. No heap allocations.
| void HudTweenPool::cancel | ( | float * | target | ) |
Cancel any active tween targeting target.
|
private |
Find an existing tween on target, or the first free slot.
| void HudTweenPool::tween | ( | float * | target, |
| float | from, | ||
| float | to, | ||
| float | duration, | ||
| HudEaseFn | ease = easeOutQuad ) |
Start or replace a tween on target from from to to.
| void HudTweenPool::tween | ( | float * | target, |
| float | to, | ||
| float | duration, | ||
| HudEaseFn | ease = easeOutQuad ) |
Start or replace a tween on target from its current value to to.
| void HudTweenPool::update | ( | float | dt | ) |
Tick all active tweens by dt seconds.
|
private |
|
staticconstexpr |