codac 2.0.5
Loading...
Searching...
No Matches
codac2_Figure2D_VIBes.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_Figure2D.h"
15#include "vibes.h"
16
17namespace codac2
18{
26 {
27 public:
28
35
39 virtual ~Figure2D_VIBes();
40
45
50
55
62 void center_viewbox(const Vector& c, const Vector& r);
63
67 void clear();
68
74 void save(const std::string& filename);
75
76 // Geometric shapes
77
84 void draw_point(const Vector& c, const StyleProperties& style = StyleProperties());
85
92 void draw_box(const IntervalVector& x, const StyleProperties& style = StyleProperties());
93
101 void draw_circle(const Vector& c, double r, const StyleProperties& style = StyleProperties());
102
110 void draw_ring(const Vector& c, const Interval& r, const StyleProperties& style = StyleProperties());
111
119 void draw_polyline(const std::vector<Vector>& x, float tip_length, const StyleProperties& style = StyleProperties());
120
127 void draw_polygon(const std::vector<Vector>& x, const StyleProperties& style = StyleProperties());
128
137 void draw_pie(const Vector& c, const Interval& r, const Interval& theta, const StyleProperties& style = StyleProperties());
138
147 void draw_ellipse(const Vector& c, const Vector& ab, double theta, const StyleProperties& style = StyleProperties());
148
149 // Robots
150
158 void draw_tank(const Vector& x, float size, const StyleProperties& style = StyleProperties());
159
167 void draw_AUV(const Vector& x, float size, const StyleProperties& style = StyleProperties());
168
176 void draw_motor_boat(const Vector& x, float size, const StyleProperties& style = StyleProperties());
177
178 // Miscellaneous
179
188 void draw_text(const std::string& text, const Vector& ul, double scale, const StyleProperties& style = StyleProperties());
189
197 void draw_raster(const std::string& filename, const IntervalVector& bbox, const StyleProperties& style = StyleProperties());
198
199
200
208 static std::string to_vibes_style(const StyleProperties& style);
209
210 protected:
211
212 static int _has_been_initialized;
213 vibes::Params _params;
214 };
215}
virtual ~Figure2D_VIBes()
Destructor for the Figure2D_VIBes object.
void update_axes()
Updates the axes of the figure.
void clear()
Clears the figure.
void draw_ring(const Vector &c, const Interval &r, const StyleProperties &style=StyleProperties())
Draws a ring on the figure.
void draw_AUV(const Vector &x, float size, const StyleProperties &style=StyleProperties())
Draws an AUV on the figure.
void draw_ellipse(const Vector &c, const Vector &ab, double theta, const StyleProperties &style=StyleProperties())
Draws an ellipse on the figure.
static std::string to_vibes_style(const StyleProperties &style)
Converts a StyleProperties object to a VIBes style string.
void draw_raster(const std::string &filename, const IntervalVector &bbox, const StyleProperties &style=StyleProperties())
Draws a raster on the figure.
void draw_circle(const Vector &c, double r, const StyleProperties &style=StyleProperties())
Draws a circle on the figure.
void update_window_properties()
Updates the window properties of the figure.
void draw_text(const std::string &text, const Vector &ul, double scale, const StyleProperties &style=StyleProperties())
Draws text on the figure.
void draw_point(const Vector &c, const StyleProperties &style=StyleProperties())
Draws a point on the figure.
void center_viewbox(const Vector &c, const Vector &r)
Centers the viewbox on a given point with a given radius.
void draw_polygon(const std::vector< Vector > &x, const StyleProperties &style=StyleProperties())
Draws a polygone on the figure.
void draw_polyline(const std::vector< Vector > &x, float tip_length, const StyleProperties &style=StyleProperties())
Draws a polyline on the figure.
Figure2D_VIBes(const Figure2D &fig)
Creates a new Figure2D_VIBes object linked to a given figure.
void draw_tank(const Vector &x, float size, const StyleProperties &style=StyleProperties())
Draws a tank on the figure.
void draw_motor_boat(const Vector &x, float size, const StyleProperties &style=StyleProperties())
Draws a motor boat on the figure.
void save(const std::string &filename)
Saves the figure to a file.
void update_drawing_properties(const StyleProperties &s)
Updates the drawing properties : colors, line style, line width and layer.
void draw_box(const IntervalVector &x, const StyleProperties &style=StyleProperties())
Draws a box on the figure.
void draw_pie(const Vector &c, const Interval &r, const Interval &theta, const StyleProperties &style=StyleProperties())
Draws a pie on the figure.
Figure2D class, used for 2D display.
Definition codac2_Figure2D.h:82
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:50
OutputFigure2D(const Figure2D &fig)
Creates a new OutputFigure2D object linked to a given figure.
Definition codac2_OutputFigure2D.h:39
Definition codac2_OctaSym.h:21
Eigen::Matrix< double,-1, 1 > Vector
Alias for a dynamically-sized column vector of doubles.
Definition codac2_Vector.h:24
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25
Style properties structure, to specify the style of a shape.
Definition codac2_StyleProperties.h:27