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
40
45
50
57 void center_viewbox(const Vector& c, const Vector& r);
58
59 // Geometric shapes
60
67 void draw_point(const Vector& c, const StyleProperties& s = StyleProperties());
68
75 void draw_box(const IntervalVector& x, const StyleProperties& s = StyleProperties());
76
84 void draw_circle(const Vector& c, double r, const StyleProperties& s = StyleProperties());
85
93 void draw_ring(const Vector& c, const Interval& r, const StyleProperties& s = StyleProperties());
94
102 void draw_polyline(const std::vector<Vector>& x, float tip_length, const StyleProperties& s = StyleProperties());
103
110 void draw_polygon(const std::vector<Vector>& x, const StyleProperties& s = StyleProperties());
111
120 void draw_pie(const Vector& c, const Interval& r, const Interval& theta, const StyleProperties& s = StyleProperties());
121
130 void draw_ellipse(const Vector& c, const Vector& ab, double theta, const StyleProperties& s = StyleProperties());
131
132 // Robots
133
141 void draw_tank(const Vector& x, float size, const StyleProperties& s = StyleProperties());
142
150 void draw_AUV(const Vector& x, float size, const StyleProperties& s = StyleProperties());
151
159 void draw_motor_boat(const Vector& x, float size, const StyleProperties& s = StyleProperties());
160
168 static std::string to_vibes_style(const StyleProperties& s);
169
170 protected:
171
172 static int _has_been_initialized;
173 vibes::Params _params;
174 };
175}
void draw_pie(const Vector &c, const Interval &r, const Interval &theta, const StyleProperties &s=StyleProperties())
Draws a pie on the figure.
void draw_ring(const Vector &c, const Interval &r, const StyleProperties &s=StyleProperties())
Draws a ring on the figure.
void update_axes()
Updates the axes of the figure.
void draw_point(const Vector &c, const StyleProperties &s=StyleProperties())
Draws a point on the figure.
void draw_motor_boat(const Vector &x, float size, const StyleProperties &s=StyleProperties())
Draws a motor boat on the figure.
void update_window_properties()
Updates the window properties of the figure.
static std::string to_vibes_style(const StyleProperties &s)
Converts a StyleProperties object to a VIBes style string.
void draw_ellipse(const Vector &c, const Vector &ab, double theta, const StyleProperties &s=StyleProperties())
Draws an ellipse 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_tank(const Vector &x, float size, const StyleProperties &s=StyleProperties())
Draws a tank on the figure.
void draw_AUV(const Vector &x, float size, const StyleProperties &s=StyleProperties())
Draws an AUV on the figure.
void draw_box(const IntervalVector &x, const StyleProperties &s=StyleProperties())
Draws a box on the figure.
Figure2D_VIBes(const Figure2D &fig)
Creates a new Figure2D_VIBes object linked to a given figure.
void draw_polygon(const std::vector< Vector > &x, const StyleProperties &s=StyleProperties())
Draws a polygone on the figure.
void draw_circle(const Vector &c, double r, const StyleProperties &s=StyleProperties())
Draws a circle on the figure.
~Figure2D_VIBes()
Destructor for the Figure2D_VIBes object.
void draw_polyline(const std::vector< Vector > &x, float tip_length, const StyleProperties &s=StyleProperties())
Draws a polyline on the figure.
Figure2D class, used for 2D display.
Definition codac2_Figure2D.h:77
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62
OutputFigure2D(const Figure2D &fig)
Creates a new OutputFigure2D object linked to a given figure.
Definition codac2_OutputFigure2D.h:39
Style properties structure, to specify the style of a shape.
Definition codac2_StyleProperties.h:26