载入中...
搜索中...
未找到
Lightning.h
浏览该文件的文档.
1#pragma once
2#include <cstdint>
3#include <memory>
4#include <vector>
5#include "common/Export.h"
6#include "common/Result.h"
7namespace ssq {
8class Table;
9class Class;
10} // namespace ssq
11namespace eve::graphics {
12class Graphics;
13}
14namespace eve::weather {
17 float width = 0.08f;
18 float displacement = 0.45f;
19 float duration = 0.5f;
20 int subdivisions = 5;
21 int branches = 4;
22 int variants = 4;
23 int seed = 1;
24};
27 std::vector<float> positions, normals, uv;
28 std::vector<std::uint32_t> indices;
29};
37 const LightningSettings& settings, unsigned variant);
45public:
54 Lightning(const Lightning&) = delete;
55 Lightning& operator=(const Lightning&) = delete;
58 [[nodiscard]] Result<void> setEndpoints(float ax, float ay, float az, float bx, float by, float bz);
60 [[nodiscard]] Result<void> setColor(float r, float g, float b);
62 [[nodiscard]] Result<void> trigger();
64 [[nodiscard]] Result<void> update(float dt);
66 void stop();
68 float amplitude() const;
69
70private:
71 struct Impl;
72 explicit Lightning(std::unique_ptr<Impl> impl);
73 std::unique_ptr<Impl> impl_;
74};
76void exposeLightning(ssq::Table& table, ssq::Class& weather);
77} // namespace eve::weather
std::string variant
void * impl
#define EVENGINE_API_ORCHESTRATION
Definition Export.h:111
tensor::Graph g
Definition GpuGraph.cpp:7
double r
MeleePoint3 b
Definition MeleeHit.cpp:41
OceanWakeSettings settings
double dt
Move-only, checked operation results for the common layer.
Graphics * graphics
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Independently owned, pooled visual effect; main/render thread only, no callbacks or gameplay damage....
Definition Lightning.h:44
Lightning(const Lightning &)=delete
~Lightning()
Release the internal entity and meshes on the main thread.
Lightning & operator=(const Lightning &)=delete
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
EVENGINE_API_ORCHESTRATION float lightningEnvelope(float age)
Weather return-stroke envelope, normalized age [0,1]; side-effect free.
EVENGINE_API_ORCHESTRATION Result< void > validateLightning(const LightningSettings &settings)
Validate bounded finite settings without modifying live instances.
void exposeLightning(ssq::Table &table, ssq::Class &weather)
Register preparation/settings and owned Lightning methods on Weather.
EVENGINE_API_ORCHESTRATION Result< LightningGeometry > buildLightningGeometry(const LightningSettings &settings, unsigned variant)
Deterministic CPU preparation, explicit variant stream; identical inputs give identical geometry on o...
enum EVENGINE_API_FOUNDATION Table
OT_TABLE (editable via Runtime table APIs / ReflectedPropertyModel).
Definition Runtime.h:121
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:21
Owned CPU crossed ribbons along local +Y in [0,1]; no graphics dependency.
Definition Lightning.h:26
std::vector< float > normals
Definition Lightning.h:27
std::vector< std::uint32_t > indices
Definition Lightning.h:28
std::vector< float > positions
Definition Lightning.h:27
std::vector< float > uv
Definition Lightning.h:27
Copied preparation settings. Width and displacement are world units, independent of endpoint distance...
Definition Lightning.h:16