12 #ifndef __CODAC_VIBESFIG_H__ 13 #define __CODAC_VIBESFIG_H__ 17 #include "codac_ThickPoint.h" 18 #include "codac_Polygon.h" 19 #include "codac_ConvexPolygon.h" 41 VIBesFig(
const std::string& fig_name);
84 const IntervalVector&
axis_limits(
double x_min,
double x_max,
double y_min,
double y_max,
bool same_ratio =
false,
float margin = 0.);
97 const IntervalVector&
axis_limits(
const IntervalVector& viewbox,
bool same_ratio =
false,
float margin = 0.);
112 void save_image(
const std::string& suffix =
"",
const std::string& extension =
"svg",
const std::string& path =
".")
const;
138 void draw_box(
const IntervalVector& box,
const vibes::Params& params);
147 void draw_box(
const IntervalVector& box,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
155 void draw_boxes(
const std::vector<IntervalVector>& v_boxes,
const vibes::Params& params);
164 void draw_boxes(
const std::vector<IntervalVector>& v_boxes,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
173 void draw_line(
const std::vector<double>& v_x,
const std::vector<double>& v_y,
const vibes::Params& params);
183 void draw_line(
const std::vector<double>& v_x,
const std::vector<double>& v_y,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
191 void draw_line(
const std::vector<std::vector<double> >& v_pts,
const vibes::Params& params);
200 void draw_line(
const std::vector<std::vector<double> >& v_pts,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
210 void draw_circle(
double x,
double y,
double r,
const vibes::Params& params);
221 void draw_circle(
double x,
double y,
double r,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
231 void draw_ring(
double x,
double y,
const Interval& r,
const vibes::Params& params);
242 void draw_ring(
double x,
double y,
const Interval& r,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
253 void draw_pie(
double x,
double y,
const Interval& r,
const Interval& theta,
const vibes::Params& params);
265 void draw_pie(
double x,
double y,
const Interval& r,
const Interval& theta,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
273 void draw_edge(
const ThickEdge& e,
const vibes::Params& params);
282 void draw_edge(
const ThickEdge& e,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
290 void draw_polygon(
const Polygon& p,
const vibes::Params& params);
299 void draw_polygon(
const Polygon& p,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
307 void draw_polygons(
const std::vector<ConvexPolygon>& v_p,
const vibes::Params& params);
316 void draw_polygons(
const std::vector<ConvexPolygon>& v_p,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
325 void draw_polygons(
const std::vector<ConvexPolygon>& v_p,
const ColorMap& color_map,
const vibes::Params& params = vibes::Params());
333 void draw_point(
const ThickPoint& p,
const vibes::Params& params);
342 void draw_point(
const ThickPoint& p,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
351 void draw_point(
const ThickPoint& p,
float size,
const vibes::Params& params);
361 void draw_point(
const ThickPoint& p,
float size,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
370 void draw_points(
const std::vector<ThickPoint>& v_pts,
float size,
const vibes::Params& params);
380 void draw_points(
const std::vector<ThickPoint>& v_pts,
float size,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
391 void draw_vehicle(
double x,
double y,
double heading,
double size,
const vibes::Params& params);
403 void draw_vehicle(
double x,
double y,
double heading,
double size,
const std::string& color =
"",
const vibes::Params& params = vibes::Params());
void set_properties(int x, int y, int width, int height)
Sets the properties (coordinates and dimensions) of this figure.
void save_image(const std::string &suffix="", const std::string &extension="svg", const std::string &path=".") const
Saves the figure in SVG/PNG/... format.
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
void draw_points(const std::vector< ThickPoint > &v_pts, float size, const vibes::Params ¶ms)
Draws a set of points.
void draw_box(const IntervalVector &box, const vibes::Params ¶ms)
Draws a box.
void draw_pie(double x, double y, const Interval &r, const Interval &theta, const vibes::Params ¶ms)
Draws a pie: radial portion of a ring.
void draw_line(const std::vector< double > &v_x, const std::vector< double > &v_y, const vibes::Params ¶ms)
Draws a line of points.
void clear()
Clears this figure by removing displayed items.
VIBesFig(const std::string &fig_name)
Creates a VIBesFig.
void draw_ring(double x, double y, const Interval &r, const vibes::Params ¶ms)
Draws a ring.
void show()
Displays this figure.
Definition: codac_VIBesFig.h:121
Associates colors to a range of values.
Definition: codac_ColorMap.h:31
void set_background(const std::string &bg_color)
Sets the background color of this figure.
void draw_vehicle(double x, double y, double heading, double size, const vibes::Params ¶ms)
Draws a vehicle.
void draw_point(const ThickPoint &p, const vibes::Params ¶ms)
Draws a point.
void draw_circle(double x, double y, double r, const vibes::Params ¶ms)
Draws a circle.
Two-dimensional graphical item based on the VIBes viewer.
Definition: codac_VIBesFig.h:29
void close()
Closes this figure.
void draw_polygon(const Polygon &p, const vibes::Params ¶ms)
Draws a polygon.
void draw_edge(const ThickEdge &e, const vibes::Params ¶ms)
Draws an edge.
void draw_boxes(const std::vector< IntervalVector > &v_boxes, const vibes::Params ¶ms)
Draws a set of boxes.
void draw_polygons(const std::vector< ConvexPolygon > &v_p, const vibes::Params ¶ms)
Draws a set of polygons.
~VIBesFig()
VIBesFig destructor.
const IntervalVector & axis_limits(double x_min, double x_max, double y_min, double y_max, bool same_ratio=false, float margin=0.)
Sets the axis limits of this figure.