Struct AgentVisData

Struct Documentation

struct AgentVisData

Public Functions

explicit AgentVisData(CUDAAgent &agent, const std::shared_ptr<AutoPalette> &autopalette = nullptr)

Note

Agent states only receive colors from the autopalette when AgentVis::State() is called for each state

Note

By default, all states share the same color from the autopalette

Parameters
  • agent – The CUDAAgent this class is configuring the visualisation for

  • autopalette – Automatic source of colors for individual agent states

void initBindings(std::unique_ptr<FLAMEGPU_Visualisation> &vis)

Pass vis configs for each agent state to visualiser

bool requestBufferResizes(std::unique_ptr<FLAMEGPU_Visualisation> &vis, bool force)

This requests that the visualisation resizes buffers

Parameters
  • vis – The affected visualisation

  • force – When true is passed, vis will delay closing the splash screen until this update has been processed Used when agent population has grown

Returns

Returns true if a non-0 buffer was requested

void updateBuffers(std::unique_ptr<FLAMEGPU_Visualisation> &vis)

This passes the correct device pointers to the visualisation and forces it to update the data used for rendering

Note

This should only be called when visualisation muted is held

Parameters

vis – The affected visualisation

Public Members

std::weak_ptr<AutoPalette> auto_palette

Link to the currently active auto_palette

std::shared_ptr<AutoPalette> owned_auto_palette

If setAutoPalette() is called, the created AutoPalette is stored here

AgentStateConfig defaultConfig

This is the default configuration options for states of this agent These values will be used for any state configuration options which have not been set independently

std::unordered_map<std::string, std::shared_ptr<AgentStateVisData>> states

Map of configurations for individual agent states

CUDAAgent &agent

CUDAAgent being rendered

std::shared_ptr<const AgentData> agentData

Agent description hierarchy being rendered

std::map<TexBufferConfig::Function, TexBufferConfig> core_tex_buffers

Holds information on core agent-wide texture buffers e.g. location/direction