21 typedef std::vector<Node *> NodeArray;
22 typedef std::vector<NodeArray> NavMesh;
35 std::vector<Node*> _open_list;
36 std::vector<Node*> _closed_list;
40 void identify_neighbors(
Node *nd);
41 int calc_cost_frm_src(
Node *nd);
42 int calc_heuristic(
Node *nd);
43 void calc_node_score(
Node *nd);
44 bool is_diagonal_node(
Node *nd);
46 void add_to_olist(
Node *nd);
47 void remove_from_olist();
49 void add_to_clist(
Node *nd);
50 void remove_from_clist(
int r,
int c);
53 void find_path(
Node *src_node,
Node *dest_node);
This class is used to assign the nodes on the mesh.
This class implements pathfinding using A* algorithm.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Node * find_in_mesh(NavMesh nav_mesh, LVecBase3 pos, int grid_size)
This function allows the user to pass a position and it returns the corresponding node on the navigat...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.