Class GraphNode

Public Abstract

Base class for all nodes.

Public Methods

AddConnection (node, cost)
Public Abstract
ClearConnections (alsoReverse)

Remove all connections from this node.

Public Abstract
ContainsConnection (node)

Checks if this node has a connection to the specified node.

Public
DeserializeNode (ctx)
Public
DeserializeReferences (ctx)

Used to deserialize references to other nodes e.g connections.

Public
FloodFill (stack, region)
Public
GetConnections (action)

Calls the delegate with all connections from this node.

Public Abstract
GetGizmoHashCode ()

Hash code used for checking if the gizmos need to be updated.

Public
GetPortal (other, left, right, backwards)

Add a portal from this node to the specified node.

Public
Open (path, pathNode, handler)

Open the node.

Public Abstract
RandomPointOnSurface ()

A random point on the surface of the node.

Public
RecalculateConnectionCosts ()

Recalculates all connection costs from this node.

Public
RemoveConnection (node)
Public Abstract
SerializeNode (ctx)
Public
SerializeReferences (ctx)

Used to serialize references to other nodes e.g connections.

Public
SurfaceArea ()

The surface area of the node in square world units.

Public
UpdateRecursiveG (path, pathNode, handler)
Public

Public Variables

Area

Connected component that contains the node.

Public
Destroyed
Public
Flags

Holds various bitpacked variables.

Public
Graph

Graph which this node belongs to.

Public
GraphIndex

Graph which contains this node.

Public
MaxAreaIndex
Public
MaxGraphIndex

Max number of graphs-1.

Public
NodeIndex

Internal unique index.

Public
Penalty

Penalty cost for walking on this node.

Public
position

Position of the node in world space.

Public
Tag

Node tag.

Public
Walkable

True if the node is traversable.

Public

Private/Protected Members

Destroy ()

Destroys the node.

Package
DestroyedNodeIndex
Private
flags

Bitpacked field holding several pieces of data.

Protected
FlagsAreaMask

Mask of area bits.

Private
FlagsAreaOffset

Start of area bits.

Private
FlagsGraphMask

Mask of graph index bits.

Private
FlagsGraphOffset

Start of graph index bits.

Private
FlagsTagMask

Mask of tag bits.

Private
FlagsTagOffset

Start of tag bits.

Private
FlagsWalkableMask

Mask of the walkable bit.

Private
FlagsWalkableOffset

Position of the walkable bit.

Private
GraphNode (astar)

Constructor for a graph node.

Protected
nodeIndex

Internal unique index.

Private
NodeIndexMask
Private
penalty

Penalty cost for walking on this node.

Private
TemporaryFlag1

Temporary flag for internal purposes.

Package
TemporaryFlag1Mask
Private
TemporaryFlag2

Temporary flag for internal purposes.

Package
TemporaryFlag2Mask
Private