Vibes C++ API
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups
vibes.h
Go to the documentation of this file.
1 ///
2 /// \file vibes.h
3 /// \brief Vibes C++ API Header
4 /// \author Vincent Drevelle, Jeremy Nicolas
5 /// \date 2013-2014
6 /// \version 0.2.0beta
7 ///
8 
9 #ifndef VIBES_CPP_API_H
10 #define VIBES_CPP_API_H
11 
12 /*! \mainpage
13  *
14  * This is VIBes C++ API documentation. It is generated from source code.
15  * The "Modules" section of this documentation lists the VIBes commands thematically.
16  *
17  */
18 
19 ///
20 /// Vibes API configuration defines (def or undef as needed)
21 ///
22 
23 /// Generate "vibesFunctionName(arg1,arg2,argN,...)" macros for each Vibes function,
24 /// to allow Matlab style variadic calls with properies.
25 /// Also defines the "vibesParams(...)" macro to help specifying parameters.
26 /// Undef this if you don't want to define macros
27 #define VIBES_GENERATE_vibesXXX_MACROS
28 
29 /// Verbose debugging functions (logs to standard output), only useful for library devs
30 #undef VIBES_DEBUG_API
31 
32 
33 ///
34 /// Includes
35 ///
36 
37 #include <vector>
38 #include <string>
39 #include <map>
40 #include <sstream>
41 
42 #ifdef VIBES_DEBUG_API
43 #include <iostream>
44 #define VIBES_DEBUG(i) std::cout << "VibesDebug " << __FILE__ << "(" << __LINE__ << ") : " << i << std::endl;
45 #else
46 #define VIBES_DEBUG(i)
47 #endif
48 
49 /** \ingroup connection params figure drawing */
50 namespace vibes {
51 
52  /** @defgroup params VIBes properties key-value classes
53  *
54  * @{
55  */
56 
57  class Params; // Forward declaration of Params
58  /*!
59  * A class to hold any type supported by vibes properties system, an to provide JSON serialization
60  */
61  class Value {
62  enum value_type_enum{
63  vt_none, vt_integer, vt_string, vt_decimal, vt_array, vt_object
64  } _type;
65 
66  union {
67  int _integer;
68  double _decimal;
69  const Params *_object;
70  };
71  std::string _string;
72  std::vector<Value> _array;
73 
74  public:
75  Value() : _type(vt_none) {}
76  Value(int i) : _integer(i), _type(vt_integer) {}
77  Value(const double &d) : _decimal(d), _type(vt_decimal) {}
78  Value(const std::string &s) : _string(s), _type(vt_string) {}
79  Value(const char *s) : _string(s), _type(vt_string) {}
80  Value(const std::vector<Value> &a) : _array(a), _type(vt_array) {}
81  template <typename T> Value(const std::vector<T> &v) : _array(v.begin(),v.end()), _type(vt_array) {}
82  /*explicit */Value(const Params &p) : _object(&p), _type(vt_object) {}
83  bool empty() {return (_type == vt_none);}
84  std::string toJSONString() const;
85  };
86 
87  /*!
88  * A static array that can be cast into \class Value
89  *
90  * This enables easy intialisation of array of parameters with the brace
91  * syntax.
92  * Example:
93  *\code{.cpp}
94  * (Vec<int,4>){1,2,3,4}
95  *\endcode
96  */
97  template<typename T, int N>
98  struct Vec {
99  T _data[N];
100  operator Value() {return Value(std::vector<Value>(_data,_data+N));}
101  };
102 
103 
104  /*!
105  * \name Useful types for colors, vectors and points
106  */
107  ///@{
108  typedef Vec<int,3> RGB; ///< A RGB triplet [0..255]
109  typedef Vec<int,4> RGBA; ///< A RGBA triplet [0..255]
110  typedef Vec<double,2> Vec2d; ///< A 2D floating point vector
111  typedef Vec<double,3> Vec3d; ///< A 3D floating point vector
112  typedef Vec<double,4> Vec4d; ///< A 4D floating point vector
113 
114  ///@}
115 
116  /*!
117  * A class that holds a list of parameters, and provides JSON serialization
118  */
119  class Params {
120  class NameHelper;
121  typedef std::map<std::string, Value> KeyValueMap;
122  KeyValueMap _values;
123  public:
124  Params() {}
125  template<typename T> Params(const std::string & name, const T &p) {_values[name] = p;}
126  Value & operator[](const std::string &key) {return _values[key];}
127  Value pop(const std::string &key, const Value &value_not_found = Value());
128  NameHelper operator, (const std::string &s);
129  Params& operator& (const Params &p) { for(KeyValueMap::const_iterator it = p._values.begin(); it != p._values.end(); ++it) _values[it->first] = it->second; return *this;}
130  std::size_t size() const { return _values.size(); }
131  std::string toJSON() const;
132  };
133 
134  /*!
135  * A helper class for comma-separated key-value input of parameters
136  */
138  public:
139  Params &_params;
140  std::string _name;
141  NameHelper(Params & list, const std::string & name) : _params(list), _name(name) {}
142  Params & operator, (const Value &value) { _params[_name] = value; return _params; }
144  // Conversion of a singleton parameter to a color (for use with macros)
145  operator Params&() {_params["format"] = _name; return _params;}
146  #endif
147  };
148 
149  inline Params::NameHelper Params::operator, (const std::string &s) { return NameHelper(*this, s); }
150 
151 
152  /** @} */ // end of group params
153 
154 
155  // Convenience drawing functions with color selection
156 #define VIBES_COLOR_PARAM_NAME "format"
157 #define VIBES_FUNC_COLOR_PARAM_1(func_name, T1, a)
158  void func_name(T1 a, Params params);
159  inline void func_name(T1 a,
160  const std::string &format=std::string(), Params params=Params()) {func_name(a,(params,VIBES_COLOR_PARAM_NAME,format));}
161 #define VIBES_FUNC_COLOR_PARAM_2(func_name, T1, a, T2, b)
162  void func_name(T1 a, T2 b, Params params);
163  inline void func_name(T1 a, T2 b,
164  const std::string &format=std::string(), Params params=Params()) {func_name(a,b,(params,VIBES_COLOR_PARAM_NAME,format));}
165 #define VIBES_FUNC_COLOR_PARAM_3(func_name, T1, a, T2, b, T3, c)
166  void func_name(T1 a, T2 b, T3 c, Params params);
167  inline void func_name(T1 a, T2 b, T3 c,
168  const std::string &format=std::string(), Params params=Params()) {func_name(a,b,c,(params,VIBES_COLOR_PARAM_NAME,format));}
169 #define VIBES_FUNC_COLOR_PARAM_4(func_name, T1, a, T2, b, T3, c, T4, d)
170  void func_name(T1 a, T2 b, T3 c, T4 d, Params params);
171  inline void func_name(T1 a, T2 b, T3 c, T4 d,
172  const std::string &format=std::string(), Params params=Params()) {func_name(a,b,c,d,(params,VIBES_COLOR_PARAM_NAME,format));}
173 #define VIBES_FUNC_COLOR_PARAM_5(func_name, T1, a, T2, b, T3, c, T4, d, T5, e)
174  void func_name(T1 a, T2 b, T3 c, T4 d, T5 e, Params params);
175  inline void func_name(T1 a, T2 b, T3 c, T4 d, T5 e,
176  const std::string &format=std::string(), Params params=Params()) {func_name(a,b,c,d,e,(params,VIBES_COLOR_PARAM_NAME,format));}
177 #define VIBES_FUNC_COLOR_PARAM_6(func_name, T1, a, T2, b, T3, c, T4, d, T5, e, T6, f)
178  void func_name(T1 a, T2 b, T3 c, T4 d, T5 e, T6 f, Params params);
179  inline void func_name(T1 a, T2 b, T3 c, T4 d, T5 e, T6 f,
180  const std::string &format=std::string(), Params params=Params()) {func_name(a,b,c,d,e,f,(params,VIBES_COLOR_PARAM_NAME,format));}
181 
182 
183  /** @defgroup connection Starting and ending VIBes
184  *
185  * @brief Functions for establishing connection with the VIBes viewer application.
186  *
187  * VIBes drawing is performed by the VIBes viewer application. The viewer has to be
188  * running for VIBes graphics to be displayed.
189  * - Before using any VIBes commands in your application, the VIBes \c beginDrawing()
190  * command has to be executed once (e.g. during the application initialization).
191  * - When your application is done with drawing, the \c endDrawing() command has to
192  * be called (e.g. when the application quits).
193  * @{
194  */
195 
196  /// Start VIBes in connected mode: connects to the VIBes viewer.
197  void beginDrawing();
198  /// Start VIBes in file saving mode. All commands are saved to the specified file.
199  void beginDrawing(const std::string &fileName);
200 
201  /// Close connection to the viewer or the drawing file.
202  void endDrawing();
203 
204  /** @} */ // end of group connection
205 
206 
207  /** @defgroup figure Figure and view management
208  *
209  * @brief VIBes drawings are performed on figures. These functions provide a way to create,
210  * save and manipulate figures.
211  * @{
212  */
213 
214  ///
215  /// @name Figure management
216  /// @{
217 
218  /// Create a new figure named \a figureName
219  void newFigure(const std::string &figureName = std::string());
220 
221  /// Clears the contents of the figure \a figureName, or the current figure if argument is given.
222  void clearFigure(const std::string &figureName = std::string());
223 
224  /// Close the figure named \a figureName, or the current figure if no argument is given.
225  void closeFigure(const std::string &figureName = std::string());
226 
227  /// Export to \a fileName the contents of the figure \a figureName. If \a figureName is omitted,
228  /// operation applies to current figure. If \a fileName is omitted, a "Save As" window will be displayed.
229  void saveImage(const std::string &fileName = std::string(), const std::string &figureName = std::string());
230 
231  /// Select \a figureName as the current figure. Drawing operations will then apply to \a figureName.
232  void selectFigure(const std::string &figureName);
233 
234  /// @}
235  /// @name View settings
236  /// @{
237 
238  /// Set axes limits to the bounding box of the drawing
239  void axisAuto(Params params=Params());
240 
241  /// Specify the rectangle to be displayed: Lower-left corner (\a x_lb, \a y_lb) and a upper-right corner (\a x_ub, \a y_ub).
242  void axisLimits(const double &x_lb, const double &x_ub, const double &y_lb, const double &y_ub, Params params=Params());
243 
244  /// @}
245  ///
246  ///
247 
248  /** @} */ // end of group figure
249 
250 
251 
252  /** @defgroup drawing Drawing and editing functions
253  *
254  * @brief Functions to draw primitives on Vibes figures, group objects, modify graphics
255  * attributes and remove objects from a figure.
256  * @{
257  */
258 
259  ///
260  /// @name Primitive drawing functions
261  /// @brief Functions for drawing boxes, ellipses, lines. By default, all these functions
262  /// operate on the current figure. The optional agument \a format provides quick
263  /// graphics attribute setup. Additional parameters can be provided in the optional
264  /// last argument \a params.
265  /// @{
266 
267  /// Draw a 2-D box with a left lower corner at (\a x_lb, \a y_lb) and a right upper corner at (\a x_ub, \a y_ub)
268  VIBES_FUNC_COLOR_PARAM_4(drawBox,const double &,x_lb, const double &,x_ub, const double &,y_lb, const double &,y_ub)
269  /// Draw a N-D box from a list of \a bounds in the form (x_lb, x_ub, y_lb, y_ub, z_lb, z_ub, ...)
270  VIBES_FUNC_COLOR_PARAM_1(drawBox,const std::vector<double> &,bounds)
271 
272  /// Draw an ellipse centered at (\a cx, \a cy), with semi-major and minor axes \a a and \a b, and rotated by \a rot degrees
273  VIBES_FUNC_COLOR_PARAM_5(drawEllipse,const double &,cx, const double &,cy, const double &,a, const double &,b, const double &,rot)
274  /// Draw a 2-D confidence ellipse centered at (\a cx, \a cy), with covariance \a sxx, \a sxy, \a syy and scale \a K
275  VIBES_FUNC_COLOR_PARAM_6(drawConfidenceEllipse,const double &,cx, const double &,cy,
276  const double &,sxx, const double &,sxy, const double &,syy,
277  const double &,K/*=3.0*/)
278  /// Draw a N-D confidence ellipse centered at \a center, with covariance in \a cov and scale \a K
279  VIBES_FUNC_COLOR_PARAM_3(drawConfidenceEllipse,const std::vector<double> &,center,
280  const std::vector<double> &,cov,
281  const double &,K/*=3.0*/)
282  /// Draw a circle centered at (\a cx, \a cy), with radius \a r
283  VIBES_FUNC_COLOR_PARAM_3(drawCircle,const double &,cx, const double &,cy, const double &,r)
284 
285  /// Draw a list of N-D rectangles from a list of list of \a bounds in the form ((x_lb_1, x_ub_1, y_lb_1, ...), (x_lb_2, x_ub_2, y_lb_2, ...), ...)
286  VIBES_FUNC_COLOR_PARAM_1(drawBoxes,const std::vector< std::vector<double> > &,bounds)
287  /// Computes and draw the union of a list of N-D rectangles, from a list of list of \a bounds in the form ((x_lb_1, x_ub_1, y_lb_1, ...), (x_lb_2, x_ub_2, y_lb_2, ...), ...)
288  VIBES_FUNC_COLOR_PARAM_1(drawBoxesUnion,const std::vector< std::vector<double> > &,bounds)
289 
290  /// Draw a N-D line from the list of coordinates \a points in the form ((x_1, y_1, z_1, ...), (x_2, y_2, z_2, ...), ...)
291  VIBES_FUNC_COLOR_PARAM_1(drawLine,const std::vector< std::vector<double> > &,points)
292  /// Draw a 2-D line from the list of abscissae \a x and the list of ordinates \a y
293  VIBES_FUNC_COLOR_PARAM_2(drawLine,const std::vector<double> &,x, const std::vector<double> &,y)
294 
295  /// @}
296  /// @name Objects grouping and deletion
297  /// @{
298 
299  /// Create a new group with the specified \a name.
300  VIBES_FUNC_COLOR_PARAM_1(newGroup,const std::string &,name)
301 
302  /// Clear the contents of the group \a groupName in figure \a figureName.
303  void clearGroup(const std::string &figureName, const std::string &groupName);
304  /// Clear the contents of the group \a groupName in current figure.
305  void clearGroup(const std::string &groupName);
306 
307  /// Delete the named graphical object \a objectName from figure \a figureName.
308  void removeObject(const std::string &figureName, const std::string &objectName);
309  /// Delete the named graphical object \a objectName from current figure.
310  void removeObject(const std::string &objectName);
311 
312  /// @}
313  /// @name Object properties modification
314  /// @{
315 
316  /// Set the property \a key to the provided \a value for the named object \a objectName in figure \a figureName.
317  void setObjectProperty(const std::string &figureName, const std::string &objectName, const std::string &key, const Value &value);
318  /// Set the property \a key to the provided \a value for the named object \a objectName in current figure.
319  void setObjectProperty(const std::string &objectName, const std::string &key, const Value &value);
320 
321  /// Assign \a properties to the named object \a objectName in figure \a figureName.
322  void setObjectProperties(const std::string &figureName, const std::string &objectName, const Params &properties);
323  /// Assign \a properties to the named object \a objectName in current figure.
324  void setObjectProperties(const std::string &objectName, const Params &properties);
325 
326  /// @}
327  ///
328  ///
329 
330  /** @} */ // end of group drawing
331 
332 
333  /** @addtogroup figure
334  * @{
335  */
336 
337  ///
338  /// @name Figure properties modification
339  /// @{
340 
341  /// Set the property \a key to the provided \a value for figure \a figureName.
342  void setFigureProperty(const std::string &figureName, const std::string &key, const Value &value);
343  /// Set the property \a key to the provided \a value for current figure.
344  void setFigureProperty(const std::string &key, const Value &value);
345 
346  /// Assign the given \a properties to the figure \a figureName.
347  void setFigureProperties(const std::string &figureName, const Params &properties);
348  /// Assign the given \a properties to the current figure.
349  void setFigureProperties(const Params &properties);
350 
351  /// @}
352  ///
353  ///
354 
355  /** @} */ // end of group figure
356 
357 
358  // Ibex enabled functions
359  #ifdef _IBEX_INTERVAL_H_
361  #endif //#ifdef _IBEX_INTERVAL_H_
362  #ifdef __IBEX_INTERVAL_VECTOR_H__
364  #endif //#ifdef __IBEX_INTERVAL_VECTOR_H__
365 
366 
367  //
368  // Inline Implementations
369  //
370 
371  /**
372  * \brief Draw a circle
373  * \param cx Abscissa of the center
374  * \param cy Ordinate of the cnter
375  * \param r Radius of the circle
376  * \param params Optional attributes
377  *
378  * Draws a circle of radius \a r with center at (\a cx , \a cy ).
379  * This functions internally calls \fn drawEllipse
380  */
381  inline void drawCircle(const double &cx, const double &cy, const double &r, const Params &params)
382  {
383  drawEllipse(cx,cy,r,r,0.,params);
384  }
385 
386  /**
387  * @brief Sets property \a key to the provided \a value for the figure named \a figureName.
388  * @param figureName The name of the figure to alter
389  * @param key The name of the property to alter
390  * @param value The new value of the specified property
391  */
392  inline void setFigureProperty(const std::string &figureName, const std::string &key, const Value &value)
393  {
394  setFigureProperties(figureName, Params(key, value));
395  }
396 
397  /**
398  * Sets property \a key to the provided \a value for the current figure.
399  * @overload
400  */
401  inline void setFigureProperty(const std::string &key, const Value &value)
402  {
403  setFigureProperties(Params(key, value));
404  }
405 
406  inline void setObjectProperty(const std::string &figureName, const std::string &objectName, const std::string &key, const Value &value)
407  {
408  setObjectProperties(figureName, objectName, Params(key, value));
409  }
410 
411  inline void setObjectProperty(const std::string &objectName, const std::string &key, const Value &value)
412  {
413  setObjectProperties(objectName, Params(key, value));
414  }
415 
416  // Ibex enabled functions
417  #ifdef _IBEX_INTERVAL_H_
418  inline void drawBox(const ibex::Interval &x, const ibex::Interval &y, Params params) {
419  drawBox(x.lb(),x.ub(),y.lb(),y.ub(),params);
420  }
421  #endif //#ifdef _IBEX_INTERVAL_H_
422  #ifdef __IBEX_INTERVAL_VECTOR_H__
423  /// \todo N-dimensionanl Ibex Inteval vector support
424  inline void drawBox(const ibex::IntervalVector &box, Params params) {
425  drawBox(box[0], box[1], params);
426  }
427  #endif //#ifdef __IBEX_INTERVAL_VECTOR_H__
428 }
429 
430 ///
431 /// Convenience macros
432 ///
434 /// Macro to simplify contruction of a Params object
435 #define vibesParams(...) (vibes::Params(), __VA_ARGS__)
436 /// Convenience macros for "Matlab style" variadic calls
437 #define vibesDrawBox(x_lb,x_ub,y_lb,y_ub,...) vibes::drawBox(x_lb,x_ub,y_lb,y_ub,vibesParams(__VA_ARGS__))
438 #define vibesDrawEllipse(cx,cy,a,b,rot,...) vibes::drawEllipse(cx,cy,a,b,rot,vibesParams(__VA_ARGS__))
439 #define vibesDrawConfidenceEllipse(cx,cy,sxx,sxy,syy,K,...) vibes::drawConfidenceEllipse(cx,cy,sxx,sxy,syy,K,vibesParams(__VA_ARGS__))
440 #define vibesDrawCircle(cx,cy,r,...) vibes::drawCircle(cx,cy,r,vibesParams(__VA_ARGS__))
441 #endif //#ifdef VIBES_GENERATE_vibesXXX_MACROS
442 
443 #endif //#ifndef VIBES_CPP_API_H
#define VIBES_GENERATE_vibesXXX_MACROS
Definition: vibes.h:27
void axisAuto(Params params)
Set axes limits to the bounding box of the drawing.
Definition: vibes.cpp:160
Vec< int, 4 > RGBA
A RGBA triplet [0..255].
Definition: vibes.h:109
void beginDrawing(const std::string &fileName)
Start VIBes in file saving mode. All commands are saved to the specified file.
Definition: vibes.cpp:98
void setFigureProperty(const std::string &figureName, const std::string &key, const Value &value)
Set the property key to the provided value for figure figureName.
Definition: vibes.h:392
#define VIBES_FUNC_COLOR_PARAM_3(func_name, T1, a, T2, b, T3, c)
Definition: vibes.h:165
Definition: vibes.cpp:11
#define vibesParams(...)
Macro to simplify contruction of a Params object.
Definition: vibes.h:435
void axisLimits(const double &x_lb, const double &x_ub, const double &y_lb, const double &y_ub, Params params)
Specify the rectangle to be displayed: Lower-left corner (x_lb, y_lb) and a upper-right corner (x_ub...
Definition: vibes.cpp:172
#define VIBES_FUNC_COLOR_PARAM_2(func_name, T1, a, T2, b)
Definition: vibes.h:161
Vec< double, 3 > Vec3d
A 3D floating point vector.
Definition: vibes.h:111
void removeObject(const std::string &figureName, const std::string &objectName)
Delete the named graphical object objectName from figure figureName.
Definition: vibes.cpp:346
void setObjectProperties(const std::string &objectName, const Params &properties)
Assign properties to the named object objectName in current figure.
Definition: vibes.cpp:393
void drawLine(const std::vector< double > &x, const std::vector< double > &y, Params params)
Draw a 2-D line from the list of abscissae x and the list of ordinates y.
Definition: vibes.cpp:295
void clearGroup(const std::string &groupName)
Clear the contents of the group groupName in current figure.
Definition: vibes.cpp:340
void drawEllipse(const double &cx, const double &cy, const double &a, const double &b, const double &rot, Params params)
Draw an ellipse centered at (cx, cy), with semi-major and minor axes a and b, and rotated by rot degr...
Definition: vibes.cpp:214
void setObjectProperties(const std::string &figureName, const std::string &objectName, const Params &properties)
Assign properties to the named object objectName in figure figureName.
Definition: vibes.cpp:380
Vec< double, 2 > Vec2d
A 2D floating point vector.
Definition: vibes.h:110
#define VIBES_FUNC_COLOR_PARAM_1(func_name, T1, a)
Definition: vibes.h:157
void setFigureProperty(const std::string &key, const Value &value)
Set the property key to the provided value for current figure.
Definition: vibes.h:401
void endDrawing()
Close connection to the viewer or the drawing file.
Definition: vibes.cpp:103
void drawBoxes(const std::vector< std::vector< double > > &bounds, Params params)
Draw a list of N-D rectangles from a list of list of bounds in the form ((x_lb_1, x_ub_1...
Definition: vibes.cpp:259
#define VIBES_FUNC_COLOR_PARAM_6(func_name, T1, a, T2, b, T3, c, T4, d, T5, e, T6, f)
Definition: vibes.h:177
void drawConfidenceEllipse(const double &cx, const double &cy, const double &sxx, const double &sxy, const double &syy, const double &K, Params params)
Draw a 2-D confidence ellipse centered at (cx, cy), with covariance sxx, sxy, syy and scale K...
Definition: vibes.cpp:228
void clearFigure(const std::string &figureName)
Clears the contents of the figure figureName, or the current figure if argument is given...
Definition: vibes.cpp:122
Vec< double, 4 > Vec4d
A 4D floating point vector.
Definition: vibes.h:112
void beginDrawing()
Start VIBes in connected mode: connects to the VIBes viewer.
Definition: vibes.cpp:80
void setObjectProperty(const std::string &objectName, const std::string &key, const Value &value)
Set the property key to the provided value for the named object objectName in current figure...
Definition: vibes.h:411
void setFigureProperties(const Params &properties)
Assign the given properties to the current figure.
Definition: vibes.cpp:375
void setFigureProperties(const std::string &figureName, const Params &properties)
Assign the given properties to the figure figureName.
Definition: vibes.cpp:363
#define VIBES_COLOR_PARAM_NAME
Definition: vibes.h:156
void setObjectProperty(const std::string &figureName, const std::string &objectName, const std::string &key, const Value &value)
Set the property key to the provided value for the named object objectName in figure figureName...
Definition: vibes.h:406
#define VIBES_FUNC_COLOR_PARAM_5(func_name, T1, a, T2, b, T3, c, T4, d, T5, e)
Definition: vibes.h:173
void closeFigure(const std::string &figureName)
Close the figure named figureName, or the current figure if no argument is given. ...
Definition: vibes.cpp:131
void drawBoxesUnion(const std::vector< std::vector< double > > &bounds, Params params)
Computes and draw the union of a list of N-D rectangles, from a list of list of bounds in the form ((...
Definition: vibes.cpp:271
#define VIBES_FUNC_COLOR_PARAM_4(func_name, T1, a, T2, b, T3, c, T4, d)
Definition: vibes.h:169
void newFigure(const std::string &figureName)
Create a new figure named figureName.
Definition: vibes.cpp:112
void clearGroup(const std::string &figureName, const std::string &groupName)
Clear the contents of the group groupName in figure figureName.
Definition: vibes.cpp:329
void drawBox(const vector< double > &bounds, Params params)
Draw a N-D box from a list of bounds in the form (x_lb, x_ub, y_lb, y_ub, z_lb, z_ub, ...)
Definition: vibes.cpp:199
void removeObject(const std::string &objectName)
Delete the named graphical object objectName from current figure.
Definition: vibes.cpp:357
void saveImage(const std::string &fileName, const std::string &figureName)
Definition: vibes.cpp:140
void drawLine(const std::vector< std::vector< double > > &points, Params params)
Draw a N-D line from the list of coordinates points in the form ((x_1, y_1, z_1, ...), (x_2, y_2, z_2, ...), ...)
Definition: vibes.cpp:283
void newGroup(const std::string &name, Params params)
Create a new group with the specified name.
Definition: vibes.cpp:316
void selectFigure(const std::string &figureName)
Select figureName as the current figure. Drawing operations will then apply to figureName.
Definition: vibes.cpp:150
void drawConfidenceEllipse(const vector< double > &center, const vector< double > &cov, const double &K, Params params)
Draw a N-D confidence ellipse centered at center, with covariance in cov and scale K...
Definition: vibes.cpp:244
void drawBox(const double &x_lb, const double &x_ub, const double &y_lb, const double &y_ub, Params params)
Draw a 2-D box with a left lower corner at (x_lb, y_lb) and a right upper corner at (x_ub...
Definition: vibes.cpp:188
Vec< int, 3 > RGB
A RGB triplet [0..255].
Definition: vibes.h:108