C# Class SharpNav.NodePool

Link all nodes together. Store indices in hash map.
Exibir arquivo Open project: Robmaister/SharpNav Class Usage Examples

Public Methods

Method 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 method

Reset all the data.
public Clear ( ) : void
return void

FindNode() public method

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

GetNode() public method

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

GetNodeAtIdx() public method

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

GetNodeIdx() public method

Gets the id of the node.
public GetNodeIdx ( NavNode node ) : int
node NavNode The node
return int

NodePool() public method

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