From: Jiri Vlasak Date: Wed, 19 Jan 2022 14:46:00 +0000 (+0100) Subject: Keep underscore prefix for private members conv. X-Git-Tag: v0.9.0~5^2~3 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/bcar.git/commitdiff_plain/afbeb2451c89aef0d334a91fb6ab1ff2e3dc3128 Keep underscore prefix for private members conv. --- diff --git a/incl/bcar.hh b/incl/bcar.hh index 0d239c5..7302855 100644 --- a/incl/bcar.hh +++ b/incl/bcar.hh @@ -21,8 +21,8 @@ class Line; class Point { private: - double x_ = 0.0; - double y_ = 0.0; + double _x = 0.0; + double _y = 0.0; public: Point(); Point(double x, double y); @@ -92,10 +92,10 @@ public: class Line { private: - Point b_; - Point e_; - Point i1_; - Point i2_; + Point _b; + Point _e; + Point _i1; + Point _i2; public: Line(Point const& fp, Point const& lp); @@ -147,7 +147,7 @@ public: /*! Store coordinates `x`, `y`, and heading `h`. */ class Pose : public virtual Point { private: - double h_ = 0.0; + double _h = 0.0; public: using Point::Point; Pose(double x, double y, double h); @@ -171,8 +171,8 @@ public: class PoseRange : public virtual Pose { private: - Pose bp_; - Pose ep_; + Pose _bp; + Pose _ep; void set_xyh(); public: PoseRange(Pose bp, Pose ep); @@ -200,11 +200,11 @@ public: */ class CarSize { private: - double curb_to_curb_ = 10.802166641822163; - double width_ = 1.945; // including mirrors - double wheelbase_ = 2.588; - double distance_to_front_ = 3.427; - double length_ = 4.084; + double _curb_to_curb = 10.802166641822163; + double _width = 1.945; // including mirrors + double _wheelbase = 2.588; + double _distance_to_front = 3.427; + double _length = 4.084; double _front_track = 1.511; public: /*! Get curb-to-curb distance. */ @@ -251,10 +251,10 @@ public: * Please, note that the method returns really _minimum turning radius_, * which is the distance from the rear axle center to the center of * left or right rotation given by the kinematics constrants, i.e. - * _wheelbase_ and _curb-to-curb_ distance. + * _wheelbase and _curb-to-curb_ distance. * - * Sometimes _minimum turning radius_ is not radius, not minimum, or not - * turning. In this method, _minimum turning radius_ is minimum turning + * Sometimes _minimum turning _radius is not radius, not minimum, or not + * turning. In this method, _minimum turning _radius is minimum turning * radius. */ double mtr() const; @@ -296,8 +296,8 @@ public: /*! Store car motion. */ class CarMove { private: - double speed_ = 0.0; - double steer_ = 0.0; + double _speed = 0.0; + double _steer = 0.0; public: /*! Get speed. */ double sp() const; diff --git a/incl/pslot.hh b/incl/pslot.hh index 33a1199..843d9f9 100644 --- a/incl/pslot.hh +++ b/incl/pslot.hh @@ -22,15 +22,15 @@ namespace bcar { */ class ParkingSlot { private: - double offset_ = 0.001; // to avoid collision during init - double parking_speed_ = -0.1; - unsigned int max_cusp_ = 10; - double delta_angle_to_slot_ = 0.001; - Point border_[4]; - Line entry_; - Line rear_; - Line curb_; - Line front_; + double _offset = 0.001; // to avoid collision during init + double _parking_speed = -0.1; + unsigned int _max_cusp = 10; + double _delta_angle_to_slot = 0.001; + Point _border[4]; + Line _entry; + Line _rear; + Line _curb; + Line _front; public: std::vector> _entries; /*! \brief Set parking slot. @@ -155,7 +155,7 @@ public: /*! \brief Recompute zero slot's `PoseRange` entry for `this`. * - * The _zero_ slot is the `ParkingSlot(Point(0.0, 0.0), 0.0, W, L);`. + * The _zero slot_ is the `ParkingSlot(Point(0.0, 0.0), 0.0, W, L);`. * * \param p Computed `PoseRange` entry. */ diff --git a/src/bcar.cc b/src/bcar.cc index 060ed15..b5446e0 100644 --- a/src/bcar.cc +++ b/src/bcar.cc @@ -13,32 +13,32 @@ Point::Point() { } -Point::Point(double x, double y) : x_(x), y_(y) +Point::Point(double x, double y) : _x(x), _y(y) { } double Point::x() const { - return this->x_; + return this->_x; } void Point::x(double x) { - this->x_ = x; + this->_x = x; } double Point::y() const { - return this->y_; + return this->_y; } void Point::y(double y) { - this->y_ = y; + this->_y = y; } double @@ -92,8 +92,8 @@ Point::on_right_side_of(Line const& li) const auto y1 = li.b().y(); auto x2 = li.e().x(); auto y2 = li.e().y(); - auto x3 = this->x_; - auto y3 = this->y_; + auto x3 = this->_x; + auto y3 = this->_y; if (sgn((x3 - x1) * (y2 - y1) - (y3 - y1) * (x2 - x1)) < 0.0) { return false; } else { @@ -104,8 +104,8 @@ Point::on_right_side_of(Line const& li) const void Point::translate(Point const& p) { - this->x_ += p.x(); - this->y_ += p.y(); + this->_x += p.x(); + this->_y += p.y(); } void @@ -125,16 +125,16 @@ void Point::reflect(Line const& li) { this->rotate(li.b(), -li.h()); - this->y_ -= li.b().y(); - this->y_ *= -1.0; - this->y_ += li.b().y(); + this->_y -= li.b().y(); + this->_y *= -1.0; + this->_y += li.b().y(); this->rotate(li.b(), li.h()); } double Point::edist(Point const& p) const { - return sqrt(pow(p.x() - this->x_, 2.0) + pow(p.y() - this->y_, 2.0)); + return sqrt(pow(p.x() - this->_x, 2.0) + pow(p.y() - this->_y, 2.0)); } bool @@ -150,48 +150,48 @@ operator<<(std::ostream& out, Point const& p) return out; } -Line::Line(Point const& b, Point const& e): b_(b), e_(e) +Line::Line(Point const& b, Point const& e): _b(b), _e(e) { } Point Line::b() const& { - return this->b_; + return this->_b; } Point Line::e() const& { - return this->e_; + return this->_e; } Point Line::m() const { - return Point((this->b_.x() + this->e_.x()) / 2.0, - (this->b_.y() + this->e_.y()) / 2.0); + return Point((this->_b.x() + this->_e.x()) / 2.0, + (this->_b.y() + this->_e.y()) / 2.0); } Point Line::i1() const& { - return this->i1_; + return this->_i1; } Point Line::i2() const& { - return this->i2_; + return this->_i2; } bool Line::intersects_with(Line const& li) { - auto x1 = this->b_.x(); - auto y1 = this->b_.y(); - auto x2 = this->e_.x(); - auto y2 = this->e_.y(); + auto x1 = this->_b.x(); + auto y1 = this->_b.y(); + auto x2 = this->_e.x(); + auto y2 = this->_e.y(); auto x3 = li.b().x(); auto y3 = li.b().y(); auto x4 = li.e().x(); @@ -208,18 +208,18 @@ Line::intersects_with(Line const& li) if (t < 0.0 || t > 1.0 || u < 0.0 || u > 1.0) { return false; } - this->i1_.x(x1 + t * (x2 - x1)); - this->i1_.y(y1 + t * (y2 - y1)); + this->_i1.x(x1 + t * (x2 - x1)); + this->_i1.y(y1 + t * (y2 - y1)); return true; } bool Line::intersects_with(Point const& c, double const r) { - auto x1 = this->b_.x(); - auto y1 = this->b_.y(); - auto x2 = this->e_.x(); - auto y2 = this->e_.y(); + auto x1 = this->_b.x(); + auto y1 = this->_b.y(); + auto x2 = this->_e.x(); + auto y2 = this->_e.y(); auto cx = c.x(); auto cy = c.y(); x2 -= cx; @@ -245,40 +245,40 @@ Line::intersects_with(Point const& c, double const r) iy1 += cy; double iy2 = (-D*dx - std::abs(dy)*sqrt(r*r * dr*dr - D*D)) / (dr*dr); iy2 += cy; - this->i1_.x(ix1); - this->i1_.y(iy1); - this->i2_.x(ix2); - this->i2_.y(iy2); + this->_i1.x(ix1); + this->_i1.y(iy1); + this->_i2.x(ix2); + this->_i2.y(iy2); return true; } double Line::len() const { - return this->b_.edist(this->e_); + return this->_b.edist(this->_e); } double Line::h() const { - return atan2(this->e_.y() - this->b_.y(), this->e_.x() - this->b_.x()); + return atan2(this->_e.y() - this->_b.y(), this->_e.x() - this->_b.x()); } std::ostream& operator<<(std::ostream& out, Line const& li) { - out << "[" << li.b_ << "," << li.e_ << "]"; + out << "[" << li._b << "," << li._e << "]"; return out; } -Pose::Pose(double x, double y, double h) : Point(x, y), h_(h) +Pose::Pose(double x, double y, double h) : Point(x, y), _h(h) { } double Pose::h() const { - return this->h_; + return this->_h; } void @@ -290,7 +290,7 @@ Pose::h(double h) while (h > +M_PI) { h -= 2 * M_PI; } - this->h_ = h; + this->_h = h; } void @@ -333,15 +333,15 @@ void PoseRange::set_xyh() { double clen = 10.0; - double bpbx = this->bp_.x() - clen * cos(this->bp_.h()); - double bpby = this->bp_.y() - clen * sin(this->bp_.h()); - double bpfx = this->bp_.x() + clen * cos(this->bp_.h()); - double bpfy = this->bp_.y() + clen * sin(this->bp_.h()); + double bpbx = this->_bp.x() - clen * cos(this->_bp.h()); + double bpby = this->_bp.y() - clen * sin(this->_bp.h()); + double bpfx = this->_bp.x() + clen * cos(this->_bp.h()); + double bpfy = this->_bp.y() + clen * sin(this->_bp.h()); Line li1(Point(bpbx, bpby), Point(bpfx, bpfy)); - double epbx = this->ep_.x() - clen * cos(this->ep_.h()); - double epby = this->ep_.y() - clen * sin(this->ep_.h()); - double epfx = this->ep_.x() + clen * cos(this->ep_.h()); - double epfy = this->ep_.y() + clen * sin(this->ep_.h()); + double epbx = this->_ep.x() - clen * cos(this->_ep.h()); + double epby = this->_ep.y() - clen * sin(this->_ep.h()); + double epfx = this->_ep.x() + clen * cos(this->_ep.h()); + double epfy = this->_ep.y() + clen * sin(this->_ep.h()); Line li2(Point(epbx, epby), Point(epfx, epfy)); li1.intersects_with(li2); this->x(li1.i1().x()); @@ -350,19 +350,19 @@ PoseRange::set_xyh() while (bh < 0.0) { bh += 2.0 * M_PI; } - this->bp_.h(bh); + this->_bp.h(bh); double eh = this->e(); while (eh < 0.0) { eh += 2.0 * M_PI; } - this->ep_.h(eh); + this->_ep.h(eh); this->h((this->b() + this->e()) / 2.0); } -PoseRange::PoseRange(Pose bp, Pose ep) : bp_(bp), ep_(ep) +PoseRange::PoseRange(Pose bp, Pose ep) : _bp(bp), _ep(ep) { - if (this->bp_ == this->ep_) { - this->set_pose(this->ep_); + if (this->_bp == this->_ep) { + this->set_pose(this->_ep); } else { this->set_xyh(); } @@ -376,48 +376,48 @@ PoseRange::PoseRange(double x, double y, double b, double e) Pose PoseRange::bp() const { - return this->bp_; + return this->_bp; } Pose PoseRange::ep() const { - return this->ep_; + return this->_ep; } double PoseRange::b() const { - return std::min(this->bp_.h(), this->ep_.h()); + return std::min(this->_bp.h(), this->_ep.h()); } double PoseRange::e() const { - return std::max(this->bp_.h(), this->ep_.h()); + return std::max(this->_bp.h(), this->_ep.h()); } void PoseRange::translate(Point const& p) { - this->bp_.translate(p); - this->ep_.translate(p); + this->_bp.translate(p); + this->_ep.translate(p); this->set_xyh(); } void PoseRange::rotate(Point const& c, double const angl) { - this->bp_.rotate(c, angl); - this->ep_.rotate(c, angl); + this->_bp.rotate(c, angl); + this->_ep.rotate(c, angl); this->set_xyh(); } void PoseRange::reflect(Line const& li) { - this->bp_.reflect(li); - this->ep_.reflect(li); + this->_bp.reflect(li); + this->_ep.reflect(li); this->set_xyh(); } @@ -432,61 +432,61 @@ operator<<(std::ostream& out, PoseRange const& p) double CarSize::ctc() const { - return this->curb_to_curb_; + return this->_curb_to_curb; } void CarSize::ctc(double ctc) { - this->curb_to_curb_ = ctc; + this->_curb_to_curb = ctc; } double CarSize::wb() const { - return this->wheelbase_; + return this->_wheelbase; } void CarSize::wb(double wb) { - this->wheelbase_ = wb; + this->_wheelbase = wb; } double CarSize::w() const { - return this->width_; + return this->_width; } void CarSize::w(double w) { - this->width_ = w; + this->_width = w; } double CarSize::len() const { - return this->length_; + return this->_length; } void CarSize::len(double len) { - this->length_ = len; + this->_length = len; } double CarSize::df() const { - return this->distance_to_front_; + return this->_distance_to_front; } void CarSize::df(double df) { - this->distance_to_front_ = df; + this->_distance_to_front = df; } double @@ -552,25 +552,25 @@ CarSize::perfect_parking_slot_len() const double CarMove::sp() const { - return this->speed_; + return this->_speed; } void CarMove::sp(double sp) { - this->speed_ = sp; + this->_speed = sp; } double CarMove::st() const { - return this->steer_; + return this->_steer; } void CarMove::st(double st) { - this->steer_ = st; + this->_steer = st; } bool diff --git a/src/pslot.cc b/src/pslot.cc index 1a0f323..1d84e28 100644 --- a/src/pslot.cc +++ b/src/pslot.cc @@ -11,88 +11,88 @@ namespace bcar { ParkingSlot::ParkingSlot(Point p, double h, double W, double L) : - border_{p, + _border{p, Point(p.x() + W * cos(h - M_PI / 2.0), p.y() + W * sin(h - M_PI / 2.0)), Point(p.x() + W * cos(h - M_PI / 2.0) + L * cos(h), p.y() + W * sin(h - M_PI / 2.0) + L * sin(h)), Point(p.x() + L * cos(h), p.y() + L * sin(h))}, - entry_(border_[0], border_[3]), - rear_(border_[0], border_[1]), - curb_(border_[1], border_[2]), - front_(border_[2], border_[3]) + _entry(_border[0], _border[3]), + _rear(_border[0], _border[1]), + _curb(_border[1], _border[2]), + _front(_border[2], _border[3]) { } ParkingSlot::ParkingSlot(double lrx, double lry, double rrx, double rry, double rfx, double rfy, double lfx, double lfy) : - border_{Point(lrx, lry), Point(rrx, rry), + _border{Point(lrx, lry), Point(rrx, rry), Point(rfx, rfy), Point(lfx, lfy)}, - entry_(border_[0], border_[3]), - rear_(border_[0], border_[1]), - curb_(border_[1], border_[2]), - front_(border_[2], border_[3]) + _entry(_border[0], _border[3]), + _rear(_border[0], _border[1]), + _curb(_border[1], _border[2]), + _front(_border[2], _border[3]) { } double ParkingSlot::len() const { - return this->entry_.len(); + return this->_entry.len(); } double ParkingSlot::w() const { - return this->rear_.len(); + return this->_rear.len(); } double ParkingSlot::lfx() const { - return this->border_[3].x(); + return this->_border[3].x(); } double ParkingSlot::lfy() const { - return this->border_[3].y(); + return this->_border[3].y(); } double ParkingSlot::lrx() const { - return this->border_[0].x(); + return this->_border[0].x(); } double ParkingSlot::lry() const { - return this->border_[0].y(); + return this->_border[0].y(); } double ParkingSlot::rrx() const { - return this->border_[1].x(); + return this->_border[1].x(); } double ParkingSlot::rry() const { - return this->border_[1].y(); + return this->_border[1].y(); } double ParkingSlot::rfx() const { - return this->border_[2].x(); + return this->_border[2].x(); } double ParkingSlot::rfy() const { - return this->border_[2].y(); + return this->_border[2].y(); } double @@ -128,79 +128,79 @@ ParkingSlot::rf() const Line ParkingSlot::entry() const { - return this->entry_; + return this->_entry; } Line ParkingSlot::rear() const { - return this->rear_; + return this->_rear; } Line ParkingSlot::curb() const { - return this->curb_; + return this->_curb; } Line ParkingSlot::front() const { - return this->front_; + return this->_front; } void ParkingSlot::set_parking_speed(double s) { - this->parking_speed_ = s; + this->_parking_speed = s; } unsigned int ParkingSlot::get_max_cusp() const { - return this->max_cusp_; + return this->_max_cusp; } void ParkingSlot::set_max_cusp(unsigned int m) { - this->max_cusp_ = m; + this->_max_cusp = m; } void ParkingSlot::set_delta_angle_to_slot(double d) { - this->delta_angle_to_slot_ = d; + this->_delta_angle_to_slot = d; } bool ParkingSlot::parallel() const { - return this->entry_.len() > this->rear_.len(); + return this->_entry.len() > this->_rear.len(); } bool ParkingSlot::right() const { - return this->border_[1].on_right_side_of(this->entry_); + return this->_border[1].on_right_side_of(this->_entry); } void ParkingSlot::swap_side() { - this->border_[1].rotate(this->border_[0], M_PI); - this->border_[2].rotate(this->border_[3], M_PI); - this->entry_ = Line(this->border_[0], this->border_[3]); - this->rear_ = Line(this->border_[0], this->border_[1]); - this->curb_ = Line(this->border_[1], this->border_[2]); - this->front_ = Line(this->border_[2], this->border_[3]); + this->_border[1].rotate(this->_border[0], M_PI); + this->_border[2].rotate(this->_border[3], M_PI); + this->_entry = Line(this->_border[0], this->_border[3]); + this->_rear = Line(this->_border[0], this->_border[1]); + this->_curb = Line(this->_border[1], this->_border[2]); + this->_front = Line(this->_border[2], this->_border[3]); } bool ParkingSlot::parked(BicycleCar const& c) const { - auto b_len = sizeof(this->border_) / sizeof(this->border_[0]); - std::vector b(this->border_, this->border_ + b_len); + auto b_len = sizeof(this->_border) / sizeof(this->_border[0]); + std::vector b(this->_border, this->_border + b_len); return c.lf().inside_of(b) && c.lr().inside_of(b) && c.rr().inside_of(b) && c.rf().inside_of(b); } @@ -208,18 +208,18 @@ ParkingSlot::parked(BicycleCar const& c) const bool ParkingSlot::collide(BicycleCar const& c) const { - return c.left().intersects_with(this->rear_) - || c.left().intersects_with(this->curb_) - || c.left().intersects_with(this->front_) - || c.rear().intersects_with(this->rear_) - || c.rear().intersects_with(this->curb_) - || c.rear().intersects_with(this->front_) - || c.right().intersects_with(this->rear_) - || c.right().intersects_with(this->curb_) - || c.right().intersects_with(this->front_) - || c.front().intersects_with(this->rear_) - || c.front().intersects_with(this->curb_) - || c.front().intersects_with(this->front_); + return c.left().intersects_with(this->_rear) + || c.left().intersects_with(this->_curb) + || c.left().intersects_with(this->_front) + || c.rear().intersects_with(this->_rear) + || c.rear().intersects_with(this->_curb) + || c.rear().intersects_with(this->_front) + || c.right().intersects_with(this->_rear) + || c.right().intersects_with(this->_curb) + || c.right().intersects_with(this->_front) + || c.front().intersects_with(this->_rear) + || c.front().intersects_with(this->_curb) + || c.front().intersects_with(this->_front); } std::vector @@ -230,13 +230,13 @@ ParkingSlot::drive_in_slot(BicycleCar c) assert(c.len() < this->len()); assert(c.w() < this->w()); std::vector path; - path.reserve(this->max_cusp_ + 2); + path.reserve(this->_max_cusp + 2); path.push_back(c); unsigned int cusp = 0; - while (cusp < this->max_cusp_ + 1) { + while (cusp < this->_max_cusp + 1) { if (this->parked(c)) { - if (cusp < this->max_cusp_) { - this->max_cusp_ = cusp; + if (cusp < this->_max_cusp) { + this->_max_cusp = cusp; } path.push_back(c); return path; @@ -270,15 +270,15 @@ ParkingSlot::drive_of_slot(BicycleCar c) assert(c.w() < this->w()); assert(this->parked(c)); std::vector path; - path.reserve(this->max_cusp_ + 2); + path.reserve(this->_max_cusp + 2); path.push_back(c); unsigned int cusp = 0; - auto b_len = sizeof(this->border_) / sizeof(this->border_[0]); - std::vector b(this->border_, this->border_ + b_len); - while (cusp < this->max_cusp_ + 1) { + auto b_len = sizeof(this->_border) / sizeof(this->_border[0]); + std::vector b(this->_border, this->_border + b_len); + while (cusp < this->_max_cusp + 1) { if (!c.lf().inside_of(b) && !c.rf().inside_of(b)) { - if (cusp < this->max_cusp_) { - this->max_cusp_ = cusp; + if (cusp < this->_max_cusp) { + this->_max_cusp = cusp; } path.push_back(c); return path; @@ -318,32 +318,32 @@ ParkingSlot::fe(BicycleCar c) double gd = 0.0; double dd = 0.0; double radi = 0.0; - if (this->parking_speed_ < 0) { + if (this->_parking_speed < 0) { gd = c.df(); - c.h(this->rear_.h() + M_PI); + c.h(this->_rear.h() + M_PI); c.sp(1.0); radi = c.iradi(); } else { gd = c.dr(); - c.h(this->rear_.h()); + c.h(this->_rear.h()); c.sp(-1.0); radi = c.ofradi(); } - c.x(this->entry_.m().x() + gd * cos(this->rear_.h())); - c.y(this->entry_.m().y() + gd * sin(this->rear_.h())); + c.x(this->_entry.m().x() + gd * cos(this->_rear.h())); + c.y(this->_entry.m().y() + gd * sin(this->_rear.h())); Point cc(0.0, 0.0); if (this->right()) { cc = c.ccl(); } else { cc = c.ccr(); } - this->rear_.intersects_with(cc, radi); - dd = std::min(this->border_[0].edist(this->rear_.i1()), - this->border_[0].edist(this->rear_.i2())); + this->_rear.intersects_with(cc, radi); + dd = std::min(this->_border[0].edist(this->_rear.i1()), + this->_border[0].edist(this->_rear.i2())); c.st(0.0); c.sp(c.sp() * dd); c.next(); - c.sp(this->parking_speed_); + c.sp(this->_parking_speed); return PoseRange(c.x(), c.y(), c.h(), c.h()); } bool swapped = false; @@ -352,19 +352,19 @@ ParkingSlot::fe(BicycleCar c) swapped = true; } c.h(this->h()); - double clen = -this->offset_ + this->len() - c.df(); + double clen = -this->_offset + this->len() - c.df(); double cw = c.w() / 2.0; c.x(this->lrx() + clen * cos(c.h()) + cw * cos(c.h() + M_PI / 2.0)); c.y(this->lry() + clen * sin(c.h()) + cw * sin(c.h() + M_PI / 2.0)); c.set_max_steer(); - assert(this->parking_speed_ < 0.0); - c.sp(this->parking_speed_); + assert(this->_parking_speed < 0.0); + c.sp(this->_parking_speed); auto const rc = c.rf(); - this->curb_.intersects_with(rc, c.len()); + this->_curb.intersects_with(rc, c.len()); double max_to_slot; auto const& rr = c.rr(); - auto const& i1 = this->curb_.i1(); - auto const& i2 = this->curb_.i2(); + auto const& i1 = this->_curb.i1(); + auto const& i2 = this->_curb.i2(); if (rr.edist(i1) < rr.edist(i2)) { max_to_slot = rr.min_angle_between(rc, i1); } else { @@ -373,8 +373,8 @@ ParkingSlot::fe(BicycleCar c) std::vector starts; double a_to_slot = 0.0; while (a_to_slot < max_to_slot) { - a_to_slot += this->delta_angle_to_slot_; - c.rotate(rc, this->delta_angle_to_slot_); + a_to_slot += this->_delta_angle_to_slot; + c.rotate(rc, this->_delta_angle_to_slot); starts.push_back(c); } for (auto s: starts) { @@ -395,7 +395,7 @@ ParkingSlot::fe(BicycleCar c) PoseRange p(c1, c2); if (swapped) { this->swap_side(); - p.reflect(this->entry_); + p.reflect(this->_entry); } return p; } @@ -404,9 +404,9 @@ PoseRange ParkingSlot::recompute_entry(PoseRange p) { p.rotate(Point(0.0, 0.0), this->h()); - p.translate(this->border_[0]); + p.translate(this->_border[0]); if (!this->right()) { - p.reflect(this->entry_); + p.reflect(this->_entry); } return p; } @@ -415,10 +415,10 @@ std::ostream& operator<<(std::ostream& o, ParkingSlot const& s) { o << "["; - o << s.border_[0] << ","; - o << s.border_[1] << ","; - o << s.border_[2] << ","; - o << s.border_[3]; + o << s._border[0] << ","; + o << s._border[1] << ","; + o << s._border[2] << ","; + o << s._border[3]; o << "]"; return o; }