载入中...
搜索中...
未找到
eve::weather::Lightning类 参考

Independently owned, pooled visual effect; main/render thread only, no callbacks or gameplay damage. Graphics resources and an internal generation-checked render entity are retired in either destruction order. Endpoint positions are copied; no weapon pointer is retained. Recreate after reload/provider retirement. 更多...

#include <Lightning.h>

类

struct  Impl
 

Public 成员函数

 ~Lightning ()
 Release the internal entity and meshes on the main thread.
 
 Lightning (const Lightning &)=delete
 
Lightning & operator= (const Lightning &)=delete
 
Result< void > setEndpoints (float ax, float ay, float az, float bx, float by, float bz)
 Copy finite, distinct world endpoints; cheap transform update, width stays constant. Invalid input preserves state.
 
Result< void > setColor (float r, float g, float b)
 Set nonnegative finite RGB tint; cheap material update, no environment mutation.
 
Result< void > trigger ()
 Restart the pulse, selecting the next prebuilt variant; no allocation.
 
Result< void > update (float dt)
 Advance with caller-supplied seconds before render3D; finite nonnegative dt required.
 
void stop ()
 Hide immediately; safe after provider/entity retirement.
 
float amplitude () const
 Current visual amplitude; zero after stop or retirement.
 

静态 Public 成员函数

static Result< std::unique_ptr< Lightning > > prepare (graphics::Graphics &graphics, const LightningSettings &settings)
 Validate and prepare hidden geometry; Graphics must be live during this call.
 

详细描述

Independently owned, pooled visual effect; main/render thread only, no callbacks or gameplay damage. Graphics resources and an internal generation-checked render entity are retired in either destruction order. Endpoint positions are copied; no weapon pointer is retained. Recreate after reload/provider retirement.

在文件 Lightning.h 第 44 行定义.

构造及析构函数说明

◆ ~Lightning()

eve::weather::Lightning::~Lightning ( )
default

Release the internal entity and meshes on the main thread.

◆ Lightning()

eve::weather::Lightning::Lightning ( const Lightning &  )
delete

成员函数说明

◆ amplitude()

float eve::weather::Lightning::amplitude ( ) const

Current visual amplitude; zero after stop or retirement.

在文件 Lightning.cpp 第 161 行定义.

被这些函数引用 eve::weather::exposeLightning().

◆ operator=()

Lightning & eve::weather::Lightning::operator= ( const Lightning &  )
delete

◆ prepare()

Result< std::unique_ptr< Lightning > > eve::weather::Lightning::prepare ( graphics::Graphics &  graphics,
const LightningSettings &  settings 
)
static

Validate and prepare hidden geometry; Graphics must be live during this call.

返回
Owned instance, or failure with no published visible entity. @cost GPU uploads proportional to variants * geometry size; amortize over repeated triggers.

在文件 Lightning.cpp 第 55 行定义.

引用了 eve::weather::buildLightningGeometry(), entity, eve::Diagnostic::error(), g, geometry, graphics, impl, eve::InvalidArgument, eve::weather::shaders::kBoltFragWgsl, eve::weather::shaders::kBoltVertWgsl, m, mesh, settings, state, valid , 以及 eve::weather::validateLightning().

被这些函数引用 eve::weather::exposeLightning().

◆ setColor()

Result< void > eve::weather::Lightning::setColor ( float  r,
float  g,
float  b 
)

Set nonnegative finite RGB tint; cheap material update, no environment mutation.

在文件 Lightning.cpp 第 121 行定义.

引用了 b, g, r, eve::StaleHandle , 以及 eve::Result< T >::success().

◆ setEndpoints()

Result< void > eve::weather::Lightning::setEndpoints ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz 
)

Copy finite, distinct world endpoints; cheap transform update, width stays constant. Invalid input preserves state.

在文件 Lightning.cpp 第 108 行定义.

引用了 dx, dy, dz, length, eve::StaleHandle , 以及 eve::Result< T >::success().

◆ stop()

void eve::weather::Lightning::stop ( )

Hide immediately; safe after provider/entity retirement.

在文件 Lightning.cpp 第 156 行定义.

被这些函数引用 eve::weather::exposeLightning().

◆ trigger()

Result< void > eve::weather::Lightning::trigger ( )

Restart the pulse, selecting the next prebuilt variant; no allocation.

在文件 Lightning.cpp 第 129 行定义.

引用了 eve::StaleHandle , 以及 eve::Result< T >::success().

◆ update()

Result< void > eve::weather::Lightning::update ( float  dt)

Advance with caller-supplied seconds before render3D; finite nonnegative dt required.

在文件 Lightning.cpp 第 142 行定义.

引用了 dt, eve::weather::lightningEnvelope(), eve::StaleHandle , 以及 eve::Result< T >::success().


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