-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplanner.h
More file actions
37 lines (31 loc) · 1.01 KB
/
planner.h
File metadata and controls
37 lines (31 loc) · 1.01 KB
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
34
35
36
#ifndef _PLANNER_H_
#define _PLANNER_H_
#include <vector>
#include <optional>
#include <utility>
#include <memory>
#include "vect2.h"
#include "cityLayout.h"
#include "goal.h"
class NoSample{};
class Planner {
CityLayout city;
double growthSpeed;
bool highwayMode;
std::vector<size_t> quarter;
size_t quarterEdge;
size_t nextHighway(size_t edge) const;
std::vector<std::pair<double, double>> getQuarterConstraints(size_t node) const;
std::optional<double> getExtensionAngle(size_t node);
bool isValidSample(size_t node);
std::optional<size_t> roadPlanningSample();
std::pair<double, double> applyExtensionGoals(size_t node, double base_angle);
public:
std::vector<std::unique_ptr<SampleGoal>> sampleGoals;
std::vector<std::unique_ptr<ExtensionGoal>> extensionGoals;
std::vector<std::unique_ptr<RoadConstraint>> roadConstraints;
Planner(CityLayout city, double growthSpeed);
inline const CityLayout &getCity() const {return city; }
void step();
};
#endif