Planeshift
Edge Class Reference

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. More...
 
psPath::Direction GetDirection ()
 Return the direction of path this edge is going. More...
 
psPathPointGetEndPoint ()
 Return the end point in this edge. More...
 
WaypointGetEndWaypoint ()
 Return the last waypoint in the edge. More...
 
IteratorGetIterator ()
 Return the iterator for this edge. More...
 
psPathGetPath ()
 Return the path. More...
 
EdgeGetRandomEdge (const psPathNetwork::RouteFilter *routeFilter)
 Get a random edge from this. More...
 
psPathPointGetStartPoint ()
 Return the first point in this edge. More...
 
WaypointGetStartWaypoint ()
 Return the first waypoint in the edge. More...
 
bool IsTeleport () const
 Check if this edge a teleport edge. More...
 
bool NoWander () const
 Check if wander is allowed. More...
 
virtual ~Edge ()
 Destructor. More...
 

Detailed Description

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.

Definition at line 39 of file edge.h.

Constructor & Destructor Documentation

Edge::Edge ( psPath path,
psPath::Direction  direction 
)

Create a new Edge for a path in the given direction.

virtual Edge::~Edge ( )
virtual

Destructor.

Member Function Documentation

psPath::Direction Edge::GetDirection ( )
inline

Return the direction of path this edge is going.

Definition at line 75 of file edge.h.

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.

psPath* Edge::GetPath ( )
inline

Return the path.

Definition at line 71 of file edge.h.

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.


The documentation for this class was generated from the following file: