载入中...
搜索中...
未找到
EffectBackend.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4#include "common/Result.h"
8
9#include <memory>
10#include <string>
11
12namespace eve::gpuagents {
13
20public:
22 EffectBackend() = default;
23
29 [[nodiscard("check backend configure")]] Result<void> configure(const EffectProfile& profile,
30 std::string displayName = {});
31
33 GpuAgentSimulation& simulation() { return simulation_; }
35 const GpuAgentSimulation& simulation() const { return simulation_; }
36
38 AgentInstanceRenderer& renderer() { return renderer_; }
40 const AgentInstanceRenderer& renderer() const { return renderer_; }
41
43 const std::string& name() const { return name_; }
44
46 EffectKind kind() const { return simulation_.profile().kind; }
47
53 [[nodiscard("check backend step")]] Result<void> step(float dt, const EnvironmentSnapshot& env);
54
56 void reset() { simulation_.reset(); }
57
58private:
59 std::string name_;
60 GpuAgentSimulation simulation_;
61 AgentInstanceRenderer renderer_;
62};
63
64} // namespace eve::gpuagents
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Move-only, checked operation results for the common layer.
float step
Definition TreeMesh.cpp:314
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Packs standardized AgentState into instance transforms for draw submission.
Binds an EffectProfile to a GpuAgentSimulation and optional renderer.
AgentInstanceRenderer & renderer()
Instance renderer packing transforms from current states.
EffectKind kind() const
Active effect kind.
void reset()
Reset simulation agents.
const AgentInstanceRenderer & renderer() const
Const renderer.
const std::string & name() const
Debug / registry name.
GpuAgentSimulation & simulation()
Owned simulation.
EffectBackend()=default
Effect backend.
const GpuAgentSimulation & simulation() const
Const simulation.
Fixed-step, double-buffered agent simulation owner.
EffectKind
Effect kind selecting the solver kernel.
Definition AgentState.h:22
Type-erased profile bundle owned by an EffectBackend.
Read-only environment semantics prepared by GpuAgentWorld each tick.