Runtime state for a shader effect attached to a renderable mesh. 更多...
#include <MeshEffect.h>
Public 成员函数 | |
| MeshEffectInstance (std::string style) | |
| Construct an unbound effect from a registered mesh style. | |
| MeshEffectInstance (std::string style, std::map< std::string, float > defaults) | |
| Build external-style playback from an owning snapshot of resolved shader scalar defaults. | |
| MeshEffectInstance (const MeshEffectInstance &)=delete | |
| MeshEffectInstance & | operator= (const MeshEffectInstance &)=delete |
| void | bindTarget (MeshEffectTargetHandle target) |
| Bind a process-local target identity without taking ownership. | |
| void | unbindTarget () noexcept |
| Remove the observed target identity. | |
| MeshEffectTargetHandle | target () const noexcept |
| Return the observed target identity, possibly invalid. | |
| bool | isBound () const noexcept |
| Return whether a target identity is currently bound. | |
| void | setPlayback (MeshEffectPlayback playback) |
| Replace timing after validating finite non-negative durations. | |
| MeshEffectPlayback | playback () const noexcept |
| Return a value snapshot of the timing configuration. | |
| void | play () noexcept |
| Restart playback from time zero. | |
| void | stop (float fadeOutSeconds=0.f) |
| Stop immediately or fade from the current envelope intensity. | |
| void | update (float dtSeconds) |
| Advance playback using caller-provided simulation time. | |
| MeshEffectState | state () const noexcept |
| Return the current playback phase. | |
| float | elapsed () const noexcept |
| Return elapsed playback time in seconds. | |
| float | intensity () const noexcept |
| Return the normalized lifecycle envelope in [0, 1]. | |
| StyleInstance & | style () noexcept |
| Access the owned mutable style parameter instance. | |
| const StyleInstance & | style () const noexcept |
| Access the owned immutable style parameter instance. | |
| graphics::Shader * | newMeshShader (graphics::Graphics *gfx) |
| Create a shader owned by gfx with current overrides and time. | |
详细描述
Runtime state for a shader effect attached to a renderable mesh.
The instance owns style overrides and playback state, but does not own or resolve the target. Graphics supplies and resolves MeshEffectTargetHandle; a stale target must be rejected by that owner before drawing. Time advances only through update(), making playback deterministic for an identical dt sequence. The object is main-thread affine and invokes no callbacks.
在文件 MeshEffect.h 第 40 行定义.
构造及析构函数说明
◆ MeshEffectInstance() [1/3]
|
explicit |
Construct an unbound effect from a registered mesh style.
在文件 MeshEffect.cpp 第 15 行定义.
引用了 eve::stylize::findStyleDefinition() , 以及 eve::stylize::StyleInstance::getStyle().
◆ MeshEffectInstance() [2/3]
| eve::stylize::MeshEffectInstance::MeshEffectInstance | ( | std::string | style, |
| std::map< std::string, float > | defaults | ||
| ) |
Build external-style playback from an owning snapshot of resolved shader scalar defaults.
在文件 MeshEffect.cpp 第 12 行定义.
◆ MeshEffectInstance() [3/3]
|
delete |
成员函数说明
◆ bindTarget()
| void eve::stylize::MeshEffectInstance::bindTarget | ( | MeshEffectTargetHandle | target | ) |
Bind a process-local target identity without taking ownership.
在文件 MeshEffect.cpp 第 21 行定义.
◆ elapsed()
|
inlinenoexcept |
Return elapsed playback time in seconds.
在文件 MeshEffect.h 第 73 行定义.
◆ intensity()
|
noexcept |
Return the normalized lifecycle envelope in [0, 1].
在文件 MeshEffect.cpp 第 97 行定义.
引用了 eve::stylize::MeshEffectPlayback::duration, eve::stylize::MeshEffectPlayback::fadeIn, eve::stylize::MeshEffectPlayback::fadeOut, eve::stylize::Finished , 以及 eve::stylize::Stopped.
被这些函数引用 stop().
◆ isBound()
|
inlinenoexcept |
Return whether a target identity is currently bound.
在文件 MeshEffect.h 第 57 行定义.
◆ newMeshShader()
| graphics::Shader * eve::stylize::MeshEffectInstance::newMeshShader | ( | graphics::Graphics * | gfx | ) |
Create a shader owned by gfx with current overrides and time.
在文件 MeshEffect.cpp 第 109 行定义.
引用了 eve::stylize::StyleInstance::hasParam(), eve::stylize::StyleInstance::newMeshShader() , 以及 eve::stylize::StyleInstance::setFloat().
◆ operator=()
|
delete |
◆ play()
|
noexcept |
◆ playback()
|
inlinenoexcept |
Return a value snapshot of the timing configuration.
在文件 MeshEffect.h 第 62 行定义.
被这些函数引用 setPlayback().
◆ setPlayback()
| void eve::stylize::MeshEffectInstance::setPlayback | ( | MeshEffectPlayback | playback | ) |
Replace timing after validating finite non-negative durations.
在文件 MeshEffect.cpp 第 33 行定义.
引用了 eve::stylize::MeshEffectPlayback::duration, eve::stylize::MeshEffectPlayback::fadeIn, eve::stylize::MeshEffectPlayback::fadeOut, eve::stylize::Finished, eve::stylize::MeshEffectPlayback::loop, play(), playback() , 以及 eve::stylize::Stopped.
◆ state()
|
inlinenoexcept |
Return the current playback phase.
在文件 MeshEffect.h 第 71 行定义.
◆ stop()
| void eve::stylize::MeshEffectInstance::stop | ( | float | fadeOutSeconds = 0.f | ) |
Stop immediately or fade from the current envelope intensity.
在文件 MeshEffect.cpp 第 51 行定义.
引用了 eve::stylize::FadingOut, eve::stylize::Finished, intensity() , 以及 eve::stylize::Stopped.
◆ style() [1/2]
|
inlinenoexcept |
Access the owned immutable style parameter instance.
在文件 MeshEffect.h 第 79 行定义.
◆ style() [2/2]
|
inlinenoexcept |
Access the owned mutable style parameter instance.
在文件 MeshEffect.h 第 77 行定义.
◆ target()
|
inlinenoexcept |
Return the observed target identity, possibly invalid.
在文件 MeshEffect.h 第 55 行定义.
被这些函数引用 bindTarget().
◆ unbindTarget()
|
noexcept |
Remove the observed target identity.
在文件 MeshEffect.cpp 第 26 行定义.
◆ update()
| void eve::stylize::MeshEffectInstance::update | ( | float | dtSeconds | ) |
Advance playback using caller-provided simulation time.
在文件 MeshEffect.cpp 第 64 行定义.
引用了 eve::stylize::MeshEffectPlayback::duration, eve::stylize::MeshEffectPlayback::fadeIn, eve::stylize::MeshEffectPlayback::fadeOut, eve::stylize::Finished, eve::stylize::StyleInstance::hasParam(), eve::stylize::MeshEffectPlayback::loop, eve::stylize::StyleInstance::setFloat() , 以及 eve::stylize::Stopped.
该类的文档由以下文件生成:
- src/modules/stylize/MeshEffect.h
- src/modules/stylize/MeshEffect.cpp