C# Class SharpNav.NodePool

Link all nodes together. Store indices in hash map.
Afficher le fichier Open project: Robmaister/SharpNav Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

Clear() public méthode

Reset all the data.
public Clear ( ) : void
Résultat void

FindNode() public méthode

Try to find a node.
public FindNode ( NavPolyId id ) : NavNode
id NavPolyId Node's id
Résultat NavNode

GetNode() public méthode

Try to find the node. If it doesn't exist, create a new node.
public GetNode ( NavPolyId id ) : NavNode
id NavPolyId Node's id
Résultat NavNode

GetNodeAtIdx() public méthode

Return a node at a certain index. If index is out-of-bounds, return null.
public GetNodeAtIdx ( int idx ) : NavNode
idx int Node index
Résultat NavNode

GetNodeIdx() public méthode

Gets the id of the node.
public GetNodeIdx ( NavNode node ) : int
node NavNode The node
Résultat int

NodePool() public méthode

Initializes a new instance of the NodePool class.
public NodePool ( int maxNodes ) : System
maxNodes int The maximum number of nodes that can be stored
Résultat System