载入中...
搜索中...
未找到
CaveGeneration.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Result.h"
5
6#include <memory>
7
8namespace eve::procgen {
9class Params;
10class MeshBuild;
11class ScalarField3D;
12namespace cave_detail {
13struct State;
14}
15
20
30public:
40 CaveGeneration& operator=(CaveGeneration&&) noexcept;
42 [[nodiscard]] Result<void> configure(const Params& params);
46 [[nodiscard]] Result<void> buildSkeleton();
48 [[nodiscard]] Result<void> setChamber(int index, float x, float y, float z, float rx, float ry, float rz);
50 [[nodiscard]] int chamberCount() const noexcept;
54 [[nodiscard]] Result<void> sampleField();
58 [[nodiscard]] Result<void> evolveSurface(CaveSurfaceOperation operation);
62 [[nodiscard]] Result<void> deposit();
66 [[nodiscard]] Result<ScalarField3D> field() const;
70 [[nodiscard]] Result<void> replaceField(const ScalarField3D& field);
74 [[nodiscard]] Result<MeshBuild> buildMesh() const;
76 [[nodiscard]] CaveGenerationPhase phase() const noexcept;
77
78private:
79 std::unique_ptr<cave_detail::State> state_;
81};
82} // namespace eve::procgen
double z
double y
double x
ActionParameterOperation operation
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::vector< RecipeParam > params
Move-only, checked operation results for the common layer.
float phase
uint32_t index
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Staged limestone generator sharing the canonical mesh.cave algorithms.
~CaveGeneration()
Release owned intermediates without publication.
CaveGeneration(const CaveGeneration &)=delete
CaveGeneration()
Construct an empty, inexpensive generation owner.
CaveGeneration & operator=(const CaveGeneration &)=delete
CaveGeneration(CaveGeneration &&) noexcept
Transfer the generation owner.
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packe...
Definition MeshBuild.h:20
Owning, typed generation parameters.
Definition Params.h:27
Owning regular scalar volume; x is contiguous, followed by y and z.
CaveSurfaceOperation
Independently composable surface operators; order is chosen by the caller.
CaveGenerationPhase
Ordered admission states of an editable cave build.