Owns one independent sky clock, weather transition and integrated cloud travel. 更多...
#include <SkyTimeline.h>
Public 成员函数 | |
| Result< void > | advance (Duration duration) |
| Advance by a nonnegative injected simulation duration, rejecting overflow. | |
| Result< void > | transitionTo (const SkyWeather &target, Duration duration) |
| Start a linear weather transition from the current sampled weather. | |
| SkyFrame | frame () const noexcept |
| Copy the authoritative evaluated state; no provider pointers escape. | |
静态 Public 成员函数 | |
| static Result< SkyTimeline > | create (const SkyClock &clock, const SkyWeather &weather) |
| Construct validated state. Clock hours are [0,24), speed [0,24] hours/second. | |
详细描述
Owns one independent sky clock, weather transition and integrated cloud travel.
This is a value-owned simulation, not an ECS System or global singleton. The caller injects elapsed time; no wall clock or random source is consulted. Equal commands at equal simulation times produce equal results to double-precision rounding; tests allow 1e-9 at ordinary scene durations. No bitwise cross-platform claim. Values are runtime-only; this class does not define a persistent file format. @thread One simulation thread owns mutations. Copy frame() for render consumers. @reentrancy No callbacks, services, locks or borrowed objects are retained.
在文件 SkyTimeline.h 第 42 行定义.
成员函数说明
◆ advance()
Advance by a nonnegative injected simulation duration, rejecting overflow.
- 返回
- Success, or InvalidArgument leaving the previous state unchanged.
在文件 SkyTimeline.cpp 第 29 行定义.
引用了 duration.
◆ create()
|
static |
Construct validated state. Clock hours are [0,24), speed [0,24] hours/second.
- 返回
- Owning timeline, or InvalidArgument without publishing any state.
在文件 SkyTimeline.cpp 第 22 行定义.
引用了 eve::daynight::SkyClock::hoursPerSecond , 以及 eve::daynight::SkyClock::initialHour.
被这些函数引用 eve::daynight::SkyProfile::decode() , 以及 eve::daynight::SkyRuntime::prepare().
◆ frame()
|
noexcept |
Copy the authoritative evaluated state; no provider pointers escape.
在文件 SkyTimeline.cpp 第 49 行定义.
引用了 a, b, eve::daynight::SkyWeather::cloudCoverage, eve::daynight::SkyFrame::cloudTravelXZ, duration, eve::daynight::SkyFrame::elapsedSeconds, eve::daynight::SkyWeather::fog, eve::daynight::SkyFrame::hour, eve::daynight::SkyWeather::rain, eve::daynight::SkyWeather::snow, eve::daynight::SkyFrame::weather , 以及 eve::daynight::SkyWeather::windXZ.
◆ transitionTo()
| Result< void > eve::daynight::SkyTimeline::transitionTo | ( | const SkyWeather & | target, |
| Duration | duration | ||
| ) |
Start a linear weather transition from the current sampled weather.
- 参数
-
target Coverage [0,10], fog/rain/snow [0,1], each wind axis [-1000,1000]. duration Nonnegative simulation duration; zero applies immediately without moving clouds.
- 返回
- Success, or InvalidArgument without changing the active transition.
在文件 SkyTimeline.cpp 第 37 行定义.
该类的文档由以下文件生成:
- src/modules/daynight/sky/SkyTimeline.h
- src/modules/daynight/sky/SkyTimeline.cpp