Class PathNode

Public

Stores temporary node data for a single pathfinding request.

Every node has one PathNode per thread used. 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 Static
Flag1Mask
Private Static
Flag1Offset

Flag 1 is at bit 28.

Private Static
Flag2Mask
Private Static
Flag2Offset

Flag 2 is at bit 29.

Private Static
flags

Bitpacked variable which stores several fields.

Private
g

Backing field for the G score.

Private
h

Backing field for the H score.

Private