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

EVENGINE_API_DOMAINS public API. 更多...

#include <MarchingCubes.h>

Public 成员函数

void registerRecipe (const std::string &id, MeshRecipeFn fn)
 Register a recipe without metadata.
 
void registerRecipe (RecipeDescriptor descriptor, MeshRecipeFn fn)
 Register a recipe with reusable metadata.
 
bool has (const std::string &id) const
 True when active.
 
bool generate (const std::string &id, const Params &params, MeshBuild &out, std::string &error) const
 Generate.
 
std::vector< std::string > list () const
 List.
 
const RecipeDescriptor * descriptor (const std::string &id) const
 Look up recipe metadata.
 
bool applyDefaults (const std::string &id, Params &params) const
 Fill missing values from metadata.
 
void registerBuiltins ()
 Registers builtins.
 

静态 Public 成员函数

static MeshRecipeRegistry & instance ()
 Access the process-wide mesh recipe registry.
 

详细描述

EVENGINE_API_DOMAINS public API.

在文件 MarchingCubes.h 第 41 行定义.

成员函数说明

◆ applyDefaults()

bool eve::procgen::MeshRecipeRegistry::applyDefaults ( const std::string &  id,
Params &  params 
) const

Fill missing values from metadata.

参数
idRecipe id.
paramsValues to update.
返回
False for an unknown recipe.

在文件 MarchingCubes.cpp 第 487 行定义.

引用了 eve::procgen::RecipeDescriptor::applyDefaults(), descriptor , 以及 params.

◆ descriptor()

const RecipeDescriptor * eve::procgen::MeshRecipeRegistry::descriptor ( const std::string &  id) const

Look up recipe metadata.

参数
idRecipe id.
返回
Registry-owned schema or nullptr.

在文件 MarchingCubes.cpp 第 482 行定义.

引用了 eve::procgen::RecipeDescriptor::find().

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

◆ generate()

bool eve::procgen::MeshRecipeRegistry::generate ( const std::string &  id,
const Params &  params,
MeshBuild &  out,
std::string &  error 
) const

Generate.

在文件 MarchingCubes.cpp 第 472 行定义.

引用了 error , 以及 params.

◆ has()

bool eve::procgen::MeshRecipeRegistry::has ( const std::string &  id) const

True when active.

在文件 MarchingCubes.cpp 第 468 行定义.

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

◆ instance()

◆ list()

std::vector< std::string > eve::procgen::MeshRecipeRegistry::list ( ) const

List.

在文件 MarchingCubes.cpp 第 494 行定义.

引用了 ids.

被这些函数引用 eve::procgen::Procgen::getMeshRecipeCount() , 以及 eve::procgen::Procgen::getMeshRecipeId().

◆ registerBuiltins()

◆ registerRecipe() [1/2]

◆ registerRecipe() [2/2]

void eve::procgen::MeshRecipeRegistry::registerRecipe ( RecipeDescriptor  descriptor,
MeshRecipeFn  fn 
)

Register a recipe with reusable metadata.

参数
descriptorRecipe schema.
fnGenerator callback.

在文件 MarchingCubes.cpp 第 463 行定义.

引用了 descriptor, fn , 以及 id.


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