]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blobdiff - incl/bcar.hh
Keep underscore prefix for private members conv.
[hubacji1/bcar.git] / incl / bcar.hh
index 0d239c57179e8538242b782032b8f33252a5f53d..7302855583bf25002b4921c69eb9d94a022c5574 100644 (file)
@@ -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;