Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The base class inital agent generation. More...
#include <AgentGenerator.h>
Public Member Functions | |
AgentGenerator () | |
Constructor. | |
virtual size_t | agentCount ()=0 |
Reports the number of agents created. More... | |
virtual Vector2 | agentPos (size_t i)=0 |
Get the position of the ith agent. More... | |
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 Member Functions | |
virtual | ~AgentGenerator () |
Virtual destructor. | |
Protected Attributes | |
Math::FloatGenerator * | _disp |
The generator for displacement amount (defaults to zero). | |
Math::FloatGenerator * | _dir |
The generator for angular displacement. | |
The base class inital agent generation.
This is an abstract class, primarily defining the agent generation abstraction. Essentially, the AgentGenerator produces a set of agent positions. Its properties should be sufficient to produce a count of agents with defined positions.
Perturbs the given point according to the given noise generator.
pos | The position to perturb. |
|
pure virtual |
Reports the number of agents created.
Implemented in Menge::Agents::HexLatticeGenerator, Menge::Agents::ExplicitGenerator, and Menge::Agents::RectGridGenerator.
|
pure virtual |
Get the position of the ith agent.
i | The index of the requested agent. |
AgentGeneratorException | if the index, i, is invalid. |
Implemented in Menge::Agents::HexLatticeGenerator, Menge::Agents::ExplicitGenerator, and Menge::Agents::RectGridGenerator.
void Menge::Agents::AgentGenerator::setNoiseGenerator | ( | Math::FloatGenerator * | gen | ) |
Sets the Generators noise generation.
The AgentGenerator takse position of the float generator provided and will delete it up on its destruction.
gen | The generator. |