Mutable parameter instance of an immutable built-in style definition. 更多...
#include <StyleInstance.h>
Public 成员函数 | |
| StyleInstance (std::string style) | |
| Style instance. | |
| StyleInstance (std::string style, std::map< std::string, float > defaults) | |
| Build an external mesh style from owning resolved scalar defaults; GPU programs are supplied by the package renderer. | |
| ~StyleInstance ()=default | |
| Style instance. | |
| StyleInstance (const StyleInstance &)=delete | |
| StyleInstance & | operator= (const StyleInstance &)=delete |
| std::string | getStyle () const |
| Returns the style. | |
| std::string | getStage () const |
| Returns the stage. | |
| int | getPriority () const |
| Returns the priority. | |
| void | setPriority (int priority) |
| Override built-in ordering for authored recipe composition. | |
| void | resetPriority () |
| Restore the style definition's built-in priority. | |
| bool | requiresInput (const std::string &input) const |
| Requires input. | |
| int | getParamCount () const |
| Returns the param count. | |
| std::string | getParamName (int index) const |
| Returns the param name. | |
| float | getParamDefault (const std::string &name) const |
| Returns the param default. | |
| float | getParamMin (const std::string &name) const |
| Returns the param min. | |
| float | getParamMax (const std::string &name) const |
| Returns the param max. | |
| bool | hasParam (const std::string &name) const |
| True when param. | |
| bool | isOverridden (const std::string &name) const |
| True when overridden. | |
| void | setFloat (const std::string &name, float value) |
| Sets the float. | |
| float | getFloat (const std::string &name) const |
| Returns the float. | |
| void | reset (const std::string &name) |
| Resets . | |
| void | resetAll () |
| Resets all. | |
| StylePass * | newPass (graphics::Graphics *gfx) const |
| Create a post pass and apply this instance's parameter overrides. | |
| graphics::Shader * | newMeshShader (graphics::Graphics *gfx) const |
| Create a mesh technique shader and apply compatible overrides. | |
| void | applyToShader (graphics::Shader *shader) const |
| Apply current overrides to an existing compatible shader. | |
详细描述
Mutable parameter instance of an immutable built-in style definition.
Instances hold only user overrides. Shader programs remain owned and shared by Graphics; creating a pass or mesh shader applies this instance's overrides.
在文件 StyleInstance.h 第 25 行定义.
构造及析构函数说明
◆ StyleInstance() [1/3]
|
explicit |
◆ StyleInstance() [2/3]
| eve::stylize::StyleInstance::StyleInstance | ( | std::string | style, |
| std::map< std::string, float > | defaults | ||
| ) |
Build an external mesh style from owning resolved scalar defaults; GPU programs are supplied by the package renderer.
在文件 StyleInstance.cpp 第 28 行定义.
◆ ~StyleInstance()
|
default |
Style instance.
◆ StyleInstance() [3/3]
|
delete |
成员函数说明
◆ applyToShader()
| void eve::stylize::StyleInstance::applyToShader | ( | graphics::Shader * | shader | ) | const |
Apply current overrides to an existing compatible shader.
- 参数
-
shader Immediate borrowed shader; it is not retained. @thread Render-thread affine when shader is GPU-backed.
在文件 StyleInstance.cpp 第 117 行定义.
被这些函数引用 newMeshShader() , 以及 newPass().
◆ getFloat()
| float eve::stylize::StyleInstance::getFloat | ( | const std::string & | name | ) | const |
◆ getParamCount()
| int eve::stylize::StyleInstance::getParamCount | ( | ) | const |
◆ getParamDefault()
| float eve::stylize::StyleInstance::getParamDefault | ( | const std::string & | name | ) | const |
Returns the param default.
在文件 StyleInstance.cpp 第 67 行定义.
引用了 name.
被这些函数引用 getFloat() , 以及 reset().
◆ getParamMax()
| float eve::stylize::StyleInstance::getParamMax | ( | const std::string & | name | ) | const |
◆ getParamMin()
| float eve::stylize::StyleInstance::getParamMin | ( | const std::string & | name | ) | const |
◆ getParamName()
| std::string eve::stylize::StyleInstance::getParamName | ( | int | index | ) | const |
Returns the param name.
在文件 StyleInstance.cpp 第 58 行定义.
引用了 index , 以及 eve::stylize::styleParamName().
◆ getPriority()
| int eve::stylize::StyleInstance::getPriority | ( | ) | const |
Returns the priority.
在文件 StyleInstance.cpp 第 44 行定义.
引用了 eve::stylize::findStyleDefinition() , 以及 priority.
◆ getStage()
| std::string eve::stylize::StyleInstance::getStage | ( | ) | const |
Returns the stage.
在文件 StyleInstance.cpp 第 39 行定义.
引用了 eve::graphics::AfterOpaque, eve::stylize::findStyleDefinition() , 以及 eve::graphics::postEffectStageName().
◆ getStyle()
|
inline |
Returns the style.
在文件 StyleInstance.h 第 39 行定义.
被这些函数引用 eve::stylize::MeshEffectInstance::MeshEffectInstance().
◆ hasParam()
| bool eve::stylize::StyleInstance::hasParam | ( | const std::string & | name | ) | const |
True when param.
在文件 StyleInstance.cpp 第 87 行定义.
引用了 eve::stylize::findStyleParameter() , 以及 name.
被这些函数引用 eve::stylize::MeshEffectInstance::newMeshShader() , 以及 eve::stylize::MeshEffectInstance::update().
◆ isOverridden()
| bool eve::stylize::StyleInstance::isOverridden | ( | const std::string & | name | ) | const |
◆ newMeshShader()
| graphics::Shader * eve::stylize::StyleInstance::newMeshShader | ( | graphics::Graphics * | gfx | ) | const |
Create a mesh technique shader and apply compatible overrides.
在文件 StyleInstance.cpp 第 131 行定义.
引用了 applyToShader(), eve::stylize::createMeshShader() , 以及 shader.
◆ newPass()
| StylePass * eve::stylize::StyleInstance::newPass | ( | graphics::Graphics * | gfx | ) | const |
Create a post pass and apply this instance's parameter overrides.
在文件 StyleInstance.cpp 第 124 行定义.
引用了 applyToShader(), eve::stylize::createPostShader() , 以及 shader.
◆ operator=()
|
delete |
◆ requiresInput()
| bool eve::stylize::StyleInstance::requiresInput | ( | const std::string & | input | ) | const |
Requires input.
在文件 StyleInstance.cpp 第 49 行定义.
引用了 eve::stylize::StyleDefinition::depth, eve::stylize::findStyleDefinition(), input, eve::stylize::StyleDefinition::normal , 以及 eve::stylize::StyleDefinition::post.
◆ reset()
| void eve::stylize::StyleInstance::reset | ( | const std::string & | name | ) |
◆ resetAll()
| void eve::stylize::StyleInstance::resetAll | ( | ) |
Resets all.
在文件 StyleInstance.cpp 第 115 行定义.
◆ resetPriority()
|
inline |
Restore the style definition's built-in priority.
在文件 StyleInstance.h 第 47 行定义.
◆ setFloat()
| void eve::stylize::StyleInstance::setFloat | ( | const std::string & | name, |
| float | value | ||
| ) |
Sets the float.
在文件 StyleInstance.cpp 第 93 行定义.
被这些函数引用 eve::stylize::BeamSkillEffect::BeamSkillEffect(), eve::stylize::MeshEffectInstance::newMeshShader() , 以及 eve::stylize::MeshEffectInstance::update().
◆ setPriority()
|
inline |
Override built-in ordering for authored recipe composition.
在文件 StyleInstance.h 第 45 行定义.
引用了 priority.
该类的文档由以下文件生成:
- src/modules/stylize/StyleInstance.h
- src/modules/stylize/StyleInstance.cpp