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 | Protected Member Functions | List of all members
GCF::Agent Class Reference

The specification of the generalized centrifugal force model agent. More...

#include <GCFAgent.h>

Inheritance diagram for GCF::Agent:

Public Member Functions

 Agent ()
 Default constructor.
 
 ~Agent ()
 Destroys this agent instance.
 
void initialize ()
 Initializes the agent.
 
void update (float timeStep)
 Updates the two-dimensional position and two-dimensional velocity of this agent. More...
 
void computeNewVelocity ()
 Computes the new velocity of this agent.
 
float getRadius () const
 Used in FSM machinery to determine clearance. More...
 
void setRadius (float radius)
 Stub function to make compatible with the fsm machinery TODO: Determine if I need this – I believe I deleted these setters.
 
void setStrideParameters (float factor, float buffer)
 Stub function to make compatible with the fsm machinery.
 

Public Attributes

Ellipse _ellipse
 The ellipse representing the agent's volume.
 
float _aMin
 Minimum ellipse size in facing direction.
 
float _aRate
 Rate at which ellipse major axis grows w.r.t. speed.
 
float _bMax
 The maximum ellipse width for slow movement This is a bad formulation, because when speed is zero, the ellipse width should get narrower again.
 
float _bGrowth
 The maximum increase of ellipse size in perpendicular direction.
 

Protected Member Functions

float computeDistanceResponse (float effDist)
 Computes component of the force magnitude based on effective distance. More...
 
void updateEllipse ()
 Update the ellipse based on current properties.
 

Detailed Description

The specification of the generalized centrifugal force model agent.

Member Function Documentation

float GCF::Agent::computeDistanceResponse ( float  effDist)
protected

Computes component of the force magnitude based on effective distance.

Parameters
effDistThe effective distance from ellipse center to force source
Returns
The force magnitude based on the effective distance.
float GCF::Agent::getRadius ( ) const
inline

Used in FSM machinery to determine clearance.

Returns
The radius of the minor axis of the ellipse (i.e. the half width of the agent). TODO: I don't think this is used....I should make sure that the agents _radius value is updated by the ellipse's minor axis value so simply querying _radius gets the same result.
void GCF::Agent::update ( float  timeStep)

Updates the two-dimensional position and two-dimensional velocity of this agent.

Parameters
timeStepThe time step that will be taken.

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