/Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids/ClothoidAsyPlot.hxx Source File

Clothoids: /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids/ClothoidAsyPlot.hxx Source File
Clothoids
ClothoidAsyPlot.hxx
1/*--------------------------------------------------------------------------*\
2 | |
3 | Copyright (C) 2017 |
4 | |
5 | , __ , __ |
6 | /|/ \ /|/ \ |
7 | | __/ _ ,_ | __/ _ ,_ |
8 | | \|/ / | | | | \|/ / | | | |
9 | |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
10 | /| /| |
11 | \| \| |
12 | |
13 | Enrico Bertolazzi and Marco Frego |
14 | Dipartimento di Ingegneria Industriale |
15 | Universita` degli Studi di Trento |
16 | email: enrico.bertolazzi@unitn.it |
17 | email: marco.frego@unitn.it |
18 | |
19\*--------------------------------------------------------------------------*/
20
21namespace G2lib {
22
23 using std::string;
24 using std::ofstream;
25
26 class AsyPlot {
27 public:
28 AsyPlot( string filename, bool showAxes );
29 ~AsyPlot();
30
31 void
32 drawClothoid(
33 ClothoidCurve const& c,
34 string const & penna="black",
35 real_type offset = 0
36 ) const;
37
38 void dot( real_type x, real_type y, string const & penna="black" ) const;
39 void triangle(Triangle2D const & t, string const & penna="black" ) const;
40
41 void
42 drawRect(
43 real_type x0, real_type y0,
44 real_type x1, real_type y1,
45 real_type x2, real_type y2,
46 real_type x3, real_type y3,
47 string const & penna="black"
48 ) const;
49
50 void
51 drawLine(
52 real_type x0, real_type y0,
53 real_type x1, real_type y1,
54 string const & penna="black"
55 ) const;
56
57 void
58 label(
59 string const & text,
60 real_type x,
61 real_type y,
62 string const & placement = "",
63 string const & penna = "black"
64 ) const;
65
66 void
67 displayAxes(
68 string const & labX,
69 string const & labY,
70 real_type xmin,
71 real_type xmax,
72 real_type ymin,
73 real_type ymax
74 ) const;
75
76 private:
77 mutable ofstream file;
78 string filename;
79 bool showAxes;
80 bool openFile();
81 bool closeFile();
82 void initFile();
83 void displayAxes() const;
84 void compileFile();
85 };
86}
Definition ClothoidAsyPlot.hxx:26
Definition Clothoid.hxx:48
Definition Triangle2D.hxx:37
Definition BBox.cc:42
double real_type
real type number
Definition Clothoids.hh:79