Class LevelGridNode Extends GridNodeBase

Public

Describes a single node for the LayerGridGraph.

Works almost the same as a grid node, except that it also stores to which layer the connections go to

Public Methods

AddPartialConnection (node, cost, isOutgoing, isIncoming)

Add a connection from this node to the specified node.

ClearConnections (alsoReverse)

Remove all connections between this node and other nodes.

Deserializes the node data from a byte array.

Which layer a grid connection goes to.

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

Adjacent grid node in the specified direction.

True if the node has a connection to an adjecent node in the specified direction.

LevelGridNode ([...])
Open (path, pathNodeIndex, gScore)

Open the node.

Removes any connection from this node to the specified node.

Removes all grid connections from this node.

Serialized the node data to a byte array.

SetConnectionValue (dir, value)

Set which layer a grid connection goes to.

SetPosition (position)

Public Static Methods

ClearGridGraph (graphIndex, graph)
GetGridGraph (graphIndex)
SetGridGraph (graphIndex, graph)

Public Variables

HasAnyGridConnections

True if this node has any grid connections.

Public
HasConnectionsToAllAxisAlignedNeighbours

True if the node has grid connections to all its 4 axis-aligned neighbours.

Public
HasConnectionsToAllEightNeighbours

True if the node has grid connections to all its 8 neighbours.

Public
LayerCoordinateInGrid

Layer coordinate of the node in the grid.

Public
gridConnections
Public

Public Static Variables

AllConnectionsMask
Public Static
AxisAlignedConnectionsMask
Public Static
ConnectionMask
Public Static
ConnectionStride
Public Static
MaxLayerCount

Maximum number of layers the layered grid graph supports.

Public Static
NoConnection
Public Static

Inherited Public Members

Area

Connected component that contains the node.

Public
ClearCustomConnections (alsoReverse)

Same as ClearConnections, but does not clear grid connections, only custom ones (e.g added by AddConnection or a NodeLink component)

Closest point on the surface of this node to the point p.

Connect (lhs, rhs, cost, directionality=…)

Adds a connection between two nodes.

True if this node contains a connection to the given node.

ContainsPoint (point)

Checks if point is inside the node when seen from above.

Checks if point is inside the node in graph space.

CoordinatesInGrid

The X and Z coordinates of the node in the grid.

Public
DecodeVariantPosition (pathNodeIndex, fractionAlongEdge)

The position of the path node during the search.

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

Destroy ()

Destroys the node.

Destroyed
Public
DestroyedNodeIndex
Public Static
Disconnect (lhs, rhs)

Removes the connection between two nodes.

Flags

Holds various bitpacked variables.

Public
GetConnections (action, [...])

Calls the delegate with all connections from...

GetPortal (other, left, right, [backwards])

Add a portal from this node to the specified node.

Graph

Graph which this node belongs to.

Public
GraphIndex

Graph which contains this node.

Public
InvalidGraphIndex
Public Static
InvalidNodeIndex
Public Static
MaxGraphIndex

Max number of graphs-1.

Public Static
MaxHierarchicalNodeIndex
Public Static
MaxTagIndex

Max number of tags - 1.

Public Static
NodeInGridIndex

The index of the node in the grid.

Public
NodeInGridIndexLayerOffset
Public Static
NodeIndex

Internal unique index.

Public
NormalizePoint (worldPoint)

Transforms a world space point to a normalized point on this node's surface.

Converts from a delta (dx, dz) to a neighbour direction.

OpenAtPoint (path, pathNodeIndex, position, gScore)

Open the node at a specific point.

The connection opposite the given one.

Penalty

Penalty cost for walking on this node.

Public

Projects the given point onto the plane of this node's surface.

A random point on the surface of the node.

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

Inform the system that the node's connectivity has changed.

The surface area of the node in square world units.

Tag

Node tag.

Public
TmpWalkable

Temporary variable used internally when updating the graph.

Public
UnNormalizePoint (normalizedPointOnSurface)

Transforms a normalized point on this node's surface to a world space point.

Walkable

True if the node is traversable.

Public
WalkableErosion

Stores walkability before erosion is applied.

Public
XCoordinateInGrid

X coordinate of the node in the grid.

Public
ZCoordinateInGrid

Z coordinate of the node in the grid.

Public
connections

Custon non-grid connections from this node.

Public
position

Position of the node in world space.

Public

Private/Protected Members

DiagonalConnectionsMask
Internal Static
HierarchicalNodeIndex

Hierarchical Node that contains this node.

Internal
IsHierarchicalNodeDirty

Some internal bookkeeping.

Internal
MaxNeighbours
Private Static
NodeInGridIndexMask
Protected Static
PathNodeVariants

How many path node variants should be created for each node.

Internal

Removes a connection from the internal grid connections, not the list of custom connections.

TemporaryFlag1

Temporary flag for internal purposes.

Internal
TemporaryFlag2

Temporary flag for internal purposes.

Internal
_gridGraphs
Private Static
flags

Bitpacked field holding several pieces of data.

Protected
gridFlags
Protected
gridGraphs
Protected Static
nodeInGridIndex

Bitfield containing the x and z coordinates of the node as well as the layer (for layered grid graphs).

Protected
offsetToDirection

Converts from dx + 3*dz to a neighbour direction.

Internal Static Readonly