* @brief get the next node on the A* frontier to explore (estimated to be closest to the goal), mark it as visited, and return it */
| 110 | * @brief get the next node on the A* frontier to explore (estimated to be closest to the goal), mark it as visited, and return it |
| 111 | */ |
| 112 | uint16_t GetNextPath() |
| 113 | { |
| 114 | uint16_t result = Path2Nodes->nextNodeIndex; |
| 115 | if (result == PathNode::InvalidIndex) { |
| 116 | return result; |
| 117 | } |
| 118 | |
| 119 | Path2Nodes->nextNodeIndex = PathNodes[result].nextNodeIndex; |
| 120 | PathNodes[result].nextNodeIndex = VisitedNodes->nextNodeIndex; |
| 121 | VisitedNodes->nextNodeIndex = result; |
| 122 | return result; |
| 123 | } |
| 124 | |
| 125 | /** the number of in-use nodes in path_nodes */ |
| 126 | uint32_t gdwCurNodes; |