Deterministic CPU sampler and ribbon mesh generator for weapon trails. 更多...
#include <TrailEffect.h>
Public 成员函数 | |
| TrailEmitter (TrailSettings settings={}) | |
| Construct an empty emitter with validated settings. | |
| TrailEmitter (const TrailEmitter &)=delete | |
| TrailEmitter & | operator= (const TrailEmitter &)=delete |
| void | setSettings (TrailSettings settings) |
| Replace settings and enforce the new sample budget. | |
| TrailSettings | settings () const noexcept |
| Return a value snapshot of current settings. | |
| void | update (float dtSeconds) |
| Age samples and remove expired entries using injected dt. | |
| TrailAppendResult | append (glm::vec3 root, glm::vec3 tip) |
| Append a weapon edge sample or report why it was not appended. | |
| void | breakTrail () noexcept |
| Start a disconnected segment at the next appended sample. | |
| void | clear () noexcept |
| Remove all samples and reset segment numbering. | |
| std::size_t | sampleCount () const noexcept |
| Return the number of retained root/tip samples. | |
| TrailMeshSnapshot | buildMesh () const |
| Build an owning triangle-list snapshot from current samples. | |
详细描述
Deterministic CPU sampler and ribbon mesh generator for weapon trails.
Call update(dt) once per simulation step, then append(root, tip). A large endpoint jump starts a disconnected segment, preventing teleport triangles. The emitter owns all samples and returned snapshots own their data. It is main-thread affine, performs no rendering, and invokes no callbacks.
在文件 TrailEffect.h 第 55 行定义.
构造及析构函数说明
◆ TrailEmitter() [1/2]
|
explicit |
Construct an empty emitter with validated settings.
在文件 TrailEffect.cpp 第 20 行定义.
◆ TrailEmitter() [2/2]
|
delete |
成员函数说明
◆ append()
| TrailAppendResult eve::stylize::TrailEmitter::append | ( | glm::vec3 | root, |
| glm::vec3 | tip | ||
| ) |
Append a weapon edge sample or report why it was not appended.
在文件 TrailEffect.cpp 第 47 行定义.
引用了 eve::stylize::Added, distance, finite, eve::stylize::TrailSettings::maxSamples, eve::stylize::TrailSettings::minSampleDistance, root, eve::stylize::SkippedTooClose, eve::stylize::StartedSegment, eve::stylize::TrailSettings::teleportDistance , 以及 tip.
◆ breakTrail()
|
noexcept |
Start a disconnected segment at the next appended sample.
在文件 TrailEffect.cpp 第 67 行定义.
◆ buildMesh()
| TrailMeshSnapshot eve::stylize::TrailEmitter::buildMesh | ( | ) | const |
Build an owning triangle-list snapshot from current samples.
在文件 TrailEffect.cpp 第 75 行定义.
引用了 current, eve::stylize::TrailSettings::lifetime, mesh, previous, u , 以及 eve::stylize::TrailMeshSnapshot::vertices.
◆ clear()
|
noexcept |
Remove all samples and reset segment numbering.
在文件 TrailEffect.cpp 第 69 行定义.
◆ operator=()
|
delete |
◆ sampleCount()
|
inlinenoexcept |
Return the number of retained root/tip samples.
在文件 TrailEffect.h 第 75 行定义.
◆ setSettings()
| void eve::stylize::TrailEmitter::setSettings | ( | TrailSettings | settings | ) |
Replace settings and enforce the new sample budget.
在文件 TrailEffect.cpp 第 34 行定义.
引用了 eve::stylize::TrailSettings::maxSamples , 以及 settings().
◆ settings()
|
inlinenoexcept |
◆ update()
| void eve::stylize::TrailEmitter::update | ( | float | dtSeconds | ) |
Age samples and remove expired entries using injected dt.
在文件 TrailEffect.cpp 第 40 行定义.
该类的文档由以下文件生成:
- src/modules/stylize/TrailEffect.h
- src/modules/stylize/TrailEffect.cpp