Class AgentStateVis

Class Documentation

class AgentStateVis

This provides an interface for managing the render options for all agents within a specific state Options default to values set within their parent Even if the default is changed after the agent state is constructed TODO: Block everything non-const from being called whilst VIS is active

Public Functions

AgentStateVis(const AgentVis &parent, const std::string &state_name)

Creates a new AgentStateVis to configure visualisation options for a particular agent-state

Parameters
  • parent – Visualisation options for the agent

  • state_name – State of the agent for which this options should represent

void setModel(const std::string &modelPath, const std::string &texturePath = "")

Use a model from file

Note

Model must be .obj format

Parameters
  • modelPath – File path of model

  • texturePath – Optional path to a texture for the model

void setModel(const Stock::Models::Model &model)

Use a stock model

See

Stock::Models::Model

Parameters

model – Model from internal resources

void setModelScale(float xLen, float yLen, float zLen)

Scale each dimension of the model to the corresponding world scales

Note

Y is considered the vertical axis

Parameters
  • xLen – World scale of the model’s on the x axis

  • yLen – World scale of the model’s on the y axis

  • zLen – World scale of the model’s on the z axis

void setModelScale(float maxLen)

Uniformly scale model so that max dimension equals this

Parameters

maxLen – World scale of the model’s relative to the axis which it is largest

void setColor(const ColorFunction &cf)

Set a custom colour function

void clearColor()

Disable custom color, e.g. if you’re using a textured model