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

Immutable owning per-source terrain write plan prepared from one authoritative network snapshot. Owner-thread only, synchronous. No network, mesh or provider pointers survive preparation. Applying borrows the destination until return and publishes one undo frame; failures leave it unchanged. Shared junction/derived geometry uses the explicit shared policy, never an inferred incident-edge winner. 更多...

#include <RoadTerrainPlan.h>

类

struct  Impl
 

Public 成员函数

 ~RoadTerrainPlan ()
 Destroy the owned meshes and copied policies.
 
 RoadTerrainPlan (RoadTerrainPlan &&) noexcept
 Transfer the plan.
 
RoadTerrainPlan & operator= (RoadTerrainPlan &&) noexcept
 Replace the plan.
 
 RoadTerrainPlan (const RoadTerrainPlan &)=delete
 
RoadTerrainPlan & operator= (const RoadTerrainPlan &)=delete
 
Result< int > apply (RoadTerrainWorkspace &workspace, std::size_t maximumWork) const
 Apply the immutable plan in one workspace transaction; disabled-only plans are NoOp.
 
Result< int > applyWorld (TerrainWorldWorkspace &world, std::size_t maximumWork) const
 Apply through the native World complete-channel transaction.
 

静态 Public 成员函数

static Result< RoadTerrainPlan > prepare (const RoadNetwork &network, const RoadBakeOptions &options, const RoadTerrainPolicy &sharedPolicy, std::size_t maximumPreparedElements)
 Bake the borrowed network and compact source intervals into independently owned write meshes.
 

详细描述

Immutable owning per-source terrain write plan prepared from one authoritative network snapshot. Owner-thread only, synchronous. No network, mesh or provider pointers survive preparation. Applying borrows the destination until return and publishes one undo frame; failures leave it unchanged. Shared junction/derived geometry uses the explicit shared policy, never an inferred incident-edge winner.

在文件 RoadTerrainPlan.h 第 19 行定义.

构造及析构函数说明

◆ ~RoadTerrainPlan()

eve::procgen::road::RoadTerrainPlan::~RoadTerrainPlan ( )
default

Destroy the owned meshes and copied policies.

◆ RoadTerrainPlan() [1/2]

eve::procgen::road::RoadTerrainPlan::RoadTerrainPlan ( RoadTerrainPlan &&  )
defaultnoexcept

Transfer the plan.

◆ RoadTerrainPlan() [2/2]

eve::procgen::road::RoadTerrainPlan::RoadTerrainPlan ( const RoadTerrainPlan &  )
delete

成员函数说明

◆ apply()

Result< int > eve::procgen::road::RoadTerrainPlan::apply ( RoadTerrainWorkspace &  workspace,
std::size_t  maximumWork 
) const

Apply the immutable plan in one workspace transaction; disabled-only plans are NoOp.

参数
workspaceBorrowed synchronously; retains only resulting channel/history values.
maximumWorkPositive shared execution budget; never persisted as author state.
返回
Changed cells or failure; failed writes preserve current tiles and redo. @cost Linear triangle coverage plus bounded channel filtering, paid once per explicit terrain commit.

在文件 RoadTerrainPlan.cpp 第 114 行定义.

引用了 eve::procgen::road::RoadTerrainWorkspace::applyBatch(), eve::NoOp, eve::Status::success() , 以及 eve::Result< T >::success().

◆ applyWorld()

Result< int > eve::procgen::road::RoadTerrainPlan::applyWorld ( TerrainWorldWorkspace &  world,
std::size_t  maximumWork 
) const

Apply through the native World complete-channel transaction.

参数
worldBorrowed synchronously; no pointer retained.
maximumWorkPositive shared execution budget, not author state.
返回
Changed cells or atomic failure; disabled-only plans return NoOp. @cost Complete World tile projection and bounded terrain write, amortized per explicit commit.

在文件 RoadTerrainPlan.cpp 第 120 行定义.

引用了 eve::NoOp, eve::Status::success() , 以及 eve::Result< T >::success().

◆ operator=() [1/2]

RoadTerrainPlan & eve::procgen::road::RoadTerrainPlan::operator= ( const RoadTerrainPlan &  )
delete

◆ operator=() [2/2]

RoadTerrainPlan & eve::procgen::road::RoadTerrainPlan::operator= ( RoadTerrainPlan &&  )
defaultnoexcept

Replace the plan.

◆ prepare()

Result< RoadTerrainPlan > eve::procgen::road::RoadTerrainPlan::prepare ( const RoadNetwork &  network,
const RoadBakeOptions &  options,
const RoadTerrainPolicy &  sharedPolicy,
std::size_t  maximumPreparedElements 
)
static

Bake the borrowed network and compact source intervals into independently owned write meshes.

参数
networkBorrowed and immutable until return; all author policies validated before baking.
optionsBorrowed until return; its provider lifetime/reentrancy contract matches bakeRoadNetwork.
sharedPolicyExplicit policy for junctions and network-derived geometry; disabled skips those sources.
maximumPreparedElementsBound copied index and vertex-attribute elements; positive.
返回
Owned plan, or a diagnostic without changing authors or terrain. No hidden terrain writes. @cost Full network bake plus expected linear source-index remapping and copied attributes, amortized per rebuild.

在文件 RoadTerrainPlan.cpp 第 83 行定义.

引用了 eve::procgen::road::bakeRoadNetwork(), edge, eve::procgen::road::Edge, eve::procgen::road::RoadTerrainPolicy::enabled, eve::Result< T >::failure(), impl, mesh, options, eve::procgen::road::PreparedRoadGeometrySources::prepare(), sources, eve::Result< T >::success(), eve::procgen::road::RoadStyle::terrainPolicy, used , 以及 eve::procgen::road::detail::validateRoadAuthoring().


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