命名空间 | |
| namespace | shaders |
类 | |
| class | Lightning |
| Independently owned, pooled visual effect; main/render thread only, no callbacks or gameplay damage. Graphics resources and an internal generation-checked render entity are retired in either destruction order. Endpoint positions are copied; no weapon pointer is retained. Recreate after reload/provider retirement. 更多... | |
| struct | LightningGeometry |
| Owned CPU crossed ribbons along local +Y in [0,1]; no graphics dependency. 更多... | |
| struct | LightningSettings |
| Copied preparation settings. Width and displacement are world units, independent of endpoint distance. 更多... | |
| class | PcgInteriorWeatherVolume |
| Caller-owned, immutable-after-configuration Pcg interior-weather volume. @ownership This value owns all configuration; Weather copies sampled state and never retains this object. @thread Affine to the caller; configure and sample must not overlap. @reentrancy Does not invoke callbacks. 更多... | |
| class | Snow |
| Interactive snow service owned by the weather module. 更多... | |
| class | SnowField |
| Interactive snow depth field: a dense [0,1] float grid. 更多... | |
| struct | ThunderStrikeReceipt |
| Deterministic strike command consumed by scene, light and audio providers. 更多... | |
| struct | ThunderStrikeSettings |
| Pcg ThunderStrike parameters independent of renderer and audio providers. 更多... | |
| struct | ThunderStrikeState |
| Caller-owned thunder flash state. 更多... | |
| class | Weather |
| Weather module — real-time precipitation / lightning / wind system. 更多... | |
枚举 | |
| enum class | PcgInteriorWeatherShape { Box = 0 , Sphere = 1 } |
| Shape used by Pcg's interior-weather containment test. 更多... | |
| enum class | PcgInteriorWeatherMode { Collision = 0 , DisableVfx = 1 } |
| Interior precipitation policy mirrored from Pcg. 更多... | |
| enum class | PcgInteriorWeatherTransition { Unchanged = 0 , Entered = 1 , Exited = 2 } |
| Observable transition produced by an interior-volume sample. 更多... | |
函数 | |
| EVENGINE_API_ORCHESTRATION Result< void > | validateLightning (const LightningSettings &settings) |
| Validate bounded finite settings without modifying live instances. | |
| EVENGINE_API_ORCHESTRATION Result< LightningGeometry > | buildLightningGeometry (const LightningSettings &settings, unsigned variant) |
| Deterministic CPU preparation, explicit variant stream; identical inputs give identical geometry on one platform. @cost Linear in 2^subdivisions plus branch count; prepare once per pooled variant, never per frame. | |
| EVENGINE_API_ORCHESTRATION float | lightningEnvelope (float age) |
| Weather return-stroke envelope, normalized age [0,1]; side-effect free. | |
| void | exposeLightning (ssq::Table &table, ssq::Class &weather) |
| Register preparation/settings and owned Lightning methods on Weather. | |
| Module_IMPL (Snow, new Snow()) | |
| void | applySnowToHeightmap (const SnowField &field, const procgen::Heightmap &terrain, procgen::Heightmap &out, float heightScale) |
| out(x, y) = terrain(x, y) + field(x, y) * heightScale. | |
| Result< ThunderStrikeReceipt > | triggerThunderStrike (ThunderStrikeState &state, const ThunderStrikeSettings &settings, float playerX, float playerY, float playerZ, std::uint32_t seed) |
| Start a Pcg-style strike around the supplied player position. | |
| Result< void > | advanceThunderStrike (ThunderStrikeState &state, float dt) |
| Apply Pcg's clamped Lerp(intensity,0,dt*2) decay and 0.15 stop threshold. | |
| Module_IMPL (Weather, new Weather()) | |
枚举类型说明
◆ PcgInteriorWeatherMode
|
strong |
Interior precipitation policy mirrored from Pcg.
| 枚举值 | |
|---|---|
| Collision | |
| DisableVfx | |
在文件 PcgInteriorWeatherVolume.h 第 11 行定义.
◆ PcgInteriorWeatherShape
|
strong |
Shape used by Pcg's interior-weather containment test.
| 枚举值 | |
|---|---|
| Box | |
| Sphere | |
在文件 PcgInteriorWeatherVolume.h 第 8 行定义.
◆ PcgInteriorWeatherTransition
|
strong |
Observable transition produced by an interior-volume sample.
| 枚举值 | |
|---|---|
| Unchanged | |
| Entered | |
| Exited | |
在文件 PcgInteriorWeatherVolume.h 第 14 行定义.
函数说明
◆ advanceThunderStrike()
| EVENGINE_API_ORCHESTRATION Result< void > eve::weather::advanceThunderStrike | ( | ThunderStrikeState & | state, |
| float | dt | ||
| ) |
Apply Pcg's clamped Lerp(intensity,0,dt*2) decay and 0.15 stop threshold.
在文件 ThunderStrike.cpp 第 35 行定义.
引用了 dt, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, state , 以及 eve::Result< T >::success().
◆ applySnowToHeightmap()
| EVENGINE_API_ORCHESTRATION void eve::weather::applySnowToHeightmap | ( | const SnowField & | field, |
| const procgen::Heightmap & | terrain, | ||
| procgen::Heightmap & | out, | ||
| float | heightScale | ||
| ) |
out(x, y) = terrain(x, y) + field(x, y) * heightScale.
Combines the base terrain heightmap with the snow depth layer, producing the final displaced surface used for mesh rebuilds. out is resized to match terrain; values are not clamped (the terrain mesh scales them).
◆ buildLightningGeometry()
| Result< LightningGeometry > eve::weather::buildLightningGeometry | ( | const LightningSettings & | settings, |
| unsigned | variant | ||
| ) |
Deterministic CPU preparation, explicit variant stream; identical inputs give identical geometry on one platform. @cost Linear in 2^subdivisions plus branch count; prepare once per pooled variant, never per frame.
在文件 LightningGeometry.cpp 第 23 行定义.
引用了 a, b, c, displacement, eve::Result< T >::failure(), g, level, main(), p, path, paths, point, random, s, eve::Result< T >::success(), t, valid, validateLightning(), variant , 以及 w.
被这些函数引用 eve::weather::Weather::init() , 以及 eve::weather::Lightning::prepare().
◆ exposeLightning()
| void eve::weather::exposeLightning | ( | ssq::Table & | table, |
| ssq::Class & | weather | ||
| ) |
Register preparation/settings and owned Lightning methods on Weather.
在文件 LightningBindings.cpp 第 9 行定义.
引用了 eve::weather::Lightning::amplitude(), b, eve::weather::LightningSettings::branches, cls, eve::weather::LightningSettings::displacement, dt, eve::weather::LightningSettings::duration, eve::Diagnostic::error(), eve::Status::failure(), g, eve::InvalidArgument, eve::script::makeOwnedSquirrelInstance(), owned, eve::weather::Lightning::prepare(), eve::script::projectResult(), eve::script::projectStatusResult(), r, s, eve::weather::LightningSettings::seed, settings, eve::weather::Lightning::stop(), eve::weather::LightningSettings::subdivisions, eve::Status::success(), eve::weather::LightningSettings::variants, vm , 以及 eve::weather::LightningSettings::width.
◆ lightningEnvelope()
| float eve::weather::lightningEnvelope | ( | float | age | ) |
Weather return-stroke envelope, normalized age [0,1]; side-effect free.
在文件 LightningGeometry.cpp 第 15 行定义.
引用了 t.
被这些函数引用 eve::weather::Lightning::update() , 以及 eve::weather::Weather::update().
◆ Module_IMPL() [1/2]
| eve::weather::Module_IMPL | ( | Snow | , |
| new | Snow() | ||
| ) |
◆ Module_IMPL() [2/2]
| eve::weather::Module_IMPL | ( | Weather | , |
| new | Weather() | ||
| ) |
◆ triggerThunderStrike()
| EVENGINE_API_ORCHESTRATION Result< ThunderStrikeReceipt > eve::weather::triggerThunderStrike | ( | ThunderStrikeState & | state, |
| const ThunderStrikeSettings & | settings, | ||
| float | playerX, | ||
| float | playerY, | ||
| float | playerZ, | ||
| std::uint32_t | seed | ||
| ) |
Start a Pcg-style strike around the supplied player position.
- 参数
-
state Caller-owned state; an active strike returns Conflict without mutation. settings Finite non-negative light/audio parameters and available clip count. playerX Player world position. playerY Player world position. playerZ Player world position. seed Explicit seed for the named thunder-strike RNG stream.
- 返回
- Position/light/audio command. Pcg deliberately excludes audio clip zero when two or more clips exist.
在文件 ThunderStrike.cpp 第 13 行定义.
引用了 eve::weather::ThunderStrikeReceipt::audioClipIndex, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::weather::ThunderStrikeReceipt::intensity, eve::InvalidArgument, px, py, pz, eve::weather::ThunderStrikeReceipt::radius, range, seed, settings, state, eve::Result< T >::success(), unit, eve::weather::ThunderStrikeReceipt::volume, eve::weather::ThunderStrikeReceipt::x, eve::weather::ThunderStrikeReceipt::y , 以及 eve::weather::ThunderStrikeReceipt::z.
◆ validateLightning()
| Result< void > eve::weather::validateLightning | ( | const LightningSettings & | settings | ) |
Validate bounded finite settings without modifying live instances.
在文件 LightningGeometry.cpp 第 6 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, s , 以及 eve::Result< T >::success().
被这些函数引用 buildLightningGeometry() , 以及 eve::weather::Lightning::prepare().