Error term calculator.
More...
#include <kanzi/core.ui/main_loop/frame_time_queue.hpp>
Error term calculator.
- Since
- Kanzi 4.0.0
◆ ErrorTermCalculator() [1/4]
| kanzi::FrameTimeQueue::ErrorTermCalculator::ErrorTermCalculator |
( |
size_t | desiredFrameRate | ) |
|
|
inlineexplicit |
◆ ErrorTermCalculator() [2/4]
| kanzi::FrameTimeQueue::ErrorTermCalculator::ErrorTermCalculator |
( |
| ) |
|
|
inlineexplicit |
◆ ErrorTermCalculator() [3/4]
Default copy constructor.
◆ ErrorTermCalculator() [4/4]
Default move constructor.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ update()
| void kanzi::FrameTimeQueue::ErrorTermCalculator::update |
( |
chrono::nanoseconds | frameTime | ) |
|
Update error term calculation with given frame time.
- Parameters
-
| frameTime | Frame time found. |
◆ getErrorTerm()
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::getErrorTerm |
( |
| ) |
const |
|
inline |
Gets the frame time error term.
- Returns
- Frame time error term.
◆ getDesiredFrameRate()
| size_t kanzi::FrameTimeQueue::ErrorTermCalculator::getDesiredFrameRate |
( |
| ) |
const |
|
inline |
Gets the desired frame rate.
- Returns
- Targeted frame rate.
◆ getDesiredFrameTime()
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::getDesiredFrameTime |
( |
| ) |
const |
|
inline |
Gets the desired frame time.
- Returns
- Frame time from the targeted frame rate.
◆ m_desiredFrameRate
| size_t kanzi::FrameTimeQueue::ErrorTermCalculator::m_desiredFrameRate |
|
protected |
◆ m_desiredFrameTime
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::m_desiredFrameTime |
|
protected |
◆ m_cumulativeErrorTerm
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::m_cumulativeErrorTerm |
|
protected |
Cumulative error time within the frame time window.
This number is positive when frame times have been too long and negative when they have been too short.
◆ m_errorTerm
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::m_errorTerm |
|
protected |
Error term calculated from cumulative error.
Should be smaller than cumulative error to prevent knee-jerk reactions.
◆ m_maximumErrorIncrement
| chrono::nanoseconds kanzi::FrameTimeQueue::ErrorTermCalculator::m_maximumErrorIncrement |
|
protected |
Maximum error increment per frame.
This number is intended to prevent excessively long frames from skewing the error.
The documentation for this class was generated from the following file: