Klamp't  0.9.0
ViewPlot.h
1 #ifndef VIEW_PLOT_H
2 #define VIEW_PLOT_H
3 
4 #include <KrisLibrary/GLdraw/drawextra.h>
5 #include <KrisLibrary/GLdraw/GLColor.h>
6 #include <deque>
7 #include <vector>
8 #include <string>
9 using namespace std;
10 
14 class ViewPlot
15 {
16  public:
17  ViewPlot();
18  void AddCurve(vector<double>& ys);
19  void AddPoint(double x,double y,int curve=0);
20  void AutoXRange();
21  void AutoYRange();
22  void AutoErase();
23  void DrawGL();
24 
25  bool xMonotone,autoXRange,autoYRange,autoErase;
26  bool drawBound,drawPlotArea,drawXRangeBottom,drawXRangeTop,drawYRangeLeft,drawYRangeRight;
27  string xlabel,ylabel;
28  int x,y,width,height;
29  GLDraw::GLColor boundColor,plotAreaColor,axisColor;
30  vector<deque<pair<double,double> > > curves;
31  vector<GLDraw::GLColor> curveColors;
32  double xmin,xmax;
33  double ymin,ymax;
34 };
35 
36 #endif
37 
An OpenGL x-y auto-scrolling plot. Used in SimTest (Interface/SimTestGUI.h) to draw sensor data...
Definition: ViewPlot.h:14