Class PathNode

Public

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.

Public Methods

UpdateG (path)
Public

Public Variables

cost
Public
F

F score.

Public
flag1

Use as temporary flag during pathfinding.

Public
flag2

Use as temporary flag during pathfinding.

Public
G

G score, cost to get to this node.

Public
H

H score, estimated cost to get to to the target.

Public
heapIndex

Index of the node in the binary heap.

Public
node

Reference to the actual graph node.

Public
parent

Parent node in the search tree.

Public
pathID

The path request (in this thread, if multithreading is used) which last used this node.

Public

Private/Protected Members

CostMask

Cost uses the first 28 bits.

Private
Flag1Mask
Private
Flag1Offset

Flag 1 is at bit 28.

Private
Flag2Mask
Private
Flag2Offset

Flag 2 is at bit 29.

Private
flags

Bitpacked variable which stores several fields.

Private
g

Backing field for the G score.

Private
h

Backing field for the H score.

Private