Planeshift
|
Represents the Edge in a PathNetwork. More...
#include <edge.h>
Classes | |
class | ForwardIterator |
Implementation of Iterator for FORWARD direction. More... | |
class | Iterator |
Iterator base class for Forward and Reverse Iterators. More... | |
class | ReverseIterator |
Implementation of Iterator for REVERSE direction. More... | |
Public Member Functions | |
Edge (psPath *path, psPath::Direction direction) | |
Create a new Edge for a path in the given direction. | |
psPath::Direction | GetDirection () |
Return the direction of path this edge is going. | |
psPathPoint * | GetEndPoint () |
Return the end point in this edge. | |
Waypoint * | GetEndWaypoint () |
Return the last waypoint in the edge. | |
Iterator * | GetIterator () |
Return the iterator for this edge. | |
psPath * | GetPath () |
Return the path. | |
Edge * | GetRandomEdge (const psPathNetwork::RouteFilter *routeFilter) |
Get a random edge from this. | |
psPathPoint * | GetStartPoint () |
Return the first point in this edge. | |
Waypoint * | GetStartWaypoint () |
Return the first waypoint in the edge. | |
bool | IsTeleport () const |
Check if this edge a teleport edge. | |
bool | NoWander () const |
Check if wander is allowed. | |
virtual | ~Edge () |
Destructor. |
Represents the Edge in a PathNetwork.
Points to the psPath that holds the actual path and keep track of the direction of the path for this edge. The edge is unidirectional, so for a bidirectional connection between two waypoints on edge for each waypoint should be created.
Edge::Edge | ( | psPath * | path, |
psPath::Direction | direction | ||
) |
Create a new Edge for a path in the given direction.
virtual Edge::~Edge | ( | ) | [virtual] |
Destructor.
psPath::Direction Edge::GetDirection | ( | ) | [inline] |
psPathPoint* Edge::GetEndPoint | ( | ) |
Return the end point in this edge.
Waypoint* Edge::GetEndWaypoint | ( | ) |
Return the last waypoint in the edge.
Iterator* Edge::GetIterator | ( | ) |
Return the iterator for this edge.
Return a pointer to an newly allocated Forward or Reverce Iterator. User should delete the iterator when done.
Edge* Edge::GetRandomEdge | ( | const psPathNetwork::RouteFilter * | routeFilter | ) |
Get a random edge from this.
psPathPoint* Edge::GetStartPoint | ( | ) |
Return the first point in this edge.
Waypoint* Edge::GetStartWaypoint | ( | ) |
Return the first waypoint in the edge.
bool Edge::IsTeleport | ( | ) | const |
Check if this edge a teleport edge.
bool Edge::NoWander | ( | ) | const |
Check if wander is allowed.