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

EVENGINE_API_DOMAINS public API. 更多...

#include <PbrMaterial.h>

Public 成员函数

void registerPbrRecipe (const std::string &id, PbrRecipeFn fn)
 Register a recipe without metadata.
 
void registerPbrRecipe (RecipeDescriptor descriptor, PbrRecipeFn fn)
 Register a recipe with metadata.
 
bool has (const std::string &id) const
 Test whether a recipe exists.
 
std::unique_ptr< PbrTextureSet > generate (const std::string &id, const Params &params, std::string &error) const
 Generates a PBR map set and transfers its unique ownership to the caller.
 
std::vector< std::string > list () const
 List recipe ids.
 
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 registerPbrBuiltins ()
 Register engine-provided PBR recipes once.
 

静态 Public 成员函数

static PbrRecipeRegistry & instance ()
 Access the process-wide PBR registry.
 

详细描述

EVENGINE_API_DOMAINS public API.

在文件 PbrMaterial.h 第 55 行定义.

成员函数说明

◆ applyDefaults()

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

Fill missing values from metadata.

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

在文件 PbrMaterial.cpp 第 63 行定义.

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

◆ descriptor()

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

Look up recipe metadata.

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

在文件 PbrMaterial.cpp 第 58 行定义.

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

◆ generate()

std::unique_ptr< PbrTextureSet > eve::procgen::PbrRecipeRegistry::generate ( const std::string &  id,
const Params &  params,
std::string &  error 
) const

Generates a PBR map set and transfers its unique ownership to the caller.

参数
idStable recipe id.
paramsValidated recipe parameters.
errorReceives a human-readable failure description when generation fails.
返回
The newly owned set, or null when the recipe is unknown or generation fails. @ownership The returned set and all maps it owns belong to the caller.

在文件 PbrMaterial.cpp 第 48 行定义.

引用了 error, id , 以及 params.

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

◆ has()

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

Test whether a recipe exists.

参数
idRecipe id.
返回
True when registered.

在文件 PbrMaterial.cpp 第 44 行定义.

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

◆ instance()

◆ list()

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

List recipe ids.

返回
Sorted ids.

在文件 PbrMaterial.cpp 第 70 行定义.

引用了 ids.

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

◆ registerPbrBuiltins()

◆ registerPbrRecipe() [1/2]

void eve::procgen::PbrRecipeRegistry::registerPbrRecipe ( const std::string &  id,
PbrRecipeFn  fn 
)

Register a recipe without metadata.

参数
idRecipe id.
fnGenerator callback.

在文件 PbrMaterial.cpp 第 32 行定义.

引用了 descriptor, fn, id, eve::procgen::RecipeDescriptor::id , 以及 registerPbrRecipe().

被这些函数引用 eve::procgen::registerCablePbrRecipes(), eve::procgen::registerFloorPbrRecipes(), registerPbrBuiltins() , 以及 registerPbrRecipe().

◆ registerPbrRecipe() [2/2]

void eve::procgen::PbrRecipeRegistry::registerPbrRecipe ( RecipeDescriptor  descriptor,
PbrRecipeFn  fn 
)

Register a recipe with metadata.

参数
descriptorRecipe schema.
fnGenerator callback.

在文件 PbrMaterial.cpp 第 39 行定义.

引用了 descriptor, fn , 以及 id.


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