载入中...
搜索中...
未找到
GrassWindBindings.cpp
浏览该文件的文档.
14 state.addFunc("setDirection", [](VegetationWindState* s, float x, float y, float z) { s->direction = {x, y, z}; });
18 auto audioState = table.addClass("VegetationWindAudioState", ssq::Class::Ctor<VegetationWindAudioState()>());
24 auto profile = table.addClass("VegetationWindProfile", ssq::Class::Ctor<VegetationWindProfile()>());
29 profile.addFunc("setFlex", [](VegetationWindProfile* p, float x, float y, float z) { p->flex = {x, y, z}; });
37 table.addFunc("advanceVegetationWind", [vm = table.getHandle()](VegetationWindState* s, float x, float y, float z,
40 Diagnostic::error(DiagnosticCode::InvalidArgument, "grass.wind: non-null shader, state and profile required"));
46 Diagnostic::error(DiagnosticCode::InvalidArgument, "grass.wind: non-null shader, state and profile required"));
49 table.addFunc("applyGrassWind", [vm = table.getHandle()](Shader* shader, const VegetationWindState* s,
51 auto result = shader && s && p ? applyGrassWind(*shader, *s, *p, seconds) : Result<void>::failure(
52 Diagnostic::error(DiagnosticCode::InvalidArgument, "grass.wind: non-null shader, state and profile required"));
62 Diagnostic::error(DiagnosticCode::InvalidArgument, "grass.wind: non-null shader, state and profile required"));
71 Diagnostic::error(DiagnosticCode::InvalidArgument, "grass.wind: non-null shader, state and profile required"));
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Result< void > applyTreeWind(Shader &shader, const VegetationWindState &state, const VegetationWindProfile &vegetation, const TreeWindProfile &tree, double seconds)
Atomically publish one validated tree wind snapshot to CPU-side shader parameters.
Definition TreeWind.cpp:13
Result< void > initializeVegetationWind(VegetationWindState &state, glm::vec3 forward, float strength)
Apply Pcg WindManager.InstantWindApply semantics without smoothing.
Definition VegetationWind.cpp:32
Result< void > advanceVegetationWindAudio(VegetationWindAudioState &state, float windStrength, float transitionTime, float dt, bool enabled, bool clipAvailable)
Advance Pcg WindManager CheckWindVolume and ProcessWindAudio as a pure state transition.
Definition VegetationWind.cpp:68
EVENGINE_API_BACKENDS void exposeGrassWindBindings(ssq::Table &table)
Register wind state/profile and checked operations on the VM owner thread, retaining no table referen...
Definition GrassWindBindings.cpp:9
Result< void > applyGrassWind(Shader &shader, const VegetationWindState &state, const VegetationWindProfile &profile, double seconds)
Atomically apply a validated wind snapshot to a grass shader's CPU uniform storage.
Definition GrassWind.cpp:8
@ InvalidArgument
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:470
@ InvalidArgument
Caller-owned tree prototype wind geometry matching Pcg ResourceProtoTree inputs.
Definition TreeWind.h:12
Caller-owned state for Pcg WindManager's looping wind-audio volume controller.
Definition VegetationWind.h:17
float anchorVolume
Definition VegetationWind.h:19
float currentWindSpeed
Definition VegetationWind.h:18
Caller-owned material wind controls; billboard suppresses source branch and leaf motion....
Definition VegetationWind.h:46
float maximumDistance
Definition VegetationWind.h:48
Caller-owned wind globals; no hidden clock, singleton or retained scene link.
Definition VegetationWind.h:7
float updatePhase
WindManager's private update accumulator; InstantWindApply deliberately preserves it.
Definition VegetationWind.h:13