载入中...
搜索中...
未找到
eve::procgen::PcgFrameRateManager类 参考

Caller-owned deterministic Pcg frame-rate sampling and quality policy. 更多...

#include <PcgFrameRateManager.h>

Public 成员函数

Result< void > configure (int target, float interval, int minimum, int maximum, int current)
 Configure target, check interval, inclusive quality range, and initial level atomically.
 
Result< int > update (float dt, float timeScale)
 Add one rendered frame from caller-provided timing and return the selected level.
 
void setAutomatic (bool v) noexcept
 Enable or disable automatic changes.
 
bool getAutomatic () const noexcept
 Return whether automatic changes are enabled.
 
Result< void > selectManualQuality (int q)
 Select a level and disable automatic changes.
 
int getQuality () const noexcept
 Return current quality.
 
float getFps () const noexcept
 Return last completed half-second FPS sample.
 
bool getQualityChanged () const noexcept
 Return whether the last operation changed quality.
 
PcgTerrainQualityPreset getPreset () const
 Copy the current Pcg terrain preset.
 

详细描述

Caller-owned deterministic Pcg frame-rate sampling and quality policy.

在文件 PcgFrameRateManager.h 第 13 行定义.

成员函数说明

◆ configure()

Result< void > eve::procgen::PcgFrameRateManager::configure ( int  target,
float  interval,
int  minimum,
int  maximum,
int  current 
)

Configure target, check interval, inclusive quality range, and initial level atomically.

在文件 PcgFrameRateManager.cpp 第 11 行定义.

引用了 current, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, maximum, minimum, eve::Result< T >::success() , 以及 target.

◆ getAutomatic()

bool eve::procgen::PcgFrameRateManager::getAutomatic ( ) const
inlinenoexcept

Return whether automatic changes are enabled.

在文件 PcgFrameRateManager.h 第 20 行定义.

◆ getFps()

float eve::procgen::PcgFrameRateManager::getFps ( ) const
inlinenoexcept

Return last completed half-second FPS sample.

在文件 PcgFrameRateManager.h 第 23 行定义.

◆ getPreset()

PcgTerrainQualityPreset eve::procgen::PcgFrameRateManager::getPreset ( ) const

Copy the current Pcg terrain preset.

在文件 PcgFrameRateManager.cpp 第 20 行定义.

被这些函数引用 eve::procgen::exposePcgFrameRateManagerBindings().

◆ getQuality()

int eve::procgen::PcgFrameRateManager::getQuality ( ) const
inlinenoexcept

Return current quality.

在文件 PcgFrameRateManager.h 第 22 行定义.

◆ getQualityChanged()

bool eve::procgen::PcgFrameRateManager::getQualityChanged ( ) const
inlinenoexcept

Return whether the last operation changed quality.

在文件 PcgFrameRateManager.h 第 24 行定义.

◆ selectManualQuality()

Result< void > eve::procgen::PcgFrameRateManager::selectManualQuality ( int  q)

Select a level and disable automatic changes.

在文件 PcgFrameRateManager.cpp 第 19 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, q , 以及 eve::Result< T >::success().

◆ setAutomatic()

void eve::procgen::PcgFrameRateManager::setAutomatic ( bool  v)
inlinenoexcept

Enable or disable automatic changes.

在文件 PcgFrameRateManager.h 第 19 行定义.

◆ update()

Result< int > eve::procgen::PcgFrameRateManager::update ( float  dt,
float  timeScale 
)

Add one rendered frame from caller-provided timing and return the selected level.

在文件 PcgFrameRateManager.cpp 第 14 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, scale , 以及 eve::Result< T >::success().


该类的文档由以下文件生成: