载入中...
搜索中...
未找到
TerrainPolygonMask.h
浏览该文件的文档.
1#pragma once
2
3#include <memory>
4#include "common/Result.h"
5
6namespace eve::procgen {
7class Heightmap;
8struct TerrainSampleGrid;
9
12
18public:
26 TerrainPolygonMask& operator=(TerrainPolygonMask&&) noexcept;
28 TerrainPolygonMask& operator=(const TerrainPolygonMask&) = delete;
29
31 [[nodiscard]] Result<int> addNode(double worldX, double worldZ, float radius, float strength);
33 void clear();
35 [[nodiscard]] int getNodeCount() const noexcept;
48 [[nodiscard]] Result<int> rasterize(Heightmap& target, const Heightmap& brush, const TerrainSampleGrid& grid,
50
51private:
52 struct Impl;
53 std::unique_ptr<Impl> impl_;
54};
55} // namespace eve::procgen
LogicalId target
#define EVENGINE_API_DOMAINS
Definition Export.h:110
float radius
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
In-memory terrain heightmap: a dense float grid (row-major, index = y * width + x) materialized from ...
Definition Heightmap.h:21
Own ordered Pcg-style PolyMask nodes and rasterize them into a caller-owned scalar grid....
TerrainPolygonMask(TerrainPolygonMask &&) noexcept
Terrain polygon mask.
~TerrainPolygonMask()
Terrain polygon mask.
TerrainPolygonMaskType
Pcg PolyMask topology: open strokes only, or closed flood fill plus strokes.
World X/Z positions of height sample centers, with positive spacing and dimensions.