codac 1.5.6
Loading...
Searching...
No Matches
codac::VIBesFigPaving Class Reference

Two-dimensional graphical item to display a Paving object. More...

#include <codac_VIBesFigPaving.h>

Inheritance diagram for codac::VIBesFigPaving:
Collaboration diagram for codac::VIBesFigPaving:

Public Member Functions

 VIBesFigPaving (const std::string &fig_name, const Paving *paving)
 Creates a VIBesFigPaving.
 
void set_color_map (const SetColorMap &color_map)
 Sets a custom color map.
 
void show ()
 Updates the display of the Paving object.
 
- Public Member Functions inherited from codac::VIBesFig
 VIBesFig (const std::string &fig_name)
 Creates a VIBesFig.
 
 ~VIBesFig ()
 VIBesFig destructor.
 
void close ()
 Closes this figure.
 
void set_properties (int x, int y, int width, int height)
 Sets the properties (coordinates and dimensions) of this figure.
 
void set_background (const std::string &bg_color)
 Sets the background color of this figure.
 
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.
 
const IntervalVector & axis_limits (const IntervalVector &viewbox, bool same_ratio=false, float margin=0.)
 Sets the axis limits 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.
 
void show ()
 Displays this figure.
 
void clear ()
 Clears this figure by removing displayed items.
 
void draw_box (const IntervalVector &box, const vibes::Params &params)
 Draws a box.
 
void draw_box (const IntervalVector &box, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a box.
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const vibes::Params &params)
 Draws a set of boxes.
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of boxes.
 
void draw_line (const std::vector< double > &v_x, const std::vector< double > &v_y, const vibes::Params &params)
 Draws a line of points.
 
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())
 Draws a line of points.
 
void draw_line (const std::vector< std::vector< double > > &v_pts, const vibes::Params &params)
 Draws a line of points.
 
void draw_line (const std::vector< std::vector< double > > &v_pts, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a line of points.
 
void draw_circle (double x, double y, double r, const vibes::Params &params)
 Draws a circle.
 
void draw_circle (double x, double y, double r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a circle.
 
void draw_ring (double x, double y, const Interval &r, const vibes::Params &params)
 Draws a ring.
 
void draw_ring (double x, double y, const Interval &r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a ring.
 
void draw_pie (double x, double y, const Interval &r, const Interval &theta, const vibes::Params &params)
 Draws a pie: radial portion of a ring.
 
void draw_pie (double x, double y, const Interval &r, const Interval &theta, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a pie: radial portion of a ring.
 
void draw_edge (const ThickEdge &e, const vibes::Params &params)
 Draws an edge.
 
void draw_edge (const ThickEdge &e, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws an edge.
 
void draw_polygon (const Polygon &p, const vibes::Params &params)
 Draws a polygon.
 
void draw_polygon (const Polygon &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a polygon.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const vibes::Params &params)
 Draws a set of polygons.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of polygons.
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const ColorMap &color_map, const vibes::Params &params=vibes::Params())
 Draws a set of polygons.
 
void draw_point (const ThickPoint &p, const vibes::Params &params)
 Draws a point.
 
void draw_point (const ThickPoint &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point.
 
void draw_point (const ThickPoint &p, float size, const vibes::Params &params)
 Draws a point.
 
void draw_point (const ThickPoint &p, float size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point.
 
void draw_points (const std::vector< ThickPoint > &v_pts, float size, const vibes::Params &params)
 Draws a set of points.
 
void draw_points (const std::vector< ThickPoint > &v_pts, float size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of points.
 
void draw_vehicle (double x, double y, double heading, double size, const vibes::Params &params)
 Draws a vehicle.
 
void draw_vehicle (double x, double y, double heading, double size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a vehicle.
 
- Public Member Functions inherited from codac::Figure
 Figure (const std::string &fig_name)
 Creates a Figure.
 
 ~Figure ()
 Figure destructor.
 
int x () const
 Returns the horizontal coordinate of this figure.
 
int y () const
 Returns the vertical coordinate of this figure.
 
int width () const
 Returns the width of this figure.
 
int height () const
 Returns the height of this figure.
 
const std::string name () const
 Returns the name of this figure.
 
const IntervalVector & view_box () const
 Returns the real values displayed by this figure.
 
void reset_view_box ()
 Reset the view box of this figure.
 
void set_properties (int x, int y, int width, int height)
 Sets the properties (coordinates and dimensions) of this figure.
 

Protected Member Functions

void draw_paving (const Paving *paving)
 Draws a paving object.
 

Protected Attributes

const Pavingm_paving
 const pointer to the object to be displayed
 
std::map< SetValue, std::string > m_color_map
 custom color map
 
- Protected Attributes inherited from codac::Figure
const std::string m_name
 figure name
 
int m_height = 300
 figure properties
 
IntervalVector m_view_box = IntervalVector(2, Interval::EMPTY_SET)
 view box
 

Additional Inherited Members

- Static Protected Member Functions inherited from codac::Figure
static double trunc_inf (double x)
 Returns a representable value of any double variable x
 
static const Interval trunc_inf (const Interval &x)
 Returns a representable value of any interval \([x]\).
 
static const IntervalVector trunc_inf (const IntervalVector &x)
 Returns a representable value of any interval vector \([\mathbf{x}]\).
 

Detailed Description

Two-dimensional graphical item to display a Paving object.

One figure is linked to one paving, so that any update on this object can be easily displayed on the figure.

Constructor & Destructor Documentation

◆ VIBesFigPaving()

codac::VIBesFigPaving::VIBesFigPaving ( const std::string & fig_name,
const Paving * paving )

Creates a VIBesFigPaving.

Parameters
fig_namea reference to the figure that will be displayed in the window's title
pavinga const pointer to the paving to be displayed

Member Function Documentation

◆ set_color_map()

void codac::VIBesFigPaving::set_color_map ( const SetColorMap & color_map)

Sets a custom color map.

Parameters
color_mapthe color map <paving_value,color_code> to be set

◆ draw_paving()

void codac::VIBesFigPaving::draw_paving ( const Paving * paving)
protected

Draws a paving object.

This method is recursive, because a Paving is implemented as a binary tree.

Parameters
pavinga const pointer to the Paving object to be displayed

The documentation for this class was generated from the following file: