Staged limestone generator sharing the canonical mesh.cave algorithms. 更多...
#include <CaveGeneration.h>
Public 成员函数 | |
| CaveGeneration () | |
| Construct an empty, inexpensive generation owner. | |
| ~CaveGeneration () | |
| Release owned intermediates without publication. | |
| CaveGeneration (const CaveGeneration &)=delete | |
| CaveGeneration & | operator= (const CaveGeneration &)=delete |
| CaveGeneration (CaveGeneration &&) noexcept | |
| Transfer the generation owner. | |
| CaveGeneration & | operator= (CaveGeneration &&) noexcept |
| Transfer the generation owner, releasing previous intermediates. | |
| Result< void > | configure (const Params ¶ms) |
| Copy and validate configuration; success resets all derived stages. | |
| Result< void > | buildSkeleton () |
| Generate the editable seeded cave skeleton from configured parameters. @cost Linear in skeleton candidates, much cheaper than volume sampling; run once per configuration. | |
| Result< void > | setChamber (int index, float x, float y, float z, float rx, float ry, float rz) |
| Edit one chamber in normalized [-1,1] coordinates before sampling; radii must be positive. | |
| int | chamberCount () const noexcept |
| Number of chamber records in the current skeleton. | |
| Result< void > | sampleField () |
| Sample the current skeleton and configured geological operators. @cost Volume samples times active geological features; amortize by editing the resulting field. | |
| Result< void > | evolveSurface (CaveSurfaceOperation operation) |
| Apply one selected surface operator; repeated operators and caller-selected order are supported. @cost At least linear in volume samples; compose before extracting a mesh. | |
| Result< void > | deposit () |
| Anchor secondary deposits on the current surface; disallows subsequent surface retreat. @cost Volume samples times deposit candidates; execute after all desired surface edits. | |
| Result< ScalarField3D > | field () const |
| Return an independent field snapshot; no internal storage is exposed. @cost Linear in volume samples; batch edits in the returned snapshot before replacement. | |
| Result< void > | replaceField (const ScalarField3D &field) |
| Replace the field with a same-dimension snapshot before deposition; preserve stage diagnostics. @cost Linear in volume samples; batch edits before calling this boundary. | |
| Result< MeshBuild > | buildMesh () const |
| Extract an independent mesh from any sampled stage; omitted evolution/deposits stay omitted. @cost Volume extraction plus emitted triangles and refinement; reuse the returned mesh until inputs change. | |
| CaveGenerationPhase | phase () const noexcept |
| Current stage; moved-from owners report Empty and can be configured again. | |
详细描述
Staged limestone generator sharing the canonical mesh.cave algorithms.
- 备注
- Owns parameters, skeleton and dense intermediate fields. No borrowed library, VM callback, graphics or ECS state survives a call. All failed operations preserve the prior stage. Stage values are transient; persist the script URI, configuration and seed and rebuild on reload. Within one build/compiler the legacy schedule is bit-exact; cross-platform floats have no bitwise promise. @thread Owner thread only; no callbacks, locks or reentrant execution.
在文件 CaveGeneration.h 第 29 行定义.
构造及析构函数说明
◆ CaveGeneration() [1/3]
|
default |
Construct an empty, inexpensive generation owner.
◆ ~CaveGeneration()
|
default |
Release owned intermediates without publication.
◆ CaveGeneration() [2/3]
|
delete |
◆ CaveGeneration() [3/3]
|
defaultnoexcept |
Transfer the generation owner.
成员函数说明
◆ buildMesh()
Extract an independent mesh from any sampled stage; omitted evolution/deposits stay omitted. @cost Volume extraction plus emitted triangles and refinement; reuse the returned mesh until inputs change.
在文件 CaveGeneration.cpp 第 126 行定义.
引用了 eve::procgen::Deposited, eve::Result< T >::failure(), mesh, phase(), result, status , 以及 eve::Result< T >::success().
◆ buildSkeleton()
| Result< void > eve::procgen::CaveGeneration::buildSkeleton | ( | ) |
Generate the editable seeded cave skeleton from configured parameters. @cost Linear in skeleton candidates, much cheaper than volume sampling; run once per configuration.
在文件 CaveGeneration.cpp 第 37 行定义.
引用了 eve::procgen::Configured, phase(), result, eve::procgen::Skeleton , 以及 eve::Result< T >::success().
◆ chamberCount()
|
noexcept |
Number of chamber records in the current skeleton.
在文件 CaveGeneration.cpp 第 47 行定义.
被这些函数引用 setChamber().
◆ configure()
Copy and validate configuration; success resets all derived stages.
在文件 CaveGeneration.cpp 第 27 行定义.
引用了 eve::procgen::Configured, params, result , 以及 eve::Result< T >::success().
被这些函数引用 eve::procgen::caveMeshGenerator().
◆ deposit()
| Result< void > eve::procgen::CaveGeneration::deposit | ( | ) |
Anchor secondary deposits on the current surface; disallows subsequent surface retreat. @cost Volume samples times deposit candidates; execute after all desired surface edits.
在文件 CaveGeneration.cpp 第 95 行定义.
引用了 eve::procgen::Deposited, phase(), result , 以及 eve::Result< T >::success().
◆ evolveSurface()
| Result< void > eve::procgen::CaveGeneration::evolveSurface | ( | CaveSurfaceOperation | operation | ) |
Apply one selected surface operator; repeated operators and caller-selected order are supported. @cost At least linear in volume samples; compose before extracting a mesh.
在文件 CaveGeneration.cpp 第 81 行定义.
引用了 eve::procgen::Condensation, eve::procgen::Curvature, eve::procgen::Evolved, operation, phase(), eve::procgen::ReactivePatches, eve::procgen::Reactivity, result , 以及 eve::Result< T >::success().
◆ field()
| Result< ScalarField3D > eve::procgen::CaveGeneration::field | ( | ) | const |
Return an independent field snapshot; no internal storage is exposed. @cost Linear in volume samples; batch edits in the returned snapshot before replacement.
在文件 CaveGeneration.cpp 第 106 行定义.
引用了 eve::procgen::ScalarField3D::assign(), eve::procgen::Deposited, eve::Result< T >::failure(), field(), phase(), result, status , 以及 eve::Result< T >::success().
被这些函数引用 field() , 以及 replaceField().
◆ operator=() [1/2]
|
defaultnoexcept |
Transfer the generation owner, releasing previous intermediates.
◆ operator=() [2/2]
|
delete |
◆ phase()
|
noexcept |
Current stage; moved-from owners report Empty and can be configured again.
在文件 CaveGeneration.cpp 第 25 行定义.
引用了 eve::procgen::Empty.
被这些函数引用 buildMesh(), buildSkeleton(), deposit(), evolveSurface(), field(), replaceField(), sampleField() , 以及 setChamber().
◆ replaceField()
| Result< void > eve::procgen::CaveGeneration::replaceField | ( | const ScalarField3D & | field | ) |
Replace the field with a same-dimension snapshot before deposition; preserve stage diagnostics. @cost Linear in volume samples; batch edits before calling this boundary.
在文件 CaveGeneration.cpp 第 115 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), field(), eve::InvalidArgument, phase() , 以及 eve::Result< T >::success().
◆ sampleField()
| Result< void > eve::procgen::CaveGeneration::sampleField | ( | ) |
Sample the current skeleton and configured geological operators. @cost Volume samples times active geological features; amortize by editing the resulting field.
在文件 CaveGeneration.cpp 第 71 行定义.
引用了 phase(), result, eve::procgen::Sampled, eve::procgen::Skeleton , 以及 eve::Result< T >::success().
◆ setChamber()
| Result< void > eve::procgen::CaveGeneration::setChamber | ( | int | index, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | rx, | ||
| float | ry, | ||
| float | rz | ||
| ) |
Edit one chamber in normalized [-1,1] coordinates before sampling; radii must be positive.
在文件 CaveGeneration.cpp 第 49 行定义.
引用了 chamberCount(), eve::procgen::createCaveBreakdown(), eve::procgen::createCaveObstacleScourSites(), eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, phase(), eve::procgen::Skeleton, eve::Result< T >::success(), x, y , 以及 z.
该类的文档由以下文件生成:
- src/modules/procgen/algorithms/CaveGeneration.h
- src/modules/procgen/algorithms/CaveGeneration.cpp