载入中...
搜索中...
未找到
SkyRuntime.h
浏览该文件的文档.
1#pragma once
2#include <array>
3#include <memory>
4#include "common/Export.h"
6
7namespace eve::graphics {
8class Graphics;
9struct SkyAtmosphereParameters;
10struct SkyWispsLayer;
11} // namespace eve::graphics
12namespace eve::daynight {
16 double phase = 0, speed = 0, timeScale = 1, windMultiplier = 1;
18 [[nodiscard]] EVENGINE_API_WORLD Result<void> validate() const;
19};
32 double cloudTime = 0;
33 float wispsMorphPhase = 0;
34 std::array<double, 3> sunDirection{};
35 std::array<float, 3> sunIrradiance{};
36};
47public:
52 [[nodiscard]] static Result<std::unique_ptr<SkyRuntime>> prepare(
54 const graphics::SkyAtmosphereParameters& atmosphere, const graphics::SkyWispsLayer* wisps = nullptr);
56 SkyRuntime(const SkyRuntime&) = delete;
57 SkyRuntime& operator=(const SkyRuntime&) = delete;
60 [[nodiscard]] Result<void> advance(Duration duration);
62 [[nodiscard]] Result<void> transitionTo(const SkyWeather& target, Duration duration);
64 [[nodiscard]] SkyRuntimeFrame frame() const noexcept;
66 [[nodiscard]] Result<void> attach();
68 void detach() noexcept;
69
70private:
71 SkyRuntime();
72 struct Impl;
73 std::unique_ptr<Impl> impl_;
74};
75} // namespace eve::daynight
LogicalId target
float duration
#define EVENGINE_API_WORLD
Definition Export.h:109
TerrainThermalSettings settings
Signed, fixed-resolution simulation duration in nanoseconds.
Definition Time.h:43
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Owns independent sky simulation and its prepared atmospheric contributor.
Definition SkyRuntime.h:46
SkyRuntime & operator=(const SkyRuntime &)=delete
SkyRuntime(const SkyRuntime &)=delete
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Runtime clock configuration, independent of the legacy DayNight module.
Definition SkyTimeline.h:19
Source cloud-time controls; phase is additive, speed is source time per injected second.
Definition SkyRuntime.h:15
EVENGINE_API_WORLD Result< void > validate() const
Reject nonfinite values, phase outside +/-1e6 and multipliers outside [0,1000].
Copied sky simulation state shared by main-view and reflection consumers.
Definition SkyTimeline.h:25
Copied simulation and evaluated solar lighting used by every view.
Definition SkyRuntime.h:30
std::array< double, 3 > sunDirection
Definition SkyRuntime.h:34
std::array< float, 3 > sunIrradiance
Definition SkyRuntime.h:35
Independent runtime settings; not a serialized profile or a legacy DayNight override.
Definition SkyRuntime.h:21
std::array< float, 3 > sunIrradiance
Definition SkyRuntime.h:27
Independent sky weather values; distances are metres and wind is metres/second.
Definition SkyTimeline.h:10
Spherical atmospheric coefficients in inverse kilometres and kilometre heights.
Borrowed authored thin-cloud layer, consumed synchronously by sky preparation.