Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
Menge::Agents::ExplicitGenerator Class Reference

Definition of agent generator class which produces agents based on explicit enumeration of agent positions in an XML file. More...

#include <ExplicitAgentGenerator.h>

Inheritance diagram for Menge::Agents::ExplicitGenerator:
Menge::Agents::AgentGenerator Menge::Element

Public Member Functions

 ExplicitGenerator ()
 Constructor.
 
virtual size_t agentCount ()
 Reports the number of agents created. More...
 
virtual Vector2 agentPos (size_t i)
 Get the position of the ith agent. More...
 
void addPosition (const Vector2 &p)
 Adds a position to the generator. More...
 
- Public Member Functions inherited from Menge::Agents::AgentGenerator
 AgentGenerator ()
 Constructor.
 
void setNoiseGenerator (Math::FloatGenerator *gen)
 Sets the Generators noise generation. More...
 
Vector2 addNoise (const Vector2 &pos)
 Perturbs the given point according to the given noise generator. More...
 
- Public Member Functions inherited from Menge::Element
void destroy ()
 This supplants the destructor. More...
 
virtual BFSM::TaskgetTask ()
 Return an optional task associated with this element. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...
 

Protected Attributes

std::vector< Vector2_positions
 The agent positions parsed from the file.
 
- Protected Attributes inherited from Menge::Agents::AgentGenerator
Math::FloatGenerator_disp
 The generator for displacement amount (defaults to zero).
 
Math::FloatGenerator_dir
 The generator for angular displacement.
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::Agents::AgentGenerator
virtual ~AgentGenerator ()
 Virtual destructor.
 

Detailed Description

Definition of agent generator class which produces agents based on explicit enumeration of agent positions in an XML file.

Member Function Documentation

void Menge::Agents::ExplicitGenerator::addPosition ( const Vector2 p)

Adds a position to the generator.

Parameters
pThe position to add.
virtual size_t Menge::Agents::ExplicitGenerator::agentCount ( )
inlinevirtual

Reports the number of agents created.

Returns
The number of agents this generator creates.

Implements Menge::Agents::AgentGenerator.

Vector2 Menge::Agents::ExplicitGenerator::agentPos ( size_t  i)
virtual

Get the position of the ith agent.

Parameters
iThe index of the requested agent.
Returns
The 2D position of the agent based on the generator's parameters.
Exceptions
AgentGeneratorExceptionif the index, i, is invalid.

Implements Menge::Agents::AgentGenerator.


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