codac 2.0.0
|
Default view class, used to manage the default figure. More...
#include <codac2_Figure2D.h>
Static Public Member Functions | |
static std::shared_ptr< Figure2D > | selected_fig () |
Getter for the default figure. | |
static void | set (std::shared_ptr< Figure2D > fig) |
Setter for the default figure. | |
static Figure2D & | set_axes (const FigureAxis &axis1, const FigureAxis &axis2) |
Setter for the axes of the figure. | |
static void | set_window_properties (const Vector &pos, const Vector &size) |
Setter for the position and size of the window. | |
static void | auto_scale () |
VIBes only: auto scale the figure. | |
static void | clear () |
Clear the figure. | |
static void | draw_point (const Vector &c, const StyleProperties &s=StyleProperties()) |
Draws a point on the figure. | |
static void | draw_box (const IntervalVector &x, const StyleProperties &s=StyleProperties()) |
Draws a box on the figure. | |
static void | draw_circle (const Vector &c, double r, const StyleProperties &s=StyleProperties()) |
Draws a circle on the figure. | |
static void | draw_ring (const Vector &c, const Interval &r, const StyleProperties &s=StyleProperties()) |
Draws a ring on the figure. | |
static void | draw_line (const Vector &p1, const Vector &p2, const StyleProperties &s=StyleProperties()) |
Draws a line on the figure. | |
static void | draw_line (const Segment &e, const StyleProperties &s=StyleProperties()) |
Draws a line on the figure. | |
static void | draw_arrow (const Vector &p1, const Vector &p2, float tip_length, const StyleProperties &s=StyleProperties()) |
Draws an arrow on the figure. | |
static void | draw_polyline (const std::vector< Vector > &x, const StyleProperties &s=StyleProperties()) |
Draws a polyline on the figure. | |
static void | draw_polyline (const std::vector< Vector > &x, float tip_length, const StyleProperties &s=StyleProperties()) |
Draws a polyline on the figure. | |
static void | draw_polygon (const Polygon &x, const StyleProperties &s=StyleProperties()) |
Draws a Polygon object on the figure. | |
static void | draw_parallelepiped (const Parallelepiped &p, const StyleProperties &s=StyleProperties()) |
Draws a parallelepiped z+A*[-1,1]^2 on the figure. | |
static void | draw_zonotope (const Zonotope &z, const StyleProperties &s=StyleProperties()) |
Draws a zonotope z+sum_i [-1,1] A_i on the figure. | |
static void | draw_pie (const Vector &c, const Interval &r, const Interval &theta, const StyleProperties &s=StyleProperties()) |
Draws a pie on the figure. | |
static void | draw_ellipse (const Vector &c, const Vector &ab, double theta, const StyleProperties &s=StyleProperties()) |
Draws an ellipse on the figure. | |
static void | draw_ellipsoid (const Ellipsoid &e, const StyleProperties &s=StyleProperties()) |
Draws an ellipsoid on the figure. | |
static void | draw_trajectory (const SampledTraj< Vector > &x, const StyleProperties &s=StyleProperties()) |
Draws a trajectory on the figure. | |
static void | draw_trajectory (const AnalyticTraj< VectorType > &x, const StyleProperties &s=StyleProperties()) |
Draws a trajectory on the figure. | |
static void | draw_trajectory (const SampledTraj< Vector > &x, const ColorMap &cmap) |
Draws a trajectory on the figure with a colormap. | |
static void | draw_trajectory (const AnalyticTraj< VectorType > &x, const ColorMap &cmap) |
Draws a trajectory on the figure with a colormap. | |
static void | plot_trajectory (const SampledTraj< double > &x, const StyleProperties &s=StyleProperties()) |
Plots a trajectory on the figure (x-axis is the time) | |
static void | plot_trajectories (const SampledTraj< Vector > &x, const StyleProperties &s=StyleProperties()) |
Plots a set of trajectories on the figure (x-axis is the time) | |
static void | draw_tube (const SlicedTube< IntervalVector > &x, const StyleProperties &s) |
Draws a tube of IntervalVector on the figure. | |
static void | draw_tube (const SlicedTube< IntervalVector > &x, const ColorMap &cmap=ColorMap::blue_tube()) |
Draws a tube of IntervalVector on the figure with a colormap. | |
static void | draw_tank (const Vector &x, float size, const StyleProperties &s=StyleProperties()) |
Draws a tank on the figure. | |
static void | draw_AUV (const Vector &x, float size, const StyleProperties &s=StyleProperties()) |
Draws an AUV on the figure. | |
static void | draw_motor_boat (const Vector &x, float size, const StyleProperties &s=StyleProperties()) |
Draws a motor boat on the figure. | |
static void | draw_paving (const PavingOut &p, const PavingStyle &style=PavingStyle::default_style()) |
Draws a previously computed paving (outer approximation) on the figure. | |
static void | draw_paving (const PavingOut &p, const std::function< void(Figure2D &, const IntervalVector &, const StyleProperties &)> &draw_box, const PavingStyle &style=PavingStyle::default_style()) |
Draws a previously computed paving (outer approximation) on the figure. | |
static void | draw_paving (const PavingInOut &p, const PavingStyle &style=PavingStyle::default_style()) |
Draws a previously computed paving (inner/outer approximation) on the figure. | |
static void | draw_paving (const PavingInOut &p, const std::function< void(Figure2D &, const IntervalVector &, const StyleProperties &)> &draw_box, const PavingStyle &style=PavingStyle::default_style()) |
Draws a previously computed paving (inner/outer approximation) on the figure. | |
template<typename C> requires IsCtcBaseOrPtr<C,IntervalVector> | |
static void | pave (const IntervalVector &x0, const C &c, double eps, const PavingStyle &style=PavingStyle::default_style()) |
Draws a paving from a contractor while it is being computed. | |
template<typename C> requires IsCtcBaseOrPtr<C,IntervalVector> | |
static void | pave (const IntervalVector &x0, const C &c, double eps, const std::function< void(Figure2D &, const IntervalVector &, const StyleProperties &)> &draw_box, const PavingStyle &style=PavingStyle::default_style()) |
Draws a paving from a contractor while it is being computed. | |
template<typename S> requires IsSepBaseOrPtr<S> | |
static void | pave (const IntervalVector &x0, const S &s, double eps, const PavingStyle &style=PavingStyle::default_style()) |
Draws a paving from a separator while it is being computed. | |
template<typename S> requires IsSepBaseOrPtr<S> | |
static void | pave (const IntervalVector &x0, const S &s, double eps, const std::function< void(Figure2D &, const IntervalVector &, const StyleProperties &)> &draw_box, const PavingStyle &style=PavingStyle::default_style()) |
Draws a paving from a separator while it is being computed. | |
template<typename P> | |
static void | draw_subpaving (const Subpaving< P > &p, const StyleProperties &s=StyleProperties()) |
Draws a subpaving on the figure. | |
Default view class, used to manage the default figure.
This class is used to manage the default figure. By default it only interacts with VIBes.
Any figure can be set as the default view.
|
inlinestatic |
Getter for the default figure.
|
inlinestatic |
Setter for the default figure.
fig | The new default figure |
|
inlinestatic |
Setter for the axes of the figure.
axis1 | First axis (horizontal) |
axis2 | Second axis (vertical) |
|
inlinestatic |
Setter for the position and size of the window.
pos | Position of the window |
size | Size of the window |
|
inlinestatic |
Draws a point on the figure.
c | Coordinates of the point |
s | Style of the point (edge color and fill color) |
|
inlinestatic |
Draws a box on the figure.
x | Box to draw |
s | Style of the box (edge color and fill color) |
|
inlinestatic |
Draws a circle on the figure.
c | Center of the circle |
r | Radius of the circle |
s | Style of the circle (edge color and fill color) |
|
inlinestatic |
Draws a ring on the figure.
c | Center of the ring |
r | Inner and outer radius of the ring |
s | Style of the ring (edge color and fill color) |
|
inlinestatic |
Draws a line on the figure.
p1 | First point of the line |
p2 | Second point of the line |
s | Style of the line (edge color) |
|
inlinestatic |
Draws a line on the figure.
e | segment to be drawn |
s | Style of the line (edge color) |
|
inlinestatic |
Draws an arrow on the figure.
p1 | First point of the arrow |
p2 | Second point of the arrow |
tip_length | Length of the tip of the arrow |
s | Style of the arrow (edge color and fill color) |
|
inlinestatic |
Draws a polyline on the figure.
x | Vector of the points of the polyline |
s | Style of the polyline (edge color) |
|
inlinestatic |
Draws a polyline on the figure.
x | Vector of the points of the polyline |
tip_length | Length of the tip of the arrow |
s | Style of the polyline (edge color and fill color) |
|
inlinestatic |
|
inlinestatic |
Draws a parallelepiped z+A*[-1,1]^2 on the figure.
p | Parallelepiped to draw (center and shape matrix) |
s | Style of the parallelepiped (edge color and fill color) |
|
inlinestatic |
Draws a zonotope z+sum_i [-1,1] A_i on the figure.
z | Zonotope to draw (center and shape matrix) |
s | Style of the zonotope (edge color and fill color) |
|
inlinestatic |
Draws a pie on the figure.
c | Center of the pie |
r | Inner and outer radius of the pie |
theta | Start and end angle of the pie (in radians) |
s | Style of the pie (edge color and fill color) |
|
inlinestatic |
Draws an ellipse on the figure.
c | Center of the ellipse |
ab | Half-lengths of the ellipse |
theta | Rotation angle of the ellipse (in radians) |
s | Style of the ellipse (edge color and fill color) |
|
inlinestatic |
Draws an ellipsoid on the figure.
e | Ellipsoid to draw |
s | Style of the ellipsoid (edge color and fill color) |
|
inlinestatic |
Draws a trajectory on the figure.
x | Trajectory to draw |
s | Style of the trajectory (edge color) |
|
inlinestatic |
Draws a trajectory on the figure.
x | AnalyticTraj to draw |
s | Style of the trajectory (edge color) |
|
inlinestatic |
Draws a trajectory on the figure with a colormap.
x | SampledTraj to draw |
cmap | Colormap to use |
|
inlinestatic |
Draws a trajectory on the figure with a colormap.
x | AnalyticTraj to draw |
cmap | Colormap to use |
|
inlinestatic |
Plots a trajectory on the figure (x-axis is the time)
x | SampledTraj to plot |
s | Style of the trajectory (edge color) |
|
inlinestatic |
Plots a set of trajectories on the figure (x-axis is the time)
x | SampledTraj<Vector> set of trajectories to plot |
s | Style of the trajectory (edge color) |
|
inlinestatic |
Draws a tube of IntervalVector
on the figure.
x | SlicedTube to draw |
s | Style of the tube |
|
inlinestatic |
Draws a tube of IntervalVector
on the figure with a colormap.
x | SlicedTube to draw |
cmap | Colormap to use |
|
inlinestatic |
Draws a tank on the figure.
x | Coordinates of the tank |
size | Size of the tank |
s | Style of the tank (edge color and fill color) |
|
inlinestatic |
Draws an AUV on the figure.
x | Coordinates of the AUV |
size | Size of the AUV |
s | Style of the AUV (edge color and fill color) |
|
inlinestatic |
Draws a motor boat on the figure.
x | Coordinates of the motor boat |
size | Size of the motor boat |
s | Style of the motor boat (edge color and fill color) |
|
inlinestatic |
Draws a previously computed paving (outer approximation) on the figure.
p | PavingOut to draw (result of a paving with contractors) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a previously computed paving (outer approximation) on the figure.
p | PavingOut to draw (result of a paving with contractors) |
draw_box | Custom drawing function (for instance, if one wants to draw in polar coordinates) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a previously computed paving (inner/outer approximation) on the figure.
p | PavingInOut to draw (result of a paving with separators) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a previously computed paving (inner/outer approximation) on the figure.
p | PavingInOut to draw (result of a paving with separators) |
draw_box | Custom drawing function (for instance, if one wants to draw in polar coordinates) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a paving from a contractor while it is being computed.
x0 | Initial box |
c | Contractor to be paved |
eps | Accuracy of the paving algorithm (the undefined boxes will have their max_diam <= eps) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a paving from a contractor while it is being computed.
x0 | Initial box |
c | Contractor to be paved |
eps | Accuracy of the paving algorithm (the undefined boxes will have their max_diam <= eps) |
draw_box | Optional custom drawing function (for instance, if one wants to draw in polar coordinates) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a paving from a separator while it is being computed.
x0 | Initial box |
s | Separator to be paved |
eps | Accuracy of the paving algorithm (the undefined boxes will have their max_diam <= eps) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a paving from a separator while it is being computed.
x0 | Initial box |
s | Separator to be paved |
eps | Accuracy of the paving algorithm (the undefined boxes will have their max_diam <= eps) |
draw_box | Optional custom drawing function (for instance, if one wants to draw in polar coordinates) |
style | PavingStyle for the drawing |
|
inlinestatic |
Draws a subpaving on the figure.
p | Subpaving to draw |
s | Style of the subpaving |