载入中...
搜索中...
未找到
Weather.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Module.h"
4
5#include <string>
6
7namespace eve::graphics {
8class Graphics;
9}
10
11namespace eve::weather {
12
31class Weather : public Module {
32public:
34
35 Weather();
36 ~Weather() override;
37
39 void init(graphics::Graphics *gfx);
41 void update(float dt, graphics::Graphics *gfx);
42
43 // ---- presets ----
44 void setPreset(const std::string &name);
45 std::string getPreset() const;
46 static const char *const kPresetNames[];
47 static const int kPresetCount;
48
49 // ---- precipitation / wind ----
50 void setIntensity(float v);
51 float getIntensity() const;
52 void setWindSpeed(float v);
53 float getWindSpeed() const;
55 void setWindDirection(float degrees);
56 float getWindDirection() const;
57
58 // ---- lightning ----
59 void setLightningEnabled(bool on);
60 bool isLightningEnabled() const;
62 void strike();
64 float getFlash() const;
65
66 // ---- mood (sky / fog), read by the example to tint the scene ----
67 void setSkyColor(float r, float g, float b);
68 float getSkyColorR() const;
69 float getSkyColorG() const;
70 float getSkyColorB() const;
71 void setSunIntensity(float v);
72 float getSunIntensity() const;
73 void setFogColor(float r, float g, float b);
74 float getFogColorR() const;
75 float getFogColorG() const;
76 float getFogColorB() const;
77 void setFogDensity(float v);
78 float getFogDensity() const;
79
81 float getAmbientBrightness() const;
82
83private:
84 struct Impl;
85 Impl *impl_ = nullptr;
86};
87
88} // namespace eve::weather
float degrees
Definition CardTypes.cpp:33
uint32_t b
const char * name
Definition RockMesh.cpp:21
int v
Weather module — real-time precipitation / lightning / wind system.
Definition Weather.h:31
static const char *const kPresetNames[]
Definition Weather.h:46
void setSunIntensity(float v)
Definition Weather.cpp:448
float getFogColorB() const
Definition Weather.cpp:456
static const int kPresetCount
Definition Weather.h:47
float getFogDensity() const
Definition Weather.cpp:459
void setWindSpeed(float v)
Definition Weather.cpp:420
void init(graphics::Graphics *gfx)
Idempotent; builds meshes/shaders on first call.
Definition Weather.cpp:323
void setLightningEnabled(bool on)
Definition Weather.cpp:426
void setIntensity(float v)
Definition Weather.cpp:415
float getFogColorG() const
Definition Weather.cpp:455
void strike()
Force a bolt strike this frame (useful for manual testing).
Definition Weather.cpp:429
void setSkyColor(float r, float g, float b)
Definition Weather.cpp:441
float getWindDirection() const
Definition Weather.cpp:424
void setFogDensity(float v)
Definition Weather.cpp:458
std::string getPreset() const
Definition Weather.cpp:413
float getFogColorR() const
Definition Weather.cpp:454
float getSunIntensity() const
Definition Weather.cpp:449
float getSkyColorG() const
Definition Weather.cpp:445
float getSkyColorB() const
Definition Weather.cpp:446
void setPreset(const std::string &name)
Definition Weather.cpp:404
bool isLightningEnabled() const
Definition Weather.cpp:427
float getWindSpeed() const
Definition Weather.cpp:421
float getFlash() const
How bright the current flash is (0..1), sampled by the scene for a key light.
Definition Weather.cpp:439
float getAmbientBrightness() const
Ambient multiplier that the example should feed into camera.setAmbient().
Definition Weather.cpp:461
void update(float dt, graphics::Graphics *gfx)
Advance sim + push per-frame uniforms; must run before gfx.render3D().
Definition Weather.cpp:469
void setFogColor(float r, float g, float b)
Definition Weather.cpp:451
float getIntensity() const
Definition Weather.cpp:418
void setWindDirection(float degrees)
Wind direction in degrees; 0 = toward +Z, 90 = toward -X.
Definition Weather.cpp:423
float getSkyColorR() const
Definition Weather.cpp:444
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6