载入中...
搜索中...
未找到
eve::daynight::SkyTimeline类 参考

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()

Result< void > eve::daynight::SkyTimeline::advance ( Duration  duration)

Advance by a nonnegative injected simulation duration, rejecting overflow.

返回
Success, or InvalidArgument leaving the previous state unchanged.

在文件 SkyTimeline.cpp 第 29 行定义.

引用了 duration.

◆ create()

Result< SkyTimeline > eve::daynight::SkyTimeline::create ( const SkyClock &  clock,
const SkyWeather &  weather 
)
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()

◆ transitionTo()

Result< void > eve::daynight::SkyTimeline::transitionTo ( const SkyWeather &  target,
Duration  duration 
)

Start a linear weather transition from the current sampled weather.

参数
targetCoverage [0,10], fog/rain/snow [0,1], each wind axis [-1000,1000].
durationNonnegative simulation duration; zero applies immediately without moving clouds.
返回
Success, or InvalidArgument without changing the active transition.

在文件 SkyTimeline.cpp 第 37 行定义.

引用了 current, duration , 以及 target.


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