载入中...
搜索中...
未找到
eve::pixelworld::MaterialCatalog类 参考

Owning immutable material and reaction table used by one PixelWorld. 更多...

#include <PixelMaterial.h>

Public 成员函数

eve::Result< MaterialId > resolve (std::string_view name) const
 Resolve a stable name or return a structured NotFound diagnostic.
 
const MaterialDefinition & definition (MaterialId id) const noexcept
 Resolve a validated id; invalid ids safely project to air.
 
std::span< const MaterialDefinition > definitions () const noexcept
 Borrow immutable definitions until this catalog is destroyed.
 
std::span< const MaterialReactionRule > reactions () const noexcept
 Borrow immutable canonical-priority reaction rules.
 
std::span< const MaterialPhaseRule > phaseRules () const noexcept
 Borrow immutable canonical-priority phase rules.
 
bool canReact (MaterialId id) const noexcept
 Whether this material participates in at least one binary reaction.
 
bool canPhaseTransition (MaterialId id) const noexcept
 Whether this material owns at least one phase transition rule.
 
std::uint64_t fingerprint () const noexcept
 Stable deterministic fingerprint included in world snapshots.
 

静态 Public 成员函数

static eve::Result< MaterialCatalog > create (std::vector< MaterialDefinition > definitions, std::vector< MaterialReactionRule > reactions={}, std::vector< MaterialPhaseRule > phaseRules={})
 Validate and own a complete catalog candidate transactionally.
 
static MaterialCatalog builtIn ()
 Construct the engine's canonical built-in catalog.
 

详细描述

Owning immutable material and reaction table used by one PixelWorld.

在文件 PixelMaterial.h 第 84 行定义.

成员函数说明

◆ builtIn()

◆ canPhaseTransition()

bool eve::pixelworld::MaterialCatalog::canPhaseTransition ( MaterialId  id) const
noexcept

Whether this material owns at least one phase transition rule.

在文件 PixelMaterial.cpp 第 246 行定义.

引用了 index.

被这些函数引用 eve::pixelworld_editor::PixelWorldCatalogPanel::materialCards().

◆ canReact()

bool eve::pixelworld::MaterialCatalog::canReact ( MaterialId  id) const
noexcept

Whether this material participates in at least one binary reaction.

在文件 PixelMaterial.cpp 第 242 行定义.

引用了 index.

被这些函数引用 eve::pixelworld_editor::PixelWorldCatalogPanel::materialCards().

◆ create()

◆ definition()

const MaterialDefinition & eve::pixelworld::MaterialCatalog::definition ( MaterialId  id) const
noexcept

◆ definitions()

◆ fingerprint()

std::uint64_t eve::pixelworld::MaterialCatalog::fingerprint ( ) const
noexcept

Stable deterministic fingerprint included in world snapshots.

在文件 PixelMaterial.cpp 第 250 行定义.

被这些函数引用 eve::pixelworld::generatePixelWorld() , 以及 eve::pixelworld::PixelWorld::reloadMaterialCatalog().

◆ phaseRules()

◆ reactions()

◆ resolve()

eve::Result< MaterialId > eve::pixelworld::MaterialCatalog::resolve ( std::string_view  name) const

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