Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Definition of agent generator class which produces agents based on explicit enumeration of agent positions in an XML file. More...
#include <ExplicitAgentGenerator.h>
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::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
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. | |
Definition of agent generator class which produces agents based on explicit enumeration of agent positions in an XML file.
void Menge::Agents::ExplicitGenerator::addPosition | ( | const Vector2 & | p | ) |
Adds a position to the generator.
p | The position to add. |
|
inlinevirtual |
Reports the number of agents created.
Implements Menge::Agents::AgentGenerator.
|
virtual |
Get the position of the ith agent.
i | The index of the requested agent. |
AgentGeneratorException | if the index, i, is invalid. |
Implements Menge::Agents::AgentGenerator.