cheshirekow  v0.1.0
draw_opts.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
26 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_DRAWOPTS_H_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_DRAWOPTS_H_
28 
29 #include <bitset>
30 
31 namespace mpblocks {
32 namespace dubins {
33 namespace curves_eigen {
34 
36 struct DrawOpts {
37  Cairo::RefPtr<Cairo::Pattern> patL;
38  Cairo::RefPtr<Cairo::Pattern> patR;
39  Cairo::RefPtr<Cairo::Pattern> patS;
40  Cairo::RefPtr<Cairo::Pattern> patPath;
41  Cairo::RefPtr<Cairo::Context> ctx;
42 
43  bool extra;
46  double dashOffExtra;
47  double dashOffPath;
48 
49  bool drawBalls;
50  unsigned int whichSpec;
51  std::bitset<8> solnBits;
52  std::bitset<6> drawBits;
54 
56  std::vector<double> dash;
57 
58  DrawOpts() : dash(2) {
59  drawBalls = true;
60  extra = true;
61  useDashExtra = true;
62  useDashPath = false;
63  dash[0] = 0.1;
64  dash[1] = 0.1;
65  dashOffExtra = 0;
66  dashOffPath = 0.1;
67  }
68 };
69 
70 } // curves_eigen
71 } // dubins
72 } // mpblocks
73 
74 
75 
76 
77 #endif // QUERY_H_
Cairo::RefPtr< Cairo::Pattern > patR
Definition: draw_opts.h:38
std::bitset< 6 > drawBits
which variants to draw of the solution (6 bit means draw the min and no others)
Definition: draw_opts.h:53
std::bitset< 8 > solnBits
if not bits are set, then draw the min solution
Definition: draw_opts.h:51
Cairo::RefPtr< Cairo::Context > ctx
Definition: draw_opts.h:41
bool drawBalls
whether or not to draw balls
Definition: draw_opts.h:49
Cairo::RefPtr< Cairo::Pattern > patPath
Definition: draw_opts.h:40
Cairo::RefPtr< Cairo::Pattern > patL
Definition: draw_opts.h:37
unsigned int whichSpec
which constraint spec to draw
Definition: draw_opts.h:50
encapsulates patterns for drawing
Definition: draw_opts.h:36
Cairo::RefPtr< Cairo::Pattern > patS
Definition: draw_opts.h:39