载入中...
搜索中...
未找到
HeightmapTargetModule.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Module.h"
6#include "common/Result.h"
7
8#include <memory>
9#include <string>
10
11namespace eve::editor {
12class EditorSession;
13}
14namespace eve::graphics {
15class Graphics;
16class Mesh;
17} // namespace eve::graphics
18namespace eve::procgen {
19class Heightmap;
20}
21namespace eve::procgen_editing {
22class HeightmapTarget;
23}
24
25namespace eve::heightmap_target {
26
29public:
31
33 [[nodiscard]] std::unique_ptr<procgen_editing::HeightmapTarget> newTarget(std::string id,
34 procgen::Heightmap* heightmap) const;
38 int applyBrush(procgen::Heightmap* heightmap, float centerX, float centerY, float radius, float strength) const;
40 graphics::Mesh* newMesh(procgen::Heightmap* heightmap, float cellSize, float heightScale) const;
42 bool updateMesh(graphics::Mesh* mesh, graphics::Graphics* graphics, procgen::Heightmap* heightmap, float cellSize,
43 float heightScale) const;
45 graphics::Mesh* newSmoothMesh(procgen::Heightmap* heightmap, float cellSize, float heightScale) const;
47 bool updateSmoothMesh(graphics::Mesh* mesh, graphics::Graphics* graphics, procgen::Heightmap* heightmap,
48 float cellSize, float heightScale) const;
50 [[nodiscard]] Result<std::string> encodeDocument(const procgen::Heightmap* heightmap, float spacingX,
51 float spacingZ) const;
53 [[nodiscard]] Result<void> decodeDocument(std::string_view json, procgen::Heightmap* heightmap) const;
54};
55
56} // namespace eve::heightmap_target
LogicalId target
#define EVENGINE_API_EDITORS
Definition Export.h:112
float radius
Mesh * mesh
Move-only, checked operation results for the common layer.
std::optional< InteractionSession > session
Definition Tactics.cpp:39
double spacingZ
double spacingX
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Hosts interchangeable editor tools and routes their lifecycle/input.
GPU mesh handle (+ optional CPU morph targets).
Definition Mesh.h:25
Script-facing composition module for live heightmap editing targets.
In-memory terrain heightmap: a dense float grid (row-major, index = y * width + x) materialized from ...
Definition Heightmap.h:21
Non-owning scalar-field adapter for a live procedural heightmap.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25