codac
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
codac::VIBesFigPaving Class Reference

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

#include <codac_VIBesFigPaving.h>

Inheritance diagram for codac::VIBesFigPaving:
Inheritance graph
[legend]
Collaboration diagram for codac::VIBesFigPaving:
Collaboration graph
[legend]

Public Member Functions

 VIBesFigPaving (const std::string &fig_name, const Paving *paving)
 Creates a VIBesFigPaving. More...
 
void set_color_map (const SetColorMap &color_map)
 Sets a custom color map. More...
 
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. More...
 
 ~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. More...
 
void set_background (const std::string &bg_color)
 Sets the background color of this figure. More...
 
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. More...
 
const IntervalVector & axis_limits (const IntervalVector &viewbox, bool same_ratio=false, float margin=0.)
 Sets the axis limits of this figure. More...
 
void save_image (const std::string &suffix="", const std::string &extension="svg", const std::string &path=".") const
 Saves the figure in SVG/PNG/... format. More...
 
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. More...
 
void draw_box (const IntervalVector &box, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a box. More...
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const vibes::Params &params)
 Draws a set of boxes. More...
 
void draw_boxes (const std::vector< IntervalVector > &v_boxes, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of boxes. More...
 
void draw_line (const std::vector< double > &v_x, const std::vector< double > &v_y, const vibes::Params &params)
 Draws a line of points. More...
 
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. More...
 
void draw_line (const std::vector< std::vector< double > > &v_pts, const vibes::Params &params)
 Draws a line of points. More...
 
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. More...
 
void draw_circle (double x, double y, double r, const vibes::Params &params)
 Draws a circle. More...
 
void draw_circle (double x, double y, double r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a circle. More...
 
void draw_ring (double x, double y, const Interval &r, const vibes::Params &params)
 Draws a ring. More...
 
void draw_ring (double x, double y, const Interval &r, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a ring. More...
 
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. More...
 
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. More...
 
void draw_edge (const ThickEdge &e, const vibes::Params &params)
 Draws an edge. More...
 
void draw_edge (const ThickEdge &e, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws an edge. More...
 
void draw_polygon (const Polygon &p, const vibes::Params &params)
 Draws a polygon. More...
 
void draw_polygon (const Polygon &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a polygon. More...
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const vibes::Params &params)
 Draws a set of polygons. More...
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a set of polygons. More...
 
void draw_polygons (const std::vector< ConvexPolygon > &v_p, const ColorMap &color_map, const vibes::Params &params=vibes::Params())
 Draws a set of polygons. More...
 
void draw_polygon_tube (const codac2::Tube< ConvexPolygon > &x, const ColorMap &color_map, const vibes::Params &params=vibes::Params())
 
void draw_point (const ThickPoint &p, const vibes::Params &params)
 Draws a point. More...
 
void draw_point (const ThickPoint &p, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point. More...
 
void draw_point (const ThickPoint &p, float size, const vibes::Params &params)
 Draws a point. More...
 
void draw_point (const ThickPoint &p, float size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a point. More...
 
void draw_points (const std::vector< ThickPoint > &v_pts, float size, const vibes::Params &params)
 Draws a set of points. More...
 
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. More...
 
void draw_vehicle (double x, double y, double heading, double size, const vibes::Params &params)
 Draws a vehicle. More...
 
void draw_vehicle (double x, double y, double heading, double size, const std::string &color="", const vibes::Params &params=vibes::Params())
 Draws a vehicle. More...
 
- Public Member Functions inherited from codac::Figure
 Figure (const std::string &fig_name)
 Creates a Figure. More...
 
 ~Figure ()
 Figure destructor.
 
int x () const
 Returns the horizontal coordinate of this figure. More...
 
int y () const
 Returns the vertical coordinate of this figure. More...
 
int width () const
 Returns the width of this figure. More...
 
int height () const
 Returns the height of this figure. More...
 
const std::string name () const
 Returns the name of this figure. More...
 
const IntervalVector & view_box () const
 Returns the real values displayed by this figure. More...
 
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. More...
 

Protected Member Functions

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

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 More...
 
static const Interval trunc_inf (const Interval &x)
 Returns a representable value of any interval \([x]\). More...
 
static const IntervalVector trunc_inf (const IntervalVector &x)
 Returns a representable value of any interval vector \([\mathbf{x}]\). More...
 

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: