Class AgentStateVis
Defined in File AgentStateVis.h
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
-
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 also
Stock::Models::Model
- Parameters:
model – Model from internal resources
-
void setKeyFrameModel(const std::string &modelPathA, const std::string &modelPathB, const std::string &texturePath = "")
Use a keyframe animated model from file
See also
setModel(const std::string &, const std::string &) This version can be used to provide agents a static model
Note
Lerp variable must be set first via AgentVis::setKeyFrameModel() otherwise an exception will be thrown.
- Parameters:
modelPathA – The path to the model’s first file (must be .obj)
modelPathB – The path to the model’s second file (must be .obj, have the same number of vertices/polygons as the first file)
texturePath – Optional path to the texture used by the two models
-
void setKeyFrameModel(const Stock::Models::KeyFrameModel &model)
Use a stock keyframe animated model
See also
setModel(const Stock::Models::Model &) This version can be used to provide agents a static model
Note
Lerp variable must be set first via AgentVis::setKeyFrameModel() otherwise an exception will be thrown.
- Parameters:
model – Model from the libraries 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 setVisible(bool isVisible)
Set whether this agent state is visible Defaults to true
- Parameters:
isVisible – If false the agent state will not be included in the visualisation
-
void setColor(const ColorFunction &cf)
Set a custom colour function
-
void clearColor()
Disable custom color, e.g. if you’re using a textured model
-
void setModel(const std::string &modelPath, const std::string &texturePath = "")