载入中...
搜索中...
未找到
eve::stylize::MeshEffectInstance类 参考

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]

eve::stylize::MeshEffectInstance::MeshEffectInstance ( std::string  style)
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]

eve::stylize::MeshEffectInstance::MeshEffectInstance ( const MeshEffectInstance &  )
delete

成员函数说明

◆ bindTarget()

void eve::stylize::MeshEffectInstance::bindTarget ( MeshEffectTargetHandle  target)

Bind a process-local target identity without taking ownership.

在文件 MeshEffect.cpp 第 21 行定义.

引用了 eve::RuntimeHandle< Tag >::isInvalid() , 以及 target().

◆ elapsed()

float eve::stylize::MeshEffectInstance::elapsed ( ) const
inlinenoexcept

Return elapsed playback time in seconds.

在文件 MeshEffect.h 第 73 行定义.

◆ intensity()

float eve::stylize::MeshEffectInstance::intensity ( ) const
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()

bool eve::stylize::MeshEffectInstance::isBound ( ) const
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=()

MeshEffectInstance & eve::stylize::MeshEffectInstance::operator= ( const MeshEffectInstance &  )
delete

◆ play()

void eve::stylize::MeshEffectInstance::play ( )
noexcept

Restart playback from time zero.

在文件 MeshEffect.cpp 第 43 行定义.

被这些函数引用 setPlayback().

◆ playback()

MeshEffectPlayback eve::stylize::MeshEffectInstance::playback ( ) const
inlinenoexcept

Return a value snapshot of the timing configuration.

在文件 MeshEffect.h 第 62 行定义.

被这些函数引用 setPlayback().

◆ setPlayback()

void eve::stylize::MeshEffectInstance::setPlayback ( MeshEffectPlayback  playback)

◆ state()

MeshEffectState eve::stylize::MeshEffectInstance::state ( ) const
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]

const StyleInstance & eve::stylize::MeshEffectInstance::style ( ) const
inlinenoexcept

Access the owned immutable style parameter instance.

在文件 MeshEffect.h 第 79 行定义.

◆ style() [2/2]

StyleInstance & eve::stylize::MeshEffectInstance::style ( )
inlinenoexcept

Access the owned mutable style parameter instance.

在文件 MeshEffect.h 第 77 行定义.

被这些函数引用 eve::stylize::BeamSkillEffect::BeamSkillEffect().

◆ target()

MeshEffectTargetHandle eve::stylize::MeshEffectInstance::target ( ) const
inlinenoexcept

Return the observed target identity, possibly invalid.

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

被这些函数引用 bindTarget().

◆ unbindTarget()

void eve::stylize::MeshEffectInstance::unbindTarget ( )
noexcept

Remove the observed target identity.

在文件 MeshEffect.cpp 第 26 行定义.

引用了 eve::RuntimeHandle< MeshEffectTargetTag >::invalid().

◆ update()


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