- this->c2x_bc().p.x = f.x();
- this->c2x_bc().p.y = f.y();
- this->c2x_bc().r.c = cos(f.h());
- this->c2x_bc().r.s = sin(f.h());
- for (auto &o: this->c2_obstacles()) {
- if (c2PolytoPoly(
- &this->c2_bc(), &this->c2x_bc(),
- &o, NULL
- )) {
- return std::make_tuple(true, 0, 0);
- }
- }
- unsigned int i = 0;
- for (auto n: this->tmp_steered_) {
- this->c2x_bc().p.x = n.x();
- this->c2x_bc().p.y = n.y();
- this->c2x_bc().r.c = cos(n.h());
- this->c2x_bc().r.s = sin(n.h());
- for (auto &o: this->c2_obstacles()) {
- if (c2PolytoPoly(
- &this->c2_bc(), &this->c2x_bc(),
- &o, NULL
- )) {
- return std::make_tuple(true, i, 0);
- }
- }
- i++;
- }
- return std::make_tuple(false, 0, 0);
+ this->c2_bc_.count = 4;
+ this->c2_bc_.verts[0].x = this->bc_.lfx();
+ this->c2_bc_.verts[0].y = this->bc_.lfy();
+ this->c2_bc_.verts[1].x = this->bc_.lrx();
+ this->c2_bc_.verts[1].y = this->bc_.lry();
+ this->c2_bc_.verts[2].x = this->bc_.rrx();
+ this->c2_bc_.verts[2].y = this->bc_.rry();
+ this->c2_bc_.verts[3].x = this->bc_.rfx();
+ this->c2_bc_.verts[3].y = this->bc_.rfy();