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 ¶ms, 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 ¶ms) 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.
- 参数
-
id Recipe id. params Values 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.
- 参数
-
id Recipe id.
- 返回
- Registry-owned schema or nullptr.
在文件 PbrMaterial.cpp 第 58 行定义.
◆ 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.
- 参数
-
id Stable recipe id. params Validated recipe parameters. error Receives 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 行定义.
◆ has()
| bool eve::procgen::PbrRecipeRegistry::has | ( | const std::string & | id | ) | const |
◆ instance()
|
static |
Access the process-wide PBR registry.
- 返回
- Registry instance.
在文件 PbrMaterial.cpp 第 27 行定义.
被这些函数引用 eve::procgen::Procgen::applyPbrRecipeDefaults(), eve::procgen::Procgen::generatePbrMaterialHandle(), eve::procgen::Procgen::getPbrRecipeCount(), eve::procgen::Procgen::getPbrRecipeId(), eve::procgen::Procgen::getPbrRecipeSchema(), eve::procgen::Procgen::hasPbrRecipe() , 以及 eve::procgen::Procgen::Procgen().
◆ 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()
| void eve::procgen::PbrRecipeRegistry::registerPbrBuiltins | ( | ) |
Register engine-provided PBR recipes once.
在文件 PbrMaterial.cpp 第 78 行定义.
引用了 eve::procgen::builtinTextureDefs(), descriptor, error, eve::procgen::ParamDescriptor::floating(), eve::procgen::generatePbrSet(), id, eve::procgen::makeTextureRecipeDescriptor(), params, eve::procgen::registerCablePbrRecipes(), eve::procgen::registerFloorPbrRecipes() , 以及 registerPbrRecipe().
被这些函数引用 eve::procgen::Procgen::applyPbrRecipeDefaults(), eve::procgen::Procgen::generatePbrMaterialHandle(), eve::procgen::Procgen::getPbrRecipeCount(), eve::procgen::Procgen::getPbrRecipeId(), eve::procgen::Procgen::getPbrRecipeSchema(), eve::procgen::Procgen::hasPbrRecipe() , 以及 eve::procgen::Procgen::Procgen().
◆ registerPbrRecipe() [1/2]
| void eve::procgen::PbrRecipeRegistry::registerPbrRecipe | ( | const std::string & | id, |
| PbrRecipeFn | fn | ||
| ) |
Register a recipe without metadata.
- 参数
-
id Recipe id. fn Generator 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.
- 参数
-
descriptor Recipe schema. fn Generator callback.
在文件 PbrMaterial.cpp 第 39 行定义.
引用了 descriptor, fn , 以及 id.
该类的文档由以下文件生成:
- src/modules/procgen/texture/PbrMaterial.h
- src/modules/procgen/texture/PbrMaterial.cpp