Google.Maps.Unity.Intersections.RoadLattice.PathOptions

Additional options provided to RoadLattice.FindPath and RoadLattice.UncheckedFindPath.

Summary

Public static attributes

Default = new PathOptions { HeuristicFunction = (source, destination) => (source.Location - destination.Location).magnitude, NeighborsFunction = node => node.Neighbors }
readonly PathOptions
The default PathOptions used when unspecified.

Properties

HeuristicFunction
The function used to estimate the cost of moving from one node to another.
NeighborsFunction
The function used to return the neighbors of a node.

Public functions

Heuristic(RoadLatticeNode source, RoadLatticeNode destination)
delegate float
Delegate for returning the cost of traversing the edge between source and destination while pathfinding.
Neighbors(RoadLatticeNode node)
delegate IEnumerable< RoadLatticeNode >
Delegate for returning the neighbors of a RoadLatticeNode.

Public static attributes

Default

readonly PathOptions Default = new PathOptions {
          HeuristicFunction =
              (source, destination) => (source.Location - destination.Location).magnitude,
          NeighborsFunction = node => node.Neighbors
      }

The default PathOptions used when unspecified.

Properties

HeuristicFunction

Heuristic HeuristicFunction

The function used to estimate the cost of moving from one node to another.

NeighborsFunction

Neighbors NeighborsFunction

The function used to return the neighbors of a node.

Public functions

Heuristic

delegate float Heuristic(
  RoadLatticeNode source,
  RoadLatticeNode destination
)

Delegate for returning the cost of traversing the edge between source and destination while pathfinding.

Details
Parameters
source
The source node.
destination
The destination node.

Neighbors

delegate IEnumerable< RoadLatticeNode > Neighbors(
  RoadLatticeNode node
)

Delegate for returning the neighbors of a RoadLatticeNode.

Details
Parameters
node
The node to return the neighbors of.