87 {
89 for (auto& point : circle.GetTangentPoints()) {
90 bool is_unique = true;
91 for (std::size_t i = 0; i <
graph_.
nodes.size(); ++i) {
93 is_unique = false;
94 break;
95 }
96 }
97 if (is_unique == false) continue;
98 PathWayNode* new_node =
new PathWayNode(point,
graph_.
nodes.size(),
true);
99 new_node->circle_ptr = std::make_shared<CircleObstacle>(circle);
101 for (std::size_t i = 0; i <
graph_.
nodes.size() - 1; ++i) {
107 } else if (new_node->point ==
112 }
113 }
114 }
115 for (
auto& poly :
polys_) {
116 std::vector<Point> vertexes = poly.GetVertexes();
117 for (std::size_t i = 0; i < vertexes.size(); ++i) {
118 PathWayNode* new_node =
119 new PathWayNode(vertexes[i],
graph_.
nodes.size(),
true);
120 for (std::size_t j = 0; j < poly.GetTangentPoints().size(); ++j) {
121 if (poly.GetTangentPoints()[j] == vertexes[i])
122 new_node->point = poly.GetTangentPoints()[j];
123 }
124 new_node->poly_ptr = std::make_shared<PolygonObstacle>(poly);
126
127
128 if (i != 0)
132 new_node->point));
133 if (i == vertexes.size() - 1)
136 new_node->number,
139 new_node->point));
140 for (auto& tangent_point : poly.GetTangentPoints()) {
141 if (tangent_point != new_node->point) continue;
142 for (
auto& node :
graph_.nodes) {
143 if (*tangent_point.another_tangent_point != node->point) continue;
146 }
147 }
148 }
149 }
150}
double DistanceBetweenPoints(const Point &first_point, const Point &second_point)
Находит расстояние между двумя мат. точками
Definition point.cpp:27