2 * SPDX-FileCopyrightText: 2021 Jiri Vlasak <jiri.vlasak.2@cvut.cz>
4 * SPDX-License-Identifier: GPL-3.0-only
16 #define INIT_V vector<M> V;
17 #define P(W) V.push_back(M(#W)); V.back().o.W = true;
24 bcar::BicycleCar::GenPlotOpts o;
28 this->c.gen_gnuplot_to(this->f, this->o);
36 M(std::string fn) : fn(fn)
38 this->f.open(this->fn);
41 M(M const& m) : fn(m.fn), c(m.c), o(m.o)
43 this->f.open(this->fn);
50 friend void swap(M& f, M& t)
68 gpl_slot(bcar::ParkingSlot& s, std::string fn)
70 if (fn.compare("") == 0) {
81 gen_pl_script(std::vector<M>& ms, std::string with_slot)
86 f << "#!/usr/bin/gnuplot" << endl;
87 f << "set size ratio -1" << endl;
90 f << " '" << m.fn << "'" << " w l,";
92 if (with_slot.compare("") != 0) {
93 f << " '" << with_slot << "' w l";
96 f << "pause -1" << endl;
107 bcar::ParkingSlot s(bcar::Point(0, 0), 0, 2.5, 6);
111 s.fe(bcar::BicycleCar());
120 m.c = s._entries.front().front();
121 m.c.sp(m.c.sp() * -1.0);
122 m.c.st(m.c.st() * -1.0);
124 for (unsigned int i = 0; i < STEPS; i++) {
129 gen_pl_script(V, sn);