Struct ModelVisData

Struct Documentation

struct ModelVisData

Public Functions

explicit ModelVisData(const CUDASimulation &model)

This class is constructed by/with a CUDASimulation Constructor will be clarified later, once requirements are clearer Requires:

texturise agent variable pointers On resize, also update textures

void hookVis(std::shared_ptr<visualiser::ModelVisData> &vis, std::unordered_map<std::string, std::shared_ptr<detail::CUDAEnvironmentDirectedGraphBuffers>> &map)

Pass the vis shared pointer to directed graphs being visualised so they can trigger updates

Parameters:
  • vis – pointer to this

  • map – the map of environment directed graph cuda buffers

void updateBuffers(const unsigned int &sc = UINT_MAX)

Updates all agent renders from corresponding

Parameters:

sc – Step count, the step count value shown in visualisation HUD

void registerEnvProperties()

Singletons have init, so env props are ready to grab

void updateRandomSeed()

Random seed has changed

void buildEnvGraphs()

Rebuild all environment graph sketches

void rebuildEnvGraph(const std::string &graph_name)

Rebuild a specific environment graph sketch

Public Members

ModelConfig modelCfg

Main struct of visualisation configuration options for the model

std::shared_ptr<AutoPalette> autoPalette

Autopalette which provides default colors to all agents By default this uses Stock::Palettes:DARK2

std::unordered_map<std::string, std::shared_ptr<AgentVisData>> agents

Per agent, visualisation configuration options

std::unordered_map<std::string, std::shared_ptr<EnvironmentGraphVisData>> graphs

Per environment direct graph, visualisation configuration options

const CUDASimulation &model

Reference back to the model to be visualised

const ModelData &modelData

Reference back to the model description hierarchy to be visualised

std::unique_ptr<FLAMEGPU_Visualisation> visualiser

Pointer to the visualisation

bool env_registered = false

Only need to register env properties once