Stores temporary node data for a single pathfinding request.
More...
Stores temporary node data for a single pathfinding request.
Every node (GraphNode) has one PathNode per thread used by default. Some path handlers use more than one PathNode per node, for example the CooperativePathHandler.
It stores e.g G score, H score and other temporary variables needed for path calculation, but which are not part of the graph structure.
- See also
- Pathfinding.PathHandler
-
https://en.wikipedia.org/wiki/A*_search_algorithm
|
uint | cost [get, set] |
|
uint | F [get] |
| F score. More...
|
|
bool | flag1 [get, set] |
| Use as temporary flag during pathfinding. More...
|
|
bool | flag2 [get, set] |
| Use as temporary flag during pathfinding. More...
|
|
uint | G [get, set] |
| G score, cost to get to this node. More...
|
|
uint | H [get, set] |
| H score, estimated cost to get to to the target. More...
|
|
◆ UpdateG()
void UpdateG |
( |
Path |
path | ) |
|
◆ CostMask
const uint CostMask = (1U << 28) - 1U |
|
private |
Cost uses the first 28 bits.
◆ Flag1Mask
◆ Flag1Offset
const int Flag1Offset = 28 |
|
private |
◆ Flag2Mask
◆ Flag2Offset
const int Flag2Offset = 29 |
|
private |
◆ flags
Bitpacked variable which stores several fields.
Backing field for the G score.
Backing field for the H score.
◆ heapIndex
Index of the node in the binary heap.
The open list in the A* algorithm is backed by a binary heap. To support fast 'decrease key' operations, the index of the node is saved here.
◆ node
Reference to the actual graph node.
◆ parent
Parent node in the search tree.
◆ pathID
The path request (in this thread, if multithreading is used) which last used this node.
◆ cost
F score.
H score + G score
◆ flag1
Use as temporary flag during pathfinding.
Pathfinders (only) can use this during pathfinding to mark nodes. When done, this flag should be reverted to its default state (false) to avoid messing up other pathfinding requests.
This is used among other things for marking goal nodes to enable very fast checking of if a node is a goal node or not.
◆ flag2
Use as temporary flag during pathfinding.
Pathfinders (only) can use this during pathfinding to mark nodes. When done, this flag should be reverted to its default state (false) to avoid messing up other pathfinding requests.
G score, cost to get to this node.
H score, estimated cost to get to to the target.
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Core/PathHandler.cs