![]() |
Dungeon Architect
17.0.0
|
Link all nodes together. Store indices in hash map. More...
Public Member Functions | |
| NodePool (int maxNodes, int hashSize) | |
| Initializes a new instance of the NodePool class. More... | |
| void | Clear () |
| Reset all the data. More... | |
| Node | FindNode (int id) |
| Try to find a node. More... | |
| Node | GetNode (int id) |
| Try to find the node. If it doesn't exist, create a new node. More... | |
| int | GetNodeIdx (Node node) |
| Gets the id of the node. More... | |
| Node | GetNodeAtIdx (int idx) |
| Return a node at a certain index. If index is out-of-bounds, return null. More... | |
Link all nodes together. Store indices in hash map.
Definition at line 11 of file NodePool.cs.
| SharpNav.NodePool.NodePool | ( | int | maxNodes, |
| int | hashSize | ||
| ) |
Initializes a new instance of the NodePool class.
| maxNodes | The maximum number of nodes that can be stored |
| hashSize | The maximum number of elements in the hash table |
Definition at line 23 of file NodePool.cs.
| void SharpNav.NodePool.Clear | ( | ) |
Reset all the data.
Definition at line 35 of file NodePool.cs.
| Node SharpNav.NodePool.FindNode | ( | int | id | ) |
Try to find a node.
| id | Node's id |
Definition at line 46 of file NodePool.cs.
| Node SharpNav.NodePool.GetNode | ( | int | id | ) |
Try to find the node. If it doesn't exist, create a new node.
| id | Node's id |
Definition at line 62 of file NodePool.cs.
| Node SharpNav.NodePool.GetNodeAtIdx | ( | int | idx | ) |
Return a node at a certain index. If index is out-of-bounds, return null.
| idx | Node index |
Definition at line 110 of file NodePool.cs.
| int SharpNav.NodePool.GetNodeIdx | ( | Node | node | ) |
Gets the id of the node.
| node | The node |
Definition at line 91 of file NodePool.cs.