载入中...
搜索中...
未找到
eve::procgen::TerrainSpawnPlan类 参考

Own an ordered mixed-domain Pcg-style spawn recipe. Rule IDs are stable and unique. Every raster and setting is copied at insertion, so later caller mutation cannot alter replay. The plan is a value object with no scene references, callbacks, clock or mutable external state. 更多...

#include <TerrainSpawnPlan.h>

Public 成员函数

Result< int > addSplat (const std::string &ruleId, const Heightmap &paint, int targetLayer, const TerrainStampSettings &operation)
 Append an owned terrain texture rule after validating a nonempty unique rule ID.
 
Result< int > addDetail (const std::string &ruleId, const Heightmap &fitness, const TerrainDetailSettings &settings, const TerrainStampSettings &operation, TerrainDetailMode mode, std::int32_t seed)
 Append an owned detail rule after validating a nonempty unique rule ID.
 
Result< int > addTrees (const std::string &ruleId, const Heightmap &fitness, const TerrainTreePlacementSettings &settings, const TerrainStampSettings &operation, TerrainTreeOperationMode mode)
 Append an owned tree rule after validating a nonempty unique rule ID.
 
Result< int > addObjects (const std::string &ruleId, const Heightmap &fitness, const TerrainObjectPlacementSettings &settings, const TerrainStampSettings &operation, TerrainObjectOperationMode mode)
 Append an owned object rule after validating a nonempty unique rule ID.
 
Result< int > addProbes (const std::string &ruleId, const Heightmap &fitness, const TerrainProbePlacementSettings &settings, const TerrainStampSettings &operation, TerrainProbeOperationMode mode)
 Append an owned reflection or light probe rule after validating a nonempty unique rule ID.
 
Result< int > addModifierStamp (const std::string &ruleId, const Heightmap &stamp, const TerrainStampSettings &operation, const Heightmap &localMask, const Heightmap &globalMask)
 Append an owned TerrainModifierStamp with independent local and global mask snapshots.
 
Result< void > setEnabled (const std::string &ruleId, bool enabled)
 Enable or disable a stable rule without changing its order.
 
int getRuleCount () const noexcept
 Return the number of retained rules.
 
const std::vector< TerrainSpawnRule > & rules () const noexcept
 Return immutable ordered rules for transactional execution.
 
Result< std::string > snapshotJson () const
 Serialize schema version 3 as deterministic strict JSON with an owning binary payload.
 
Result< void > restoreJson (const std::string &json)
 Atomically restore versions 0-3; version 0 migrates all rules to enabled.
 

详细描述

Own an ordered mixed-domain Pcg-style spawn recipe. Rule IDs are stable and unique. Every raster and setting is copied at insertion, so later caller mutation cannot alter replay. The plan is a value object with no scene references, callbacks, clock or mutable external state.

在文件 TerrainSpawnPlan.h 第 87 行定义.

成员函数说明

◆ addDetail()

Result< int > eve::procgen::TerrainSpawnPlan::addDetail ( const std::string &  ruleId,
const Heightmap &  fitness,
const TerrainDetailSettings &  settings,
const TerrainStampSettings &  operation,
TerrainDetailMode  mode,
std::int32_t  seed 
)

Append an owned detail rule after validating a nonempty unique rule ID.

在文件 TerrainSpawnPlan.cpp 第 30 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation, seed, settings , 以及 eve::Result< T >::success().

◆ addModifierStamp()

Result< int > eve::procgen::TerrainSpawnPlan::addModifierStamp ( const std::string &  ruleId,
const Heightmap &  stamp,
const TerrainStampSettings &  operation,
const Heightmap &  localMask,
const Heightmap &  globalMask 
)

Append an owned TerrainModifierStamp with independent local and global mask snapshots.

在文件 TerrainSpawnPlan.cpp 第 79 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation, stamp , 以及 eve::Result< T >::success().

◆ addObjects()

Result< int > eve::procgen::TerrainSpawnPlan::addObjects ( const std::string &  ruleId,
const Heightmap &  fitness,
const TerrainObjectPlacementSettings &  settings,
const TerrainStampSettings &  operation,
TerrainObjectOperationMode  mode 
)

Append an owned object rule after validating a nonempty unique rule ID.

在文件 TerrainSpawnPlan.cpp 第 55 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation, settings , 以及 eve::Result< T >::success().

◆ addProbes()

Result< int > eve::procgen::TerrainSpawnPlan::addProbes ( const std::string &  ruleId,
const Heightmap &  fitness,
const TerrainProbePlacementSettings &  settings,
const TerrainStampSettings &  operation,
TerrainProbeOperationMode  mode 
)

Append an owned reflection or light probe rule after validating a nonempty unique rule ID.

在文件 TerrainSpawnPlan.cpp 第 67 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation, settings , 以及 eve::Result< T >::success().

◆ addSplat()

Result< int > eve::procgen::TerrainSpawnPlan::addSplat ( const std::string &  ruleId,
const Heightmap &  paint,
int  targetLayer,
const TerrainStampSettings &  operation 
)

Append an owned terrain texture rule after validating a nonempty unique rule ID.

在文件 TerrainSpawnPlan.cpp 第 16 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation , 以及 eve::Result< T >::success().

◆ addTrees()

Result< int > eve::procgen::TerrainSpawnPlan::addTrees ( const std::string &  ruleId,
const Heightmap &  fitness,
const TerrainTreePlacementSettings &  settings,
const TerrainStampSettings &  operation,
TerrainTreeOperationMode  mode 
)

Append an owned tree rule after validating a nonempty unique rule ID.

在文件 TerrainSpawnPlan.cpp 第 43 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), id, eve::InvalidArgument, operation, settings , 以及 eve::Result< T >::success().

◆ getRuleCount()

int eve::procgen::TerrainSpawnPlan::getRuleCount ( ) const
noexcept

Return the number of retained rules.

在文件 TerrainSpawnPlan.cpp 第 102 行定义.

◆ restoreJson()

Result< void > eve::procgen::TerrainSpawnPlan::restoreJson ( const std::string &  json)

Atomically restore versions 0-3; version 0 migrates all rules to enabled.

在文件 TerrainSpawnPlanCodec.cpp 第 360 行定义.

引用了 bytes, count, payload, root , 以及 value.

被这些函数引用 eve::procgen::TerrainBiomePreset::restoreJson().

◆ rules()

const std::vector< TerrainSpawnRule > & eve::procgen::TerrainSpawnPlan::rules ( ) const
noexcept

Return immutable ordered rules for transactional execution.

在文件 TerrainSpawnPlan.cpp 第 103 行定义.

被这些函数引用 eve::procgen::TerrainBiomePreset::addSpawner(), eve::procgen::TerrainWorldWorkspace::beginSpawn() , 以及 eve::procgen::TerrainWorldWorkspace::spawn().

◆ setEnabled()

Result< void > eve::procgen::TerrainSpawnPlan::setEnabled ( const std::string &  ruleId,
bool  enabled 
)

Enable or disable a stable rule without changing its order.

在文件 TerrainSpawnPlan.cpp 第 91 行定义.

引用了 enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::Result< T >::success() , 以及 value.

◆ snapshotJson()

Result< std::string > eve::procgen::TerrainSpawnPlan::snapshotJson ( ) const

Serialize schema version 3 as deterministic strict JSON with an owning binary payload.

在文件 TerrainSpawnPlanCodec.cpp 第 342 行定义.

引用了 root , 以及 eve::Value::toJson().


该类的文档由以下文件生成: