载入中...
搜索中...
未找到
Weather.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Module.h"
7#include "common/Result.h"
9
10#include <string>
11
12namespace eve::graphics {
13class Graphics;
14}
15
16namespace eve::weather {
17
37public:
39
41 Weather();
43 ~Weather() override;
44
46 void init(graphics::Graphics *gfx);
48 void update(float dt, graphics::Graphics *gfx);
49
50 // ---- presets ----
52 void setPreset(const std::string &name);
54 std::string getPreset() const;
55 static const char *const kPresetNames[];
56 static const int kPresetCount;
57
59 PhotoModeFieldAcceptance acceptsPhotoModeField(const PhotoModeAssignment& assignment) const noexcept override;
61 [[nodiscard]] Result<void> applyPhotoModeField(const PhotoModeAssignment& assignment) override;
63 bool getPcgWeatherEnabled() const;
65 bool getPcgRainEnabled() const;
67 bool getPcgSnowEnabled() const;
69 bool getPcgWindOverride() const;
70 // ---- precipitation / wind ----
72 void setIntensity(float v);
74 float getIntensity() const;
76 void setWindSpeed(float v);
78 float getWindSpeed() const;
80 void setWindDirection(float degrees);
82 float getWindDirection() const;
84 [[nodiscard]] Result<void> setSnowWind(float x,float y,float z);
86 void clearSnowWind();
88 bool hasSnowWind() const;
90 float getSnowWindX() const;
92 float getSnowWindY() const;
94 float getSnowWindZ() const;
95
97 [[nodiscard]] Result<PcgInteriorWeatherTransition> applyInteriorVolume(
98 const PcgInteriorWeatherVolume& volume, float x, float y, float z);
100 [[nodiscard]] Result<PcgInteriorWeatherTransition> setInteriorVolumeState(
103 void clearInteriorWeather();
105 bool isInsideInteriorWeather() const;
107 bool isInteriorWeatherCollisionRequested() const;
109 int getCurrentWeatherReverbPreset() const;
110
111 // ---- lightning ----
113 void setLightningEnabled(bool on);
115 bool isLightningEnabled() const;
117 void strike();
119 float getFlash() const;
120
121 // ---- mood (sky / fog), read by the example to tint the scene ----
123 void setSkyColor(float r, float g, float b);
125 float getSkyColorR() const;
127 float getSkyColorG() const;
129 float getSkyColorB() const;
131 void setSunIntensity(float v);
133 float getSunIntensity() const;
135 void setFogColor(float r, float g, float b);
137 float getFogColorR() const;
139 float getFogColorG() const;
141 float getFogColorB() const;
143 void setFogDensity(float v);
145 float getFogDensity() const;
146
153 void setEnvironmentEnabled(bool enabled);
155 bool isEnvironmentEnabled() const;
156
158 float getAmbientBrightness() const;
159
160private:
161 struct Impl;
162 Impl *impl_ = nullptr;
163};
164
165} // namespace eve::weather
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
double volume
float degrees
Definition CardTypes.cpp:35
#define EVENGINE_API_ORCHESTRATION
Definition Export.h:111
tensor::Graph g
Definition GpuGraph.cpp:7
double r
float v
std::string name
MeleePoint3 b
Definition MeleeHit.cpp:41
Move-only, checked operation results for the common layer.
std::vector< char > inside
IPhotoModeFieldSink public API.
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Caller-owned, immutable-after-configuration Pcg interior-weather volume. @ownership This value owns a...
Weather module — real-time precipitation / lightning / wind system.
Definition Weather.h:36
static const int kPresetCount
Definition Weather.h:56
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
PhotoModeFieldAcceptance
Capability implemented by the composition root that routes assignments to domain owners.
bool enabled
One reversible field assignment in a photo-mode transaction.