Menge Plugin Examples
A Collection of Example Plugins for the Menge Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | List of all members
Zanlungo::Agent Class Reference

Agent definition for the Zanlungo pedestrian model. More...

#include <ZanlungoAgent.h>

Inheritance diagram for Zanlungo::Agent:

Public Member Functions

 Agent ()
 Default constructor.
 
 ~Agent ()
 Destroys this agent instance.
 
bool computeTTI (float &tti) const
 Computes the time to interaction. More...
 
Vector2 agentForce (const Agent *other, float T_i) const
 Compute the force due to another agent. More...
 
void computeNewVelocity ()
 Computes the new velocity of this agent.
 
float getFOV () const
 Reports the field of view for the agent.
 
float rightOfWayVel (Vector2 &otherVel, const Vector2 &otherPrefVel, float otherPriority, Vector2 &vel) const
 Computes the velocities based on right of way. More...
 

Public Attributes

float _mass
 The mass of the agent.
 

Detailed Description

Agent definition for the Zanlungo pedestrian model.

Member Function Documentation

Vector2 Zanlungo::Agent::agentForce ( const Agent other,
float  T_i 
) const

Compute the force due to another agent.

Parameters
otherA pointer to a neighboring agent
T_iThe time to interaction
Returns
The force imparted by the other agent on this agent
bool Zanlungo::Agent::computeTTI ( float &  tti) const

Computes the time to interaction.

Parameters
ttiThe time to interaction. Call by reference means that this value is set to the time to interaction
Returns
A boolean reporting if there is interaction. True if there is interaction, false otherwise.
float Zanlungo::Agent::rightOfWayVel ( Vector2 &  otherVel,
const Vector2 &  otherPrefVel,
float  otherPriority,
Vector2 &  vel 
) const

Computes the velocities based on right of way.

Parameters
otherVelThe other agent's current velocity. The right-of-way-relative other velocity will be set in this variable.
otherPrefVelThe other agent's preferred velocity.
otherPriorityThe other agent's priority value
velThis agent's right-of-way-relative velocity will be placed in this variable.
Returns
The signed right of way value. (Negative implies other has right of way, positive implies this agent has right of way.)

The documentation for this class was generated from the following files: