CGAL 6.0 - 2D Triangulations
Loading...
Searching...
No Matches
Draw a Constrained Triangulation 2

#include<CGAL/draw_constrained_triangulation_2.h>

Functions

template<class CT2 , class InDomainPMap >
void CGAL::draw (const CT2 &ct2, InDomainPMap ipm)
 opens a new window and draws a constrained triangulation.
 
template<class CT2 , class InDomainPMap >
void CGAL::add_to_graphics_scene (const CT2 &ct2, InDomainPMap ipm, CGAL::Graphics_scene &gs)
 adds the vertices, edges and faces of ct2 into the given graphic scene gs.
 

Function Documentation

◆ add_to_graphics_scene()

template<class CT2 , class InDomainPMap >
void CGAL::add_to_graphics_scene ( const CT2 &  ct2,
InDomainPMap  ipm,
CGAL::Graphics_scene gs 
)

#include <CGAL/draw_constrained_triangulation_2.h>

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

If the triangulation has constraints they are drawn. The faces inside and outside of the domain, based on the property map, are drawn in different colors. Note that gs is not cleared before being filled (to enable to draw several data structures in the same basic viewer).

Template Parameters
CT2which must be an instanciation of a CGAL::Constrained_triangulation_2<...>.
InDomainPMapa class model of ReadablePropertyMap with CT2::Face_handle as key type and bool as value type.
Parameters
ct2the constrained triangulation to draw.
ipmthe property map defining the faces which are in the domain.
gsthe graphic scene to fill.
Advanced

The real declaration of this function template is:

template<class Gt, class Tds, class Itag, class InDomainPMap>

void CGAL::add_to_graphics_scene(const CGAL::Constrained_triangulation_2<Gt, Tds, Itag>& ct2, InDomainPMap ipm, CGAL::Graphics_scene& gs);

◆ draw()

template<class CT2 , class InDomainPMap >
void CGAL::draw ( const CT2 &  ct2,
InDomainPMap  ipm 
)

#include <CGAL/draw_constrained_triangulation_2.h>

opens a new window and draws a constrained triangulation.

If the triangulation has constraints they are drawn. The faces inside and outside of the domain, based on the property map, are drawn in different colors.

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
CT2which must be an instanciation of a CGAL::Constrained_triangulation_2<...>.
InDomainPMapa class model of ReadablePropertyMap with CT2::Face_handle as key type and bool as value type.
Parameters
ct2the constrained triangulation to draw.
ipmthe property map defining the faces which are in the domain.
Advanced

The real declaration of this function template is:

template<class Gt, class Tds, class Itag, class InDomainPMap>

void CGAL::draw(const CGAL::Constrained_triangulation_2<Gt, Tds, Itag>& ct2, InDomainPMap ipm);