Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A path on a roadmap between vertices. More...
#include <RoadMapPath.h>
Public Member Functions | |
RoadMapPath (size_t pointCount) | |
Constructor. More... | |
~RoadMapPath () | |
Destructor. | |
void | setWayPoint (size_t i, const Vector2 &pos) |
Sets the position of the ith waypoint. More... | |
void | setGoalPos (const BFSM::Goal *goal) |
Sets the ultimate goal. More... | |
void | setPrefDirection (const Agents::BaseAgent *agent, Agents::PrefVelocity &pVel) |
Sets the direction of the preferred velocity (and target). More... | |
size_t | getWayPointCount () const |
Reports the number of waypoints in the path. More... | |
Vector2 | getWayPoint (size_t i) const |
Returns the position of the ith waypoint. More... | |
const BFSM::Goal * | getGoal () const |
Returns the ultimate goal. More... | |
size_t | getTargetID () const |
Returns the current target waypoint index. More... | |
Protected Attributes | |
const BFSM::Goal * | _goal |
The ultimate goal. | |
Vector2 | _validPos |
The last valid position – validity means the target goal was visible. | |
size_t | _targetID |
The index of the current target. | |
size_t | _wayPointCount |
The number of way points in the path. | |
Vector2 * | _wayPoints |
The way points along the path. | |
A path on a roadmap between vertices.
Menge::RoadMapPath::RoadMapPath | ( | size_t | pointCount | ) |
Constructor.
pointCount | The number of waypoints in the path. |
|
inline |
Returns the ultimate goal.
|
inline |
Returns the current target waypoint index.
Vector2 Menge::RoadMapPath::getWayPoint | ( | size_t | i | ) | const |
Returns the position of the ith waypoint.
The index i is only validated in debug mode with an assertion. The ultimate goal is not included in the count.
i | The index of the desired waypoint. |
|
inline |
Reports the number of waypoints in the path.
|
inline |
Sets the ultimate goal.
goal | The ultimate goal |
void Menge::RoadMapPath::setPrefDirection | ( | const Agents::BaseAgent * | agent, |
Agents::PrefVelocity & | pVel | ||
) |
Sets the direction of the preferred velocity (and target).
agent | The agent to compute the preferred direciton for. |
pVel | The preferred velocity to set. |
void Menge::RoadMapPath::setWayPoint | ( | size_t | i, |
const Vector2 & | pos | ||
) |
Sets the position of the ith waypoint.
i | The index of the waypoint. |
pos | The location of the ith waypoint. |