![]() |
Plasma Engine
2.0
|
Helper class to schedule work in intervals typically larger than the duration of one frame. More...
#include <IntervalScheduler.h>
Protected Member Functions | |
plIntervalSchedulerBase (plTime minInterval, plTime maxInterval) | |
plUInt32 | GetHistogramIndex (plTime value) |
plTime | GetHistogramSlotValue (plUInt32 uiIndex) |
Static Protected Member Functions | |
static float | GetRandomZeroToOne (int pos, plUInt32 &seed) |
static plTime | GetRandomTimeJitter (int pos, plUInt32 &seed) |
Protected Attributes | |
plTime | m_MinInterval |
plTime | m_MaxInterval |
double | m_fInvIntervalRange |
plTime | m_CurrentTime |
plUInt32 | m_uiSeed = 0 |
plUInt32 | m_Histogram [HistogramSize] = {} |
plTime | m_HistogramSlotValues [HistogramSize] = {} |
Static Protected Attributes | |
static constexpr plUInt32 | HistogramSize = 32 |
Helper class to schedule work in intervals typically larger than the duration of one frame.
Tries to maintain an even workload per frame and also keep the given interval for a work as best as possible. A typical use case would be e.g. component update functions that don't need to be called every frame.