39 #ifndef __BASE_AGENT_H__
40 #define __BASE_AGENT_H__
49 #include "mengeCommon.h"
142 void update(
float timeStep );
155 void computeNewVelocity();
330 void insertAgentNeighbor(
const BaseAgent* agent,
float distSq);
339 void insertObstacleNeighbor(
const Obstacle* obstacle,
float distSq);
358 virtual void startQuery();
366 virtual void filterAgent(
const BaseAgent *agent,
float distance);
374 virtual void filterObstacle(
const Obstacle *,
float distance);
390 virtual float getMaxAgentRange();
403 #endif // __BASE_AGENT_H__
std::vector< NearObstacle > _nearObstacles
The nearby obstacles to which the agent should respond.
Definition: BaseAgent.h:321
size_t _class
The population class for this agent.
Definition: BaseAgent.h:266
float _radius
The agent's radius.
Definition: BaseAgent.h:299
virtual float getMaxObstacleRange()
updates the max query obstacle range if conditions inside the filter are met typically, we don't shrink the query range until the result set is full
Definition: BaseAgent.h:399
PrefVelocity _velPref
The 2D preferred velocity of the agent.
Definition: BaseAgent.h:218
float _prefSpeed
The preferred speed of the agent.
Definition: BaseAgent.h:203
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
Vector2 _vel
The current 2D velocity of the agent.
Definition: BaseAgent.h:213
size_t _obstacleSet
A mask indicating the obstacles with compatible ids which this agent can see.
Definition: BaseAgent.h:275
AgentImplementationException()
Default constructor.
Definition: BaseAgent.h:109
std::vector< BFSM::VelModifier * > _velModifiers
a set of velocity modifiers to be set with the agent. Allows for intermediate velocity changes ...
Definition: BaseAgent.h:305
const Obstacle * getObstacle(int idx) const
Returns a pointer to the obstacle with given index.
Definition: BaseAgent.h:171
Exception for BaseAgent problems.
Definition: BaseAgent.h:68
Vector2 _pos
The current 2D position of the agent.
Definition: BaseAgent.h:208
const BaseAgent * getNeighbor(int idx) const
Returns a pointer to the neighbor with given index.
Definition: BaseAgent.h:163
The definition of a preferred velocity.
std::vector< NearAgent > _nearAgents
The nearby agents to which the agent should respond.
Definition: BaseAgent.h:313
float _maxSpeed
The maximum speed the agent can take.
Definition: BaseAgent.h:193
The definition of how preferred velocity is modified by a filter.
float _maxAccel
The maximum acceleration the agent can experience (interpreted isotropically).
Definition: BaseAgent.h:198
size_t _id
A globally unique identifier for each agent.
Definition: BaseAgent.h:287
virtual void setStrideParameters(float stride, float buffer)
Sets the density sensitivity parameters.
Definition: BaseAgent.h:350
Vector2 _velNew
The new velocity computed in computeNewVelocity.
Definition: BaseAgent.h:226
Base exception class for menge operations.
Definition: MengeException.h:58
AgentException()
Default constructor.
Definition: BaseAgent.h:73
The base class for filtering spatial queries according to proximity.
Definition: ProximityQuery.h:72
Vector2 _orient
The orientation vector (the direction the agent is facing which is not necessarily the same direction...
Definition: BaseAgent.h:241
AgentFatalException()
Default constructor.
Definition: BaseAgent.h:91
AgentFatalException(const std::string &s)
Constructor with message.
Definition: BaseAgent.h:98
The fatal agent exception.
Definition: BaseAgent.h:86
virtual Vector2 getQueryPoint()
gets the start point for the query
Definition: BaseAgent.h:381
Base class for fatal exceptions.
Definition: MengeException.h:99
The set of operations used by SimXMLLoader to apply XML-parsed experiment specification to a simulato...
size_t _maxNeighbors
The number of nearby agents used to plan dynamic respones.
Definition: BaseAgent.h:252
Defines static obstacles in the simulation.
Definition: Obstacle.h:56
float _neighborDist
The maximum distance at which another agent will be considered for a response.
Definition: BaseAgent.h:258
Structs for storing results from spatial queries.
float _priority
The priority of each agent.
Definition: BaseAgent.h:282
The base class for all objects which actually perform filtering and store results from spatial querie...
The definition of a preferred velocity.
Definition: PrefVelocity.h:68
Defines the basic agent properties and functionality that all simulation agents share.
Definition: BaseAgent.h:123
The base class for modifying preferred velocities.
Definition: VelModifier.h:110
The namespace that contains the basic simulation mechanisms.
float _maxAngVel
The agent's maximum angular velocity (in radians/sec) – used for controlling the changes in agent or...
Definition: BaseAgent.h:247
AgentException(const std::string &s)
Constructor with message.
Definition: BaseAgent.h:80
AgentImplementationException(const std::string &s)
Constructor with message.
Definition: BaseAgent.h:116
Special agent exception - used for non-implemented functionality.
Definition: BaseAgent.h:104