codac 2.0.0
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
69 // Geometric shapes
70
77 void draw_point(const Vector& c, const StyleProperties& style = StyleProperties());
78
85 void draw_box(const IntervalVector& x, const StyleProperties& style = StyleProperties());
86
94 void draw_circle(const Vector& c, double r, const StyleProperties& style = StyleProperties());
95
103 void draw_ring(const Vector& c, const Interval& r, const StyleProperties& style = StyleProperties());
104
112 void draw_polyline(const std::vector<Vector>& x, float tip_length, const StyleProperties& style = StyleProperties());
113
120 void draw_polygon(const std::vector<Vector>& x, const StyleProperties& style = StyleProperties());
121
130 void draw_pie(const Vector& c, const Interval& r, const Interval& theta, const StyleProperties& style = StyleProperties());
131
140 void draw_ellipse(const Vector& c, const Vector& ab, double theta, const StyleProperties& style = StyleProperties());
141
142 // Robots
143
151 void draw_tank(const Vector& x, float size, const StyleProperties& style = StyleProperties());
152
160 void draw_AUV(const Vector& x, float size, const StyleProperties& style = StyleProperties());
161
169 void draw_motor_boat(const Vector& x, float size, const StyleProperties& style = StyleProperties());
170
178 static std::string to_vibes_style(const StyleProperties& style);
179
180 protected:
181
182 static int _has_been_initialized;
183 vibes::Params _params;
184 };
185}
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_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_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 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:78
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
OutputFigure2D(const Figure2D &fig)
Creates a new OutputFigure2D object linked to a given figure.
Definition codac2_OutputFigure2D.h:39
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25
Eigen::Matrix< double,-1, 1 > Vector
Alias for a dynamically-sized column vector of doubles.
Definition codac2_Vector.h:24
Style properties structure, to specify the style of a shape.
Definition codac2_StyleProperties.h:26