]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blobdiff - incl/bcar.hh
Add generate for gnuplot method and example code
[hubacji1/bcar.git] / incl / bcar.hh
index cf2020fbce5c1d5123a42e6245b2ca14b8024543..71e4f505c9a698352d330dc5e113740a4563b185 100644 (file)
@@ -86,6 +86,9 @@ public:
        /*! Return Euclidean distance to `p`. */
        double edist(Point const& p) const;
 
+       /*! Generate output for plotting with gnuplot. */
+       void gen_gnuplot_to(std::ostream& out);
+
        bool operator==(Point const& p);
        friend std::ostream& operator<<(std::ostream& out, Point const& p);
 };
@@ -459,6 +462,26 @@ public:
 
        /*! Next car position based on speed `sp` and steer `st`. */
        void next();
+
+       /*! Options for generating output for gnuplot. */
+       class GenPlotOpts {
+       public:
+               static bool LEFT;
+               static bool RIGHT;
+               static bool REAR;
+               static bool FRONT;
+               static bool FRAME;
+               static bool ARROW;
+               static bool CROSS;
+               static bool CAR;
+               static bool LEFT_MIRROR;
+               static bool RIGHT_MIRROR;
+               static bool MIRRORS;
+               static bool ALL;
+       };
+
+       /*! Generate output for plotting with gnuplot. */
+       void gen_gnuplot_to(std::ostream& out, GenPlotOpts const& opts);
 };
 
 } // namespace bcar