Struct walle::TrackingAgentData
ClassList > walle > TrackingAgentData
#include <AgentFactory.hpp>
Inherits the following classes: walle::BaseAgentData
Public Attributes
Type | Name |
---|---|
std::shared_ptr< Alerter > | alerter = = nullptr |
cse491::GridPosition | start_pos Where the TrackingAgent begins from patrolling from and returns two after the target moves out of range. |
std::string | string_path String representation of the path traveled (e.g. "n s e w" for north south east west) like in PathAgent . |
cse491::Entity * | target Goal Entity being tracked (must not be null or else the agent simply behaves like a PathAgent ) |
int | tracking_distance = = 5 Distance that the TrackingAgent can "see" such that when the target enters that range, it begins tracking. |
std::vector< cse491::GridPosition > | vector_path Set of grid positions that are applied to the agent's position during one step (constructed from string_path) like in PathAgent . |
Public Attributes inherited from walle::BaseAgentData
Type | Name |
---|---|
std::string | name Name of the agent. |
cse491::GridPosition | position Agent's position. |
char | symbol = = '*' Agent's representation. |
Public Functions
Type | Name |
---|---|
TrackingAgentData () = default Use initial values. |
|
TrackingAgentData (std::string name, cse491::GridPosition curr_pos, char symbol, std::string path, cse491::Entity * target, int tracking_dist, cse491::GridPosition start_pos, std::shared_ptr< Alerter > alerter) Set all values. |
Detailed Description
Stores data for a TrackingAgent
Public Attributes Documentation
variable alerter
std::shared_ptr<Alerter> alerter;
Shared reference to an Alerter, which is non-null if the agent should be able to tell other agents to immediately focus on their targets
Remark:
You should be using the same shared pointer across multiple instances of TrackingAgentData in order to make the TrackingAgents part of the same network. This means you need to copy around this shared pointer when using the factory
variable start_pos
cse491::GridPosition start_pos;
variable string_path
std::string string_path;
variable target
cse491::Entity* target;
variable tracking_distance
int tracking_distance;
variable vector_path
std::vector<cse491::GridPosition> vector_path;
Public Functions Documentation
function TrackingAgentData [1/2]
walle::TrackingAgentData::TrackingAgentData () = default
function TrackingAgentData [2/2]
inline walle::TrackingAgentData::TrackingAgentData (
std::string name,
cse491::GridPosition curr_pos,
char symbol,
std::string path,
cse491::Entity * target,
int tracking_dist,
cse491::GridPosition start_pos,
std::shared_ptr< Alerter > alerter
)
The documentation for this class was generated from the following file source/Agents/AgentFactory.hpp