20 const std::vector<lib::TrappyLine>& lines,
21 const std::vector<lib::TrappyCircle>& circles,
22 const std::vector<lib::Hill>& hills,
23 unsigned short num_of_flyers)
25 for (
auto& target : targets)
targets_.push_back(
Point(target.GetPoint()));
27 for (
auto& line : lines) {
28 std::pair<std::size_t, std::size_t> indexes;
29 std::pair<lib::Target, lib::Target> points = line.GetTargets();
30 for (std::size_t i = 0; i < targets.size(); ++i)
31 if (targets[i] == points.first)
33 else if (targets[i] == points.second)
38 for (
auto& circle : circles)
42 for (
auto& hill : hills) {
43 std::vector<Point> vertexes;
44 for (
auto& vertex : hill.GetVertices()) vertexes.push_back(
Point(vertex));
80 std::vector<std::size_t> optimal_way,
81 const std::vector<std::shared_ptr<PathWayNode>>& nodes);
Круговое препятствие
Definition obstacles.h:58
Многоугольное препятствие
Definition obstacles.h:100
Definition trajectory.h:10
std::vector< CircleObstacle > circles_
Definition trajectory.h:65
std::vector< std::pair< std::size_t, std::size_t > > forbidden_lines_
Definition trajectory.h:62
std::vector< lib::Segment > GetTrajectoryPart(std::vector< std::size_t > optimal_way, const std::vector< std::shared_ptr< PathWayNode > > &nodes)
Подсчет части траектории
TrajectoryCalculator(const std::vector< lib::Target > &targets, const std::vector< lib::TrappyLine > &lines, const std::vector< lib::TrappyCircle > &circles, const std::vector< lib::Hill > &hills, unsigned short num_of_flyers)
Инициализирует экземпляр класса TrajectoryCalculator.
Definition trajectory.h:19
std::vector< lib::Segment > GetTrajectory()
Возвращает траекторию
Definition trajectory.h:52
std::vector< PolygonObstacle > polys_
Definition trajectory.h:68
void CalculateTrajectory()
Рассчитывает траекторию
Definition trajectory.cpp:12
std::vector< Point > targets_
Definition trajectory.h:59
unsigned short number_of_flyers_
Definition trajectory.h:56
std::vector< lib::Segment > trajectory_
Definition trajectory.h:71
Этот файл включает в себя все lib objects.
Definition adjacency_matrix.cpp:7
Точка с геометрическими связями
Definition obstacles.h:46