Packs standardized AgentState into instance transforms for draw submission. 更多...
#include <AgentInstanceRenderer.h>
Public 成员函数 | |
| int | sync (const std::vector< AgentState > &states) |
| Rebuild instance buffers from simulation states. | |
| int | instanceCount () const |
| Live instance count after last sync. | |
| const std::vector< glm::mat4 > & | matrices () const |
| Column-major 4x4 model matrices for each live agent. | |
| const std::vector< glm::vec4 > & | customAttrs () const |
| Per-instance custom float4 (from AgentState::customData). | |
| const std::vector< float > & | ages () const |
| Per-instance ages. | |
详细描述
Packs standardized AgentState into instance transforms for draw submission.
P0 exposes CPU-side matrices + custom attributes; P1 uploads to GPU instance buffers.
在文件 AgentInstanceRenderer.h 第 17 行定义.
成员函数说明
◆ ages()
|
inline |
Per-instance ages.
在文件 AgentInstanceRenderer.h 第 36 行定义.
◆ customAttrs()
|
inline |
Per-instance custom float4 (from AgentState::customData).
在文件 AgentInstanceRenderer.h 第 33 行定义.
◆ instanceCount()
|
inline |
Live instance count after last sync.
在文件 AgentInstanceRenderer.h 第 27 行定义.
◆ matrices()
|
inline |
Column-major 4x4 model matrices for each live agent.
在文件 AgentInstanceRenderer.h 第 30 行定义.
◆ sync()
| int eve::gpuagents::AgentInstanceRenderer::sync | ( | const std::vector< AgentState > & | states | ) |
Rebuild instance buffers from simulation states.
- 参数
-
states Current agent states.
- 返回
- Number of packed live instances.
在文件 AgentInstanceRenderer.cpp 第 7 行定义.
被这些函数引用 eve::gpuagents::EffectBackend::configure() , 以及 eve::gpuagents::EffectBackend::step().
该类的文档由以下文件生成:
- src/modules/gpuagents/AgentInstanceRenderer.h
- src/modules/gpuagents/AgentInstanceRenderer.cpp