]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blobdiff - bcar/incl/bcar.hh
Add arc len computation method to point
[hubacji1/iamcar2.git] / bcar / incl / bcar.hh
index 658db31042b6bbc3ae116cd92ce36421f3315ea2..ebe655724287e9e5963eaf9df749f84ae56491e1 100644 (file)
@@ -92,6 +92,12 @@ public:
        /*! Return Euclidean distance to `p`. */
        double edist(Point const& p) const;
 
+       /*! Return length of arc between two points when radius is kwown.
+        *
+        * \see https://math.stackexchange.com/questions/1595872/arclength-between-two-points-on-a-circle-not-knowing-theta
+        */
+       double arc_len(Point const& p, double r);
+
        /*! Generate output for plotting with gnuplot. */
        void gen_gnuplot_to(std::ostream& out);
 
@@ -171,7 +177,7 @@ public:
        void h(double h);
 
        /*! Set pose (`x`, `y`, and `h`.) */
-       void set_pose(Pose const& p);
+       void set_pose_to(Pose const& p);
 
        void rotate(Point const& c, double const angl);
 
@@ -330,6 +336,9 @@ public:
         * \see https://www.ma.rhul.ac.uk/SRBparking
         */
        double perfect_parking_slot_len() const;
+
+       /*! Set parameters to what car. */
+       void become(std::string const what);
 };
 
 /*! Store car motion. */