46 #ifndef __LATTICE_AGENT_GENERATOR_H__
47 #define __LATTICE_AGENT_GENERATOR_H__
49 #include "mengeCommon.h"
113 virtual Vector2 agentPos(
size_t i );
126 void set(
const Vector2 & anchor, AnchorAlignEnum align, LatticeRowEnum dir,
127 float width,
float density,
size_t tgtPopulation,
float angle );
133 void setRotationDeg(
float angle );
209 virtual const char *
name()
const {
return "hex_lattice"; }
219 return "Agent generation is done via the specification of a bounded hexagonal lattice.";
253 virtual bool setFromXML(
AgentGenerator * gen, TiXmlElement * node,
const std::string & specFldr )
const;
297 #endif // __LATTICE_AGENT_GENERATOR_H__
AnchorAlignEnum
Enumeration specifying arrangement relative to the anchor point.
Definition: HexLatticeGenerator.h:80
The factory for parsing xml data and instantiating agent generator implementations.
size_t _anchorXID
The identifier for the "anchor_x" float parameter.
Definition: HexLatticeGenerator.h:258
size_t _rowPop
The population of the major row (interpreted differently depending on lattice row direction...
Definition: HexLatticeGenerator.h:180
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
virtual const char * description() const
A description of the agent generator.
Definition: HexLatticeGenerator.h:218
float _rowDist
The distance between rows for the given target density.
Definition: HexLatticeGenerator.h:168
The base class inital agent generation.
Definition: AgentGenerator.h:104
AgentGenerator * instance() const
Create an instance of this class's agent generator implementation.
Definition: HexLatticeGenerator.h:233
size_t _alignID
The identifier for the "alignment" string parameter.
Definition: HexLatticeGenerator.h:268
Vector2 _anchor
The anchor point of the lattice. One agent will be positioned at this world coordainte.
Definition: HexLatticeGenerator.h:140
size_t _anchorYID
The identifier for the "anchor_y" float parameter.
Definition: HexLatticeGenerator.h:263
The front boundary's "left" corner is on the anchor.
Definition: HexLatticeGenerator.h:82
size_t _rowDirID
The identifier for the "row_direction" string parameter.
Definition: HexLatticeGenerator.h:273
The front boundary is centered on the anchor.
Definition: HexLatticeGenerator.h:81
size_t _rotID
The identifier for the "rotation" float parameter.
Definition: HexLatticeGenerator.h:293
The rows run parallel with the local x-axis.
Definition: HexLatticeGenerator.h:90
size_t _densityID
The identifier for the "density" float parameter.
Definition: HexLatticeGenerator.h:278
size_t _rowCount
The number of rows to create.
Definition: HexLatticeGenerator.h:185
size_t _totalPop
The actual number of agents to create based on run-time parameters. This value is only valid AFTER fi...
Definition: HexLatticeGenerator.h:163
float _nbrDist
The distance between neighbors in a single row for the given target density.
Definition: HexLatticeGenerator.h:174
virtual size_t agentCount()
Reports the number of agents created.
Definition: HexLatticeGenerator.h:104
Definition of an agent generator class which produces agents based on the positions of intersections ...
Definition: HexLatticeGenerator.h:75
float _sinRot
The sine of the amount the lattice is rotated around its anchor point. positive rotation values are c...
Definition: HexLatticeGenerator.h:157
Factory for HexLatticeGenerator.
Definition: HexLatticeGenerator.h:194
A class for parsing the xml description of an agent generator and instantiating particular instances...
Definition: AgentGeneratorFactory.h:59
The definition of the agent generator element. Defines the intial numbers and positions of agents in ...
LatticeRowEnum
Enumeration indicating which axis the regular rows occur.
Definition: HexLatticeGenerator.h:89
LatticeRowEnum _rowDir
The direction of the row layout.
Definition: HexLatticeGenerator.h:145
size_t _widthID
The identifier for the "width" float parameter.
Definition: HexLatticeGenerator.h:283
The namespace that contains the basic simulation mechanisms.
size_t _popID
The identifier for the "count" size_t parameter.
Definition: HexLatticeGenerator.h:288
float _cosRot
The cosine of the amount the lattice is rotated around its anchor point. positive rotation values are...
Definition: HexLatticeGenerator.h:151
virtual const char * name() const
The name of the generator type.
Definition: HexLatticeGenerator.h:209