A* Pathfinding Project  3.6.8
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
EuclideanEmbedding Class Reference

Implements heuristic optimizations. More...

Detailed Description

Implements heuristic optimizations.

See Also
heuristic-opt
Game AI Pro - Pathfinding Architecture Optimizations by Steve Rabin and Nathan R. Sturtevant
A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here

Public Member Functions

uint GetHeuristic (int nodeIndex1, int nodeIndex2)
 
uint GetRandom ()
 Simple linear congruential generator.
 
void OnDrawGizmos ()
 
void RecalculateCosts ()
 
void RecalculatePivots ()
 

Public Attributes

bool dirty = false
 
HeuristicOptimizationMode mode
 
Transform pivotPointRoot
 All children of this transform will be used as pivot points.
 
int seed
 
int spreadOutCount = 1
 

Private Member Functions

void EnsureCapacity (int index)
 
void GetClosestWalkableNodesToChildrenRecursively (Transform tr, List< GraphNode > nodes)
 

Private Attributes

uint[] costs = new uint[8]
 Costs laid out as n*[int],n*[int],n*[int] where n is the number of pivot points.
 
System.Object lockObj = new object()
 
int maxNodeIndex = 0
 
int pivotCount = 0
 
GraphNode[] pivots = null
 
uint ra = 12820163
 
uint rc = 1140671485
 
uint rval = 0
 

Member Function Documentation

void EnsureCapacity ( int  index)
private
void GetClosestWalkableNodesToChildrenRecursively ( Transform  tr,
List< GraphNode nodes 
)
private
uint GetHeuristic ( int  nodeIndex1,
int  nodeIndex2 
)
uint GetRandom ( )

Simple linear congruential generator.

See Also
http://en.wikipedia.org/wiki/Linear_congruential_generator
void OnDrawGizmos ( )
void RecalculateCosts ( )
void RecalculatePivots ( )

Member Data Documentation

uint [] costs = new uint[8]
private

Costs laid out as n*[int],n*[int],n*[int] where n is the number of pivot points.

Each node has n integers which is the cost from that node to the pivot node. They are at around the same place in the array for simplicity and for cache locality.

cost(nodeIndex, pivotIndex) = costs[nodeIndex*pivotCount+pivotIndex]

bool dirty = false
System.Object lockObj = new object()
private
int maxNodeIndex = 0
private
int pivotCount = 0
private
Transform pivotPointRoot

All children of this transform will be used as pivot points.

GraphNode [] pivots = null
private
uint ra = 12820163
private
uint rc = 1140671485
private
uint rval = 0
private
int seed
int spreadOutCount = 1

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