-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute_planner.h
33 lines (26 loc) · 939 Bytes
/
route_planner.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ROUTE_PLANNER_H
#define ROUTE_PLANNER_H
#include <iostream>
#include <vector>
#include <string>
#include "route_model.h"
class RoutePlanner {
public:
RoutePlanner(RouteModel &model, float start_x, float start_y, float end_x, float end_y);
// Add public variables or methods declarations here.
float GetDistance() const {return distance;}
void AStarSearch();
// The following methods have been made public so we can test them individually.
void AddNeighbors(RouteModel::Node *current_node);
float CalculateHValue(RouteModel::Node const *node);
std::vector<RouteModel::Node> ConstructFinalPath(RouteModel::Node *);
RouteModel::Node *NextNode();
private:
// Add private variables or methods declarations here.
std::vector<RouteModel::Node*> open_list;
RouteModel::Node *start_node;
RouteModel::Node *end_node;
float distance = 0.0f;
RouteModel &m_Model;
};
#endif