Class GridNode Extends GridNodeBase

Public

Node used for the GridGraph.

Public Methods

AddPartialConnection (node, cost, isOutgoing, isIncoming)

Add a connection from this node to the specified node.

Public
ClearConnections (alsoReverse)

Remove all connections between this node and other nodes.

Public
DeserializeNode (ctx)

Deserializes the node data from a byte array.

Public
GetAllConnectionInternal ()

Bitpacked int containing all 8 grid connections.

Public
GetConnections<T> (action, data, connectionFilter)

Calls the delegate with all connections from or to this node, and passes a custom data value to the delegate.

Public
GetNeighbourAlongDirection (direction)

Adjacent grid node in the specified direction.

Public
GetPortal (other, left, right)

Add a portal from this node to the specified node.

Public
GridNode ()
Public
GridNode (astar)
Public
HasConnectionInDirection (dir)

True if the node has a connection in the specified direction.

Public
Open (path, pathNodeIndex, gScore)

Open the node.

Public
RemovePartialConnection (node)

Removes any connection from this node to the specified node.

Public
ResetConnectionsInternal ()

Disables all grid connections from this node.

Public
SerializeNode (ctx)

Serialized the node data to a byte array.

Public
SetAllConnectionInternal (connections)

Sets the state of all grid connections.

Public
SetConnectionInternal (dir, value)

Enables or disables a connection in a specified direction on the graph.

Public

Public Static Methods

ClearGridGraph (graphIndex, graph)
Public Static
FilterDiagonalConnections (conns, neighbours, cutCorners)

Filters diagonal connections based on the non-diagonal ones to prevent corner cutting and similar things.

Public Static
GetGridGraph (graphIndex)
Public Static
SetGridGraph (graphIndex, graph)
Public Static

Public Variables

EdgeNode

Work in progress for a feature that required info about which nodes were at the border of the graph.

Public
HasAnyGridConnections
Public
HasConnectionsToAllAxisAlignedNeighbours
Public
HasConnectionsToAllEightNeighbours
Public

Inherited Public Members

AddPartialConnection (node, cost, isOutgoing, isIncoming)

Add a connection from this node to the specified node.

Public
Area

Connected component that contains the node.

Public
ClearConnections (alsoReverse)

Remove all connections between this node and other nodes.

Public
ClearCustomConnections (alsoReverse)

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

Public
ClosestPointOnNode (p)

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

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

Adds a connection between two nodes.

Public Static
ContainsOutgoingConnection (node)

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

Public
ContainsPoint (point)

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

Public
ContainsPoint (point)

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

Public
ContainsPointInGraphSpace (point)

Checks if point is inside the node in graph space.

Public
DecodeVariantPosition (pathNodeIndex, fractionAlongEdge)

The position of the path node during the search.

Public
DeserializeReferences (ctx)

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

Public
Destroy ()

Destroys the node.

Public
Destroyed
Public
DestroyedNodeIndex
Public Static
Disconnect (lhs, rhs)

Removes the connection between two nodes.

Public Static
Flags

Holds various bitpacked variables.

Public
GetConnections (action, connectionFilter=…)

Calls the delegate with all connections from this node.

Public
GetConnections<T> (action, data, connectionFilter)

Calls the delegate with all connections from or to this node, and passes a custom data value to the delegate.

Public
GetConnectionsWithData<T> (node, data)
Public
GetGizmoHashCode ()

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

Public
Graph

Graph which this node belongs to.

Public
GraphIndex

Graph which contains this node.

Public
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.

Public
Open (path, pathNodeIndex, gScore)

Open the node.

Public
OpenAtPoint (path, pathNodeIndex, position, gScore)

Open the node at a specific point.

Public
OppositeConnectionDirection (dir)

The connection oppositie the given one.

Public Static
Penalty

Penalty cost for walking on this node.

Public
ProjectOnSurface (point)

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

Public
RandomPointOnSurface ()

A random point on the surface of the node.

Public
RemovePartialConnection (node)

Removes any connection from this node to the specified node.

Public
SerializeReferences (ctx)

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

Public
SetConnectivityDirty ()

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

Public
SurfaceArea ()

The surface area of the node in square world units.

Public
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.

Public
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

GridFlagsAxisAlignedConnectionMask
Private Static
GridFlagsConnectionBit0
Private Static
GridFlagsConnectionMask
Private Static
GridFlagsConnectionOffset
Private Static
GridFlagsEdgeNodeMask
Private Static
GridFlagsEdgeNodeOffset
Private Static
HierarchicalNodeIndex

Hierarchical Node that contains this node.

Internal
InternalGridFlags

Internal use only.

Internal
IsHierarchicalNodeDirty

Some internal bookkeeping.

Internal
NodeInGridIndexMask
Protected Static
PathNodeVariants

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

Internal
RemoveGridConnection (node)

Removes a connection from the internal grid connections.

Protected
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
nodeInGridIndex

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

Protected

Deprecated Members

GetConnectionInternal (dir)

True if the node has a connection in the specified direction.

Public