plplot_graph.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 #ifndef _PLPLOT_GRAPH_H_
33 #define _PLPLOT_GRAPH_H_
34 
35 #ifdef __GNUC__
36 #define DEPRECATED(func) func __attribute__ ((deprecated))
37 #elif defined(_MSC_VER)
38 #define DEPRECATED(func) __declspec(deprecated) func
39 #else
40 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
41 #define DEPRECATED(func) func
42 #endif
43 
44 #include <plplot.h>
45 #include <iostream>
46 #include <string>
47 
48 #include <stdlib.h>
49 #include <math.h>
50 
51 #include "types_declaration.h"
52 
53 using namespace std;
54 
57 
59 {
60  public:
61  uint id;
62  double*x;
63  double*y;
64  uint Lsize;
66 
67  double xmin;
68  double xmax;
69  double ymin;
70  double ymax;
72 
73  string title;
74  string x_label;
75  string y_label;
76 
78 
80 
81  double ex_timestamp;
82 
83  singlePlot(uint id_);
84 
85  void SetColor(plcolors color_);
86 
87  void SetXLinspace(double min,double max,uint size);
88 
89  void SetEnv(double xmin_,double xmax_,double ymin_,double ymax_);
90 
91  void DynamicScaleEnv(std::vector<t_posePtr>& path,plshape shape_);
92 
93  void Env();
94 
95  void SetLabel(string x_label_,string y_label_,string title_);
96 
97  void Label();
98 
99  void SetSize(uint size);
100 
101  void Plot();
102 };
103 
104 typedef boost::shared_ptr<singlePlot> singlePlotPtr;
105 
106 class plSpace
107 {
108  public:
109 
110  bool draw;
111 
112  vector<singlePlotPtr> plotVector;
113  vector<singlePlotPtr> plotVector_2;
114  vector<singlePlotPtr> plotVector_3;
115  vector<singlePlotPtr> plotVector_4;
116 
117  plSpace(uint width,uint height, bool draw_=true);
118 
119  ~plSpace();
120 
121  void Plot();
122 
123  void SetThirdPlot(uint pos,vector<t_posePtr>& p,double (func)(t_pose&),plcolors color, double Dt);
124 
125  void SetFourthPlot(uint pos,vector<t_posePtr>& p,double (func)(t_pose&),plcolors color, double Dt);
126 
127  void SetSecondaryPlot(uint pos,vector<t_posePtr>& p,double (func)(t_pose&),plcolors color, double Dt);
128 
129  void SetMember_UseTimestamp(uint pos,vector<t_posePtr>& p,double (func)(t_pose&),plcolors color,pair<double,double> limits,string Xlabel,string Ylabel,string title, double Dt);
130 
131  void SetRunTime(uint pos,vector<double>& rt,plcolors color,string title,double tmax, double max);
132 
133  void SetMember(uint pos,vector<t_posePtr>& pt,double(func)(s_pose&),plcolors color,double Vmax,double Vmin,string Xlabel,string Ylabel,string title, double max);
134 
135  void SetLinearSpeed(uint pos,vector<t_posePtr>& pt,plcolors color,double tmax, double max);
136 
137  void SetPath(uint pos,std::vector<t_posePtr>& path,string title);
138 
139  void SetSecondaryPath(uint pos,std::vector<t_posePtr>& path,plcolors color);
140  private:
141 
142 };
143 
144 #endif
plshape shape
Definition: plplot_graph.h:77
vector< singlePlotPtr > plotVector
Definition: plplot_graph.h:112
bool do_not_draw
Definition: plplot_graph.h:71
double xmin
Definition: plplot_graph.h:67
uint allocated_size
Definition: plplot_graph.h:65
string y_label
Definition: plplot_graph.h:75
plshape
Definition: plplot_graph.h:56
double * x
Definition: plplot_graph.h:62
Generic types declaration for use in the lidar_egomotion algorithm.
double ex_timestamp
Definition: plplot_graph.h:81
double * y
Definition: plplot_graph.h:63
vector< singlePlotPtr > plotVector_3
Definition: plplot_graph.h:114
string title
Definition: plplot_graph.h:73
vector< singlePlotPtr > plotVector_2
Definition: plplot_graph.h:113
plcolors color
Definition: plplot_graph.h:79
double ymax
Definition: plplot_graph.h:70
double ymin
Definition: plplot_graph.h:69
string x_label
Definition: plplot_graph.h:74
boost::shared_ptr< singlePlot > singlePlotPtr
Definition: plplot_graph.h:104
plcolors
Definition: plplot_graph.h:55
bool draw
Definition: plplot_graph.h:110
double xmax
Definition: plplot_graph.h:68
vector< singlePlotPtr > plotVector_4
Definition: plplot_graph.h:115


lidar_egomotion
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:10