Owns independent sky simulation and its prepared atmospheric contributor. 更多...
#include <SkyRuntime.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ~SkyRuntime () | |
| SkyRuntime (const SkyRuntime &)=delete | |
| SkyRuntime & | operator= (const SkyRuntime &)=delete |
| Result< void > | advance (Duration duration) |
| Advance one simulation clock and atomically publish solar lighting/cloud phase; invalid time preserves all. | |
| Result< void > | transitionTo (const SkyWeather &target, Duration duration) |
| Start a validated weather transition without advancing simulation time. | |
| SkyRuntimeFrame | frame () const noexcept |
| Copy current simulation and solar lighting without advancing either. | |
| Result< void > | attach () |
| Attach the prepared main-view and reflection contributors, idempotently. | |
| void | detach () noexcept |
| Unregister both contributors; simulation and prepared resources remain owned. | |
静态 Public 成员函数 | |
| static Result< std::unique_ptr< SkyRuntime > > | prepare (graphics::Graphics &graphics, const SkyRuntimeSettings &settings, const graphics::SkyAtmosphereParameters &atmosphere, const graphics::SkyWispsLayer *wisps=nullptr) |
| Validate settings and prepare all atmospheric resources before publication. | |
详细描述
Owns independent sky simulation and its prepared atmospheric contributor.
Exactly one timeline advances from caller-injected time. All render views consume the resulting lighting and authored wisps morph phase without advancing simulation. Weather transitions are simulated; volumetric clouds, weather-driven fog and precipitation are not yet rendered. No legacy DayNight state or scene light is changed. @thread Graphics thread, outside contributor dispatch, including destruction. @lifetime Owns all state and the render pass; provider-first retirement is detected through its weak lifetime token, and pass-first destruction unregisters contributors. @reentrancy No script callbacks, locks or retained caller configuration pointers.
在文件 SkyRuntime.h 第 46 行定义.
构造及析构函数说明
◆ ~SkyRuntime()
|
default |
◆ SkyRuntime()
|
delete |
成员函数说明
◆ advance()
Advance one simulation clock and atomically publish solar lighting/cloud phase; invalid time preserves all.
在文件 SkyRuntime.cpp 第 108 行定义.
引用了 duration, eve::Result< T >::failure(), light, retired , 以及 eve::Result< T >::success().
◆ attach()
| Result< void > eve::daynight::SkyRuntime::attach | ( | ) |
Attach the prepared main-view and reflection contributors, idempotently.
在文件 SkyRuntime.cpp 第 140 行定义.
引用了 eve::Result< T >::failure() , 以及 retired.
◆ detach()
|
noexcept |
Unregister both contributors; simulation and prepared resources remain owned.
在文件 SkyRuntime.cpp 第 144 行定义.
◆ frame()
|
noexcept |
Copy current simulation and solar lighting without advancing either.
在文件 SkyRuntime.cpp 第 129 行定义.
引用了 eve::daynight::SkyRuntimeFrame::cloudTime, eve::daynight::SkyRuntimeFrame::simulation, eve::daynight::SkyRuntimeFrame::sunDirection, eve::daynight::SkyRuntimeFrame::sunIrradiance , 以及 eve::daynight::SkyRuntimeFrame::wispsMorphPhase.
◆ operator=()
|
delete |
◆ prepare()
|
static |
Validate settings and prepare all atmospheric resources before publication.
- 返回
- Detached owning runtime or failure without published contributors.
- 参数
-
wisps Optional source data borrowed synchronously; GPU preparation copies it. @cost CPU LUT baking and GPU pipeline/upload work; amortize over configuration lifetime.
在文件 SkyRuntime.cpp 第 67 行定义.
引用了 eve::graphics::SkyWispsLayer::cloudTime, eve::daynight::SkyTimeline::create(), eve::daynight::SkySolarOrbit::create(), eve::Diagnostic::error(), eve::InvalidArgument, light, eve::graphics::SkyWispsLayer::morphPeriod, eve::graphics::SkyWispsLayer::morphRate, eve::graphics::SkyAtmospherePass::prepare(), eve::graphics::Graphics::resourceLifetime(), settings , 以及 value.
◆ transitionTo()
| Result< void > eve::daynight::SkyRuntime::transitionTo | ( | const SkyWeather & | target, |
| Duration | duration | ||
| ) |
Start a validated weather transition without advancing simulation time.
在文件 SkyRuntime.cpp 第 125 行定义.
引用了 duration, eve::Result< T >::failure(), retired , 以及 target.
该类的文档由以下文件生成:
- src/modules/daynight/sky/SkyRuntime.h
- src/modules/daynight/sky/SkyRuntime.cpp