载入中...
搜索中...
未找到
eve::procgen::ParamDescriptor结构体 参考

UI-independent metadata for one procedural recipe parameter. 更多...

#include <ParamSchema.h>

静态 Public 成员函数

static ParamDescriptor integer (std::string key, std::string label, int defaultValue, int minimum, int maximum, int step=1)
 Construct a bounded integer descriptor.
 
static ParamDescriptor floating (std::string key, std::string label, float defaultValue, float minimum, float maximum, float step)
 Construct a bounded floating-point descriptor.
 
static ParamDescriptor boolean (std::string key, std::string label, bool defaultValue)
 Construct a Boolean descriptor stored as zero or one in Params.
 
static ParamDescriptor text (std::string key, std::string label, std::string defaultValue)
 Construct a free-form string descriptor.
 
static ParamDescriptor choice (std::string key, std::string label, std::string defaultValue, std::vector< std::string > choices)
 Construct a finite-choice string descriptor.
 

Public 属性

std::string key
 
std::string displayName
 
std::string description
 
std::string category = "General"
 
ParamKind kind = ParamKind::String
 
std::string defaultValue
 
bool hasMinimum = false
 
bool hasMaximum = false
 
double minimum = 0.0
 
double maximum = 0.0
 
double step = 0.0
 
std::vector< std::string > choices
 
bool advanced = false
 

详细描述

UI-independent metadata for one procedural recipe parameter.

在文件 ParamSchema.h 第 14 行定义.

成员函数说明

◆ boolean()

ParamDescriptor eve::procgen::ParamDescriptor::boolean ( std::string  key,
std::string  label,
bool  defaultValue 
)
static

Construct a Boolean descriptor stored as zero or one in Params.

参数
keyStable parameter key.
labelDisplay label.
defaultValueDefault value.
返回
Parameter metadata.

在文件 ParamSchema.cpp 第 47 行定义.

引用了 eve::procgen::Boolean, defaultValue, displayName, key, kind , 以及 label.

被这些函数引用 eve::procgen::makeTextureRecipeDescriptor(), eve::procgen::TextureRecipeRegistry::registerBuiltins(), eve::procgen::registerMeshDeformationGeometryRecipes(), eve::procgen::road::registerRoadMeshRecipes(), eve::procgen::road::registerRoadTextureRecipes() , 以及 eve::procgen::registerTerrainHeightmapAlgorithm().

◆ choice()

ParamDescriptor eve::procgen::ParamDescriptor::choice ( std::string  key,
std::string  label,
std::string  defaultValue,
std::vector< std::string >  choices 
)
static

Construct a finite-choice string descriptor.

参数
keyStable parameter key.
labelDisplay label.
defaultValueDefault value.
choicesAllowed values.
返回
Parameter metadata.

在文件 ParamSchema.cpp 第 65 行定义.

引用了 eve::procgen::Choice, choices, defaultValue, key, kind, label , 以及 text.

被这些函数引用 eve::procgen::registerCaveMeshRecipe(), eve::procgen::registerLSystemRecipes(), eve::procgen::road::registerRoadMeshRecipes() , 以及 eve::procgen::registerWfcSimple().

◆ floating()

ParamDescriptor eve::procgen::ParamDescriptor::floating ( std::string  key,
std::string  label,
float  defaultValue,
float  minimum,
float  maximum,
float  step 
)
static

◆ integer()

ParamDescriptor eve::procgen::ParamDescriptor::integer ( std::string  key,
std::string  label,
int  defaultValue,
int  minimum,
int  maximum,
int  step = 1 
)
static

◆ text()

ParamDescriptor eve::procgen::ParamDescriptor::text ( std::string  key,
std::string  label,
std::string  defaultValue 
)
static

Construct a free-form string descriptor.

参数
keyStable parameter key.
labelDisplay label.
defaultValueDefault value.
返回
Parameter metadata.

在文件 ParamSchema.cpp 第 56 行定义.

引用了 defaultValue, displayName, key, kind, label , 以及 eve::procgen::String.

类成员变量说明

◆ advanced

◆ category

◆ choices

◆ defaultValue

◆ description

◆ displayName

◆ hasMaximum

◆ hasMinimum

◆ key

◆ kind

◆ maximum

◆ minimum

◆ step


该结构体的文档由以下文件生成: