载入中...
搜索中...
未找到
eve::gpuagents::AgentInstanceRenderer类 参考

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()

const std::vector< float > & eve::gpuagents::AgentInstanceRenderer::ages ( ) const
inline

Per-instance ages.

在文件 AgentInstanceRenderer.h 第 36 行定义.

◆ customAttrs()

const std::vector< glm::vec4 > & eve::gpuagents::AgentInstanceRenderer::customAttrs ( ) const
inline

Per-instance custom float4 (from AgentState::customData).

在文件 AgentInstanceRenderer.h 第 33 行定义.

◆ instanceCount()

int eve::gpuagents::AgentInstanceRenderer::instanceCount ( ) const
inline

Live instance count after last sync.

在文件 AgentInstanceRenderer.h 第 27 行定义.

◆ matrices()

const std::vector< glm::mat4 > & eve::gpuagents::AgentInstanceRenderer::matrices ( ) const
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.

参数
statesCurrent agent states.
返回
Number of packed live instances.

在文件 AgentInstanceRenderer.cpp 第 7 行定义.

引用了 s , 以及 tr.

被这些函数引用 eve::gpuagents::EffectBackend::configure() , 以及 eve::gpuagents::EffectBackend::step().


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