Public Member Functions | |
VectorPathGraph (Vector3[] points) | |
override void | InitGraph () |
InitGraph is used to allocate memory and initialize the graph for use. | |
void | InitGraph (Vector3[] points) |
void | AddTwoWayEdge (int index1, int index2) |
void | AddEdge (int fromIndex, int toIndex) |
override float | HeuristicCost (int fromIndex, int toIndex) |
A heuristic cost function estimating the cost from fromNodeIndex to toNodeIndex. For A*-based pathfinding to guarantee a shortest path, the heuristic cost must be less than or equal to the actual cost. The default heuristic cost is 0. | |
override int | Quantize (Vector3 location) |
Quantize determines the graph node associated with the location. | |
override Vector3 | Localize (int node) |
Localize determines the Vector3 location of the specified graph node. | |
override PathBase | CreatePath (List< int > nodes, float cost) |
Creates a PathBase object from an ordered list of nodes and a precomputed cost. | |
VectorPathGraph (BinaryReader reader) | |
virtual void | Save (BinaryWriter writer) |
void | Save (string filename) |
Static Public Member Functions | |
static VectorPathGraph | Load (string filename) |
override PathBase RAIN.Path.VectorPathGraph.CreatePath | ( | List< int > | nodeList, |
float | cost | ||
) | [virtual] |
Creates a PathBase object from an ordered list of nodes and a precomputed cost.
nodeList | |
cost |
Implements RAIN.Path.PathGraph.
override float RAIN.Path.VectorPathGraph.HeuristicCost | ( | int | fromNodeIndex, |
int | toNodeIndex | ||
) | [virtual] |
A heuristic cost function estimating the cost from fromNodeIndex to toNodeIndex. For A*-based pathfinding to guarantee a shortest path, the heuristic cost must be less than or equal to the actual cost. The default heuristic cost is 0.
fromNodeIndex | The from node index |
toNodeIndex | The to node index |
Reimplemented from RAIN.Path.PathGraph.
override void RAIN.Path.VectorPathGraph.InitGraph | ( | ) | [virtual] |
InitGraph is used to allocate memory and initialize the graph for use.
Implements RAIN.Path.PathGraph.
override Vector3 RAIN.Path.VectorPathGraph.Localize | ( | int | nodeIndex | ) | [virtual] |
Localize determines the Vector3 location of the specified graph node.
nodeIndex | The index of the graph node to localize |
Implements RAIN.Path.PathGraph.
override int RAIN.Path.VectorPathGraph.Quantize | ( | Vector3 | location | ) | [virtual] |
Quantize determines the graph node associated with the location.
location | Vector3 position of the point to quantize |
Implements RAIN.Path.PathGraph.