CGAL 6.0 - 2D Voronoi Diagram Adaptor
Loading...
Searching...
No Matches
Draw a 2D Voronoi Diagram

#include<CGAL/draw_voronoi_diagram_2.h>

Classes

struct  CGAL::Graphics_scene_options_voronoi_diagram_2< DS, VertexDescriptor, EdgeDescriptor, FaceDescriptor >
 The class Graphics_scene_options_voronoi_diagram_2 defines data and methods used to tune the way that the cells of a Voronoi_diagram_2 are considered for drawing or to be added into a graphics scene. More...
 

Functions

template<class VD2 , class GSOptions >
void CGAL::draw (const VD2 &vd2, const GSOptions &gso)
 opens a new window and draws a 2D voronoi diagram.
 
template<class VD2 >
void CGAL::draw (const VD2 &vd2)
 A shortcut to CGAL::draw(vd2, Graphics_scene_options_voronoi_diagram_2{}).
 
template<class VD2 , class GSOptions >
void CGAL::add_to_graphics_scene (const VD2 &vd2, CGAL::Graphics_scene &gs, const GSOptions &gso)
 adds the vertices, edges and faces of vd2 into the given graphic scene gs.
 
template<class VD2 >
void CGAL::add_to_graphics_scene (const VD2 &vd2, CGAL::Graphics_scene &gs)
 A shortcut to CGAL::add_to_graphics_scene(vd2, gs, Graphics_scene_options_voronoi_diagram_2{}).
 

Function Documentation

◆ add_to_graphics_scene()

template<class VD2 , class GSOptions >
void CGAL::add_to_graphics_scene ( const VD2 &  vd2,
CGAL::Graphics_scene &  gs,
const GSOptions &  gso 
)

#include <CGAL/draw_voronoi_diagram_2.h>

adds the vertices, edges and faces of vd2 into the given graphic scene gs.

Parameters of the cells are taken from the optional graphics scene options parameter gso. Note that gs is not cleared before being filled (to enable to draw several data structures in the same basic viewer).

Template Parameters
VD2which must be an instantiation of a CGAL::Voronoi_diagram_2<...>.
GSOptionsa model of GraphicsSceneOptionsVoronoiDiagram2 concept.
Parameters
vd2the voronoi diagram to draw.
gsthe graphic scene to fill.
gsothe graphics scene options parameter.
Advanced

The real declaration of this function template is:

template<class DG, class AT, class AP, class GSOptions>

void CGAL::add_to_graphics_scene(const CGAL::Voronoi_diagram_2<DG, AT, AP>& vd2, CGAL::Graphics_scene& gs, const GSOptions& gso);

◆ draw()

template<class VD2 , class GSOptions >
void CGAL::draw ( const VD2 &  vd2,
const GSOptions &  gso 
)

#include <CGAL/draw_voronoi_diagram_2.h>

opens a new window and draws a 2D voronoi diagram.

Parameters of the drawing are taken from the optional graphics scene options parameter.

A call to this function blocks the execution of the program until the drawing window is closed. This function requires CGAL_Qt6, and is only available if the macro CGAL_USE_BASIC_VIEWER is defined. Linking with the cmake target CGAL::CGAL_Basic_viewer will link with CGAL_Qt6 and add the definition CGAL_USE_BASIC_VIEWER.

Template Parameters
VD2which must be an instantiation of a CGAL::Voronoi_diagram_2<...>.
GSOptionsa model of GraphicsSceneOptionsVoronoiDiagram2 concept.
Parameters
vd2the voronoi diagram to draw.
gsothe graphics scene options parameter.
Advanced

The real declaration of this function template is:

template<class DG, class AT, class AP, class GSOptions>

void CGAL::draw(const CGAL::Voronoi_diagram_2<DG, AT, AP>& vd2, const GSOptions& gso);