Definition of an agent generator class which produces agents based on the positions of intersections on a lattice–one agent per intersection.
More...
#include <RectGridGenerator.h>
|
Vector2 | _anchor |
| The anchor point of the lattice. One agent will be positioned at this world coordainte.
|
|
Vector2 | _offset |
| The offset from one agent to the next agent (along the local x- and y-axes, respectively.
|
|
size_t | _xCount |
| The number of agents along the local x-axis.
|
|
size_t | _yCount |
| The number of agents along the local y-axis.
|
|
float | _cosRot |
| The cosine of the amount the lattice is rotated around its anchor point. positive rotation values are counter-clockwise rotation.
|
|
float | _sinRot |
| The sine of the amount the lattice is rotated around its anchor point. positive rotation values are counter-clockwise rotation.
|
|
Math::FloatGenerator * | _disp |
| The generator for displacement amount (defaults to zero).
|
|
Math::FloatGenerator * | _dir |
| The generator for angular displacement.
|
|
Definition of an agent generator class which produces agents based on the positions of intersections on a lattice–one agent per intersection.
virtual size_t Menge::Agents::RectGridGenerator::agentCount |
( |
| ) |
|
|
inlinevirtual |
Vector2 Menge::Agents::RectGridGenerator::agentPos |
( |
size_t |
i | ) |
|
|
virtual |
Get the position of the ith agent.
- Parameters
-
i | The index of the requested agent. |
- Returns
- The 2D position of the agent based on the generator's parameters.
- Exceptions
-
Implements Menge::Agents::AgentGenerator.
void Menge::Agents::RectGridGenerator::setAgentCounts |
( |
size_t |
xCount, |
|
|
size_t |
yCount |
|
) |
| |
|
inline |
Sets the number of agents in the local x- and y-directions.
- Parameters
-
xCount | The count of agents in the x-direction. |
yCount | The count of agents in the y-direction. |
void Menge::Agents::RectGridGenerator::setAnchor |
( |
const Vector2 & |
p | ) |
|
|
inline |
Sets the anchor position.
- Parameters
-
void Menge::Agents::RectGridGenerator::setOffset |
( |
const Vector2 & |
o | ) |
|
|
inline |
Sets the offset value.
- Parameters
-
void Menge::Agents::RectGridGenerator::setRotationDeg |
( |
float |
angle | ) |
|
Sets the lattice rotation.
- Parameters
-
angle | The rotation angle (in degrees). |
void Menge::Agents::RectGridGenerator::setXCount |
( |
size_t |
count | ) |
|
|
inline |
Sets the number of agents in the local x-direction.
- Parameters
-
count | The count of agents. |
void Menge::Agents::RectGridGenerator::setYCount |
( |
size_t |
count | ) |
|
|
inline |
Sets the number of agents in the local y-direction.
- Parameters
-
count | The count of agents. |
The documentation for this class was generated from the following files:
- src/menge/MengeCore/Agents/AgentGenerators/RectGridGenerator.h
- src/menge/MengeCore/Agents/AgentGenerators/RectGridGenerator.cpp