载入中...
搜索中...
未找到
PcgFrameRateManager.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Result.h"
5namespace ssq { class Table; }
6namespace eve::procgen {
14public:
16 [[nodiscard]] Result<void> configure(int target,float interval,int minimum,int maximum,int current);
18 [[nodiscard]] Result<int> update(float dt,float timeScale);
void setAutomatic(bool v) noexcept { automatic_=v; } bool getAutomatic()const noexcept{return automatic_;} [[nodiscard]] Result<void> selectManualQuality(int q); int getQuality()const noexcept{return quality_;} float getFps()const noexcept{return fps_;} bool getQualityChanged()const noexcept{return changed_;} PcgTerrainQualityPreset getPreset()const;
26private:
27 int target_=60,min_=0,max_=5,quality_=0,frames_=0; float interval_=10,left_=10,fpsLeft_=.5f,accum_=0,fps_=0; bool automatic_=true,changed_=false;
28};
EVENGINE_API_DOMAINS void exposePcgFrameRateManagerBindings(
30 ssq::Table& table);
31} // namespace eve::procgen
LogicalId target
#define EVENGINE_API_DOMAINS
Definition Export.h:110
float maximum[3]
float minimum[3]
std::array< double, 10 > q
float v
Move-only, checked operation results for the common layer.
double current
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Caller-owned deterministic Pcg frame-rate sampling and quality policy.
void exposePcgFrameRateManagerBindings(ssq::Table &t)
Register Pcg frame-rate manager bindings.
enum EVENGINE_API_FOUNDATION Table
OT_TABLE (editable via Runtime table APIs / ReflectedPropertyModel).
Definition Runtime.h:121
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:14
Terrain quality values selected by Pcg's six-level frame-rate manager.