group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HudTweenPool Class Reference

Fixed-size tween pool. No heap allocations. More...

#include <HudTween.hpp>

Collaboration diagram for HudTweenPool:
[legend]

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

HudTweenEntryfindSlot (float *target)
 Find an existing tween on target, or the first free slot.

Private Attributes

HudTweenEntry entries_ [k_maxTweens] = {}

Detailed Description

Fixed-size tween pool. No heap allocations.

Member Function Documentation

◆ cancel()

void HudTweenPool::cancel ( float * target)

Cancel any active tween targeting target.

Here is the caller graph for this function:

◆ findSlot()

HudTweenEntry * HudTweenPool::findSlot ( float * target)
private

Find an existing tween on target, or the first free slot.

Here is the caller graph for this function:

◆ tween() [1/2]

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.

Here is the call graph for this function:

◆ tween() [2/2]

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void HudTweenPool::update ( float dt)

Tick all active tweens by dt seconds.

Member Data Documentation

◆ entries_

HudTweenEntry HudTweenPool::entries_[k_maxTweens] = {}
private

◆ k_maxTweens

int HudTweenPool::k_maxTweens = 64
staticconstexpr

The documentation for this class was generated from the following files: