C# Класс SharpNav.NodePool

Link all nodes together. Store indices in hash map.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Clear ( ) : void

Reset all the data.

FindNode ( NavPolyId id ) : NavNode

Try to find a node.

GetNode ( NavPolyId id ) : NavNode

Try to find the node. If it doesn't exist, create a new node.

GetNodeAtIdx ( int idx ) : NavNode

Return a node at a certain index. If index is out-of-bounds, return null.

GetNodeIdx ( NavNode node ) : int

Gets the id of the node.

NodePool ( int maxNodes ) : System

Initializes a new instance of the NodePool class.

Описание методов

Clear() публичный метод

Reset all the data.
public Clear ( ) : void
Результат void

FindNode() публичный метод

Try to find a node.
public FindNode ( NavPolyId id ) : NavNode
id NavPolyId Node's id
Результат NavNode

GetNode() публичный метод

Try to find the node. If it doesn't exist, create a new node.
public GetNode ( NavPolyId id ) : NavNode
id NavPolyId Node's id
Результат NavNode

GetNodeAtIdx() публичный метод

Return a node at a certain index. If index is out-of-bounds, return null.
public GetNodeAtIdx ( int idx ) : NavNode
idx int Node index
Результат NavNode

GetNodeIdx() публичный метод

Gets the id of the node.
public GetNodeIdx ( NavNode node ) : int
node NavNode The node
Результат int

NodePool() публичный метод

Initializes a new instance of the NodePool class.
public NodePool ( int maxNodes ) : System
maxNodes int The maximum number of nodes that can be stored
Результат System