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

Ordered, versioned executor for procedural tile and object build layers. 更多...

#include <BuildLayerStack.h>

Public 成员函数

Result< void > addTileLayer (std::string id, bool enabled, float cellSize, float height, std::string group)
 Append a grid-to-mesh tile layer. Layer ids are unique.
 
Result< void > addObjectLayer (std::string id, bool enabled, const ObjectBuildLayer &layer)
 Append an object layer by value. Layer ids are unique.
 
Result< void > setEnabled (std::string_view id, bool enabled)
 
void clear ()
 
int getLayerCount () const noexcept
 Returns the layer count.
 
std::string getLayerId (int index) const
 Returns the layer id.
 
std::string getLayerType (int index) const
 Returns the layer type.
 
bool isLayerEnabled (int index) const noexcept
 True when layer enabled.
 
Result< BuildLayerExecution > execute (const Grid2D &grid, const PointSet &points, const PointSet *orientation=nullptr) const
 Execute every enabled layer in stable insertion order.
 
Result< BuildLayerExecution > executeRegion (const Grid2D &grid, const PointSet &points, const BuildLayerRegion &region, const PointSet *orientation=nullptr) const
 Execute enabled layers for one half-open cluster region.
 
std::string serializeDefinition () const
 Serialize ordered definitions using EVPCG_BUILD_LAYERS schema version 1.
 
Result< void > deserializeDefinition (std::string_view definition)
 Atomically restore version 1; unknown fields and malformed embedded layers are rejected.
 

详细描述

Ordered, versioned executor for procedural tile and object build layers.

The stack owns all definitions. Execution creates a new result and publishes no partial artifacts if a layer fails. No scene, renderer or physics state is owned. @thread Affine; mutate and execute on the owning thread.

在文件 BuildLayerStack.h 第 60 行定义.

成员函数说明

◆ addObjectLayer()

Result< void > eve::procgen::BuildLayerStack::addObjectLayer ( std::string  id,
bool  enabled,
const ObjectBuildLayer &  layer 
)

Append an object layer by value. Layer ids are unique.

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

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

被这些函数引用 deserializeDefinition().

◆ addTileLayer()

Result< void > eve::procgen::BuildLayerStack::addTileLayer ( std::string  id,
bool  enabled,
float  cellSize,
float  height,
std::string  group 
)

Append a grid-to-mesh tile layer. Layer ids are unique.

在文件 BuildLayerStack.cpp 第 88 行定义.

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

被这些函数引用 deserializeDefinition().

◆ clear()

void eve::procgen::BuildLayerStack::clear ( )

在文件 BuildLayerStack.cpp 第 124 行定义.

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

◆ deserializeDefinition()

Result< void > eve::procgen::BuildLayerStack::deserializeDefinition ( std::string_view  definition)

◆ execute()

Result< BuildLayerExecution > eve::procgen::BuildLayerStack::execute ( const Grid2D &  grid,
const PointSet &  points,
const PointSet *  orientation = nullptr 
) const

Execute every enabled layer in stable insertion order.

参数
gridSource for tile layers.
pointsSource for object layers.
orientationOptional orientation layer shared by object definitions that enable orientation.
返回
Complete ordered artifacts, or the first structured failure with no visible partial result. @cost Sum of enabled tile mesh construction and object layer costs.

在文件 BuildLayerStack.cpp 第 140 行定义.

引用了 executeRegion() , 以及 points.

◆ executeRegion()

◆ getLayerCount()

int eve::procgen::BuildLayerStack::getLayerCount ( ) const
noexcept

Returns the layer count.

在文件 BuildLayerStack.cpp 第 125 行定义.

◆ getLayerId()

std::string eve::procgen::BuildLayerStack::getLayerId ( int  index) const

Returns the layer id.

在文件 BuildLayerStack.cpp 第 127 行定义.

引用了 index.

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

◆ getLayerType()

std::string eve::procgen::BuildLayerStack::getLayerType ( int  index) const

Returns the layer type.

在文件 BuildLayerStack.cpp 第 131 行定义.

引用了 index.

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

◆ isLayerEnabled()

bool eve::procgen::BuildLayerStack::isLayerEnabled ( int  index) const
noexcept

True when layer enabled.

在文件 BuildLayerStack.cpp 第 136 行定义.

引用了 index.

◆ serializeDefinition()

std::string eve::procgen::BuildLayerStack::serializeDefinition ( ) const

Serialize ordered definitions using EVPCG_BUILD_LAYERS schema version 1.

在文件 BuildLayerStack.cpp 第 197 行定义.

引用了 layer , 以及 serializeDefinition().

被这些函数引用 eve::procgen::exposeGridMeshGraphs() , 以及 serializeDefinition().

◆ setEnabled()

Result< void > eve::procgen::BuildLayerStack::setEnabled ( std::string_view  id,
bool  enabled 
)

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