|
Path Finder (2D/3D) 1.0.1
Create and use simple navigation graphs for 2D/3D path finding with choice of 4 search algorithms.
|

Public Member Functions | |
| GraphEdge (GraphNode from, GraphNode to) | |
| GraphEdge (GraphEdge edge) | |
| GraphEdge (GraphEdge edge, double costSoFar) | |
| GraphEdge (GraphNode from, GraphNode to, double cost) | |
| double | getCost () |
| void | setCost (double cost) |
| GraphNode | from () |
| GraphNode | to () |
| int | compareTo (Object o) |
Protected Member Functions | |
| GraphEdge () | |
Protected Attributes | |
| GraphNode | from |
| GraphNode | to |
| double | cost = 1.0 |
This class is used to represent a directed edge between 2 nodes and the cost of traversing this edge.
|
protected |
Make protected to prevent its use outside the class.
Create an edge of cost 1.0f
| from | 'from' node |
| to | 'to' node |
| pathfinder.GraphEdge.GraphEdge | ( | GraphEdge | edge | ) |
Copy constructor.
| edge |
| pathfinder.GraphEdge.GraphEdge | ( | GraphEdge | edge, |
| double | costSoFar | ||
| ) |
This constructor is used to create new edges for use with the path finding algorithms Dijkstra and A*
It should not be used directly.
| edge | the existing edge |
| costSoFar | the cost to the destination node so far. |
Create an edge from 2 existing nodes. If the cost is 0.0 then calculate the cost based on the physical distance between the nodes.
| from | 'from' node |
| to | 'to' node |
| cost | traversal cost |
| int pathfinder.GraphEdge.compareTo | ( | Object | o | ) |
Compare two graph edges.
| GraphNode pathfinder.GraphEdge.from | ( | ) |
| double pathfinder.GraphEdge.getCost | ( | ) |
| void pathfinder.GraphEdge.setCost | ( | double | cost | ) |
Change the traversal cost.
| cost | the new traversal cost. |
| GraphNode pathfinder.GraphEdge.to | ( | ) |