Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::shared_ptr<App::Node>> AStar::findPath(std::vector<std::shared_ptr<App::Node>> nodes, std::shared_ptr<App::Node> start, std::shared_ptr<App::Node> end)
- {
- std::shared_ptr<NodeWrapper> current;
- //jádro algoritmu, celé zakomentované
- //...
- std::vector<std::shared_ptr<NodeWrapper>> way = current->getWay();
- // hydrating path from node wrappers
- auto path = std::vector<std::shared_ptr<App::Node>>(2);
- path[0] = start;
- path[1] = end;
- return path;
- }
Advertisement
Add Comment
Please, Sign In to add comment