RAIN.Path.VectorPathGraph Class Reference
Inheritance diagram for RAIN.Path.VectorPathGraph:
RAIN.Path.PathGraph RAIN.Path.WaypointPathGraph

List of all members.

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)

Member Function Documentation

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.

Parameters:
nodeList
cost
Returns:

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.

Parameters:
fromNodeIndexThe from node index
toNodeIndexThe to node index
Returns:
The heuristic cost of graph traversal between the two nodes.

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.

Parameters:
nodeIndexThe index of the graph node to localize
Returns:
The Vector3 position of the graph node

Implements RAIN.Path.PathGraph.

override int RAIN.Path.VectorPathGraph.Quantize ( Vector3  location) [virtual]

Quantize determines the graph node associated with the location.

Parameters:
locationVector3 position of the point to quantize
Returns:
The graph node index of the quantization point

Implements RAIN.Path.PathGraph.