Loading [MathJax]/extensions/TeX/AMSmath.js
 
CGAL 6.1 - 3D Constrained Triangulations
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Loading...
Searching...
No Matches
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr > Class Template Reference

#include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>

Definition

template<typename Traits, typename Tr = CGAL::Default>
class CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >

This class template represents a 3D conforming constrained Delaunay triangulation.

It contains a data member of type Tr and provides additional functionality for handling polygonal constraints during the triangulation process.

Template Parameters
Traitsis the geometric traits class and must be a model of ConformingConstrainedDelaunayTriangulationTraits_3.
Tris the underlying triangulation class. It must be CGAL::Default or an instance of the CGAL::Triangulation_3 class template with the same Traits template parameter. Its Vertex type must be a model of ConformingConstrainedDelaunayTriangulationVertexBase_3, and its Cell type must be a model of ConformingConstrainedDelaunayTriangulationCellBase_3.
The default value is Triangulation_3<Traits, TDS> where TDS is Triangulation_data_structure_3<Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits>, Conforming_constrained_Delaunay_triangulation_cell_base_3<Traits>>.
Examples
Constrained_triangulation_3/remesh_constrained_Delaunay_triangulation_3.cpp.

Public Types

using Triangulation = typename CGAL::Default::Get< Tr, Triangulation_3< Traits, Triangulation_data_structure_3< Conforming_constrained_Delaunay_triangulation_vertex_base_3< Traits >, Conforming_constrained_Delaunay_triangulation_cell_base_3< Traits > > > >::type
 The internal triangulation type.
 
using Constrained_facets_iterator = unspecified_type
 A bidirectional iterator for visiting all constrained facets of the triangulation.
 
using Constrained_facets_range = CGAL::Iterator_range< Constrained_facets_iterator >
 defines a range type for iterating over the constrained facets.
 

Constructors

Conforming_constrained_Delaunay_triangulation_3 can be constructed from either a polygon soup or a polygon mesh.

Input Data

The input data (polygon mesh or polygon soup) represents the polygonal constraints enforced during the triangulation process.By default, each face of the input is considered a polygonal constraint for the triangulation. The named parameter face_patch_map can be used to describe larger polygonal constraints, possibly with holes. If used, this parameter must be a property map that associates each face of the input with a patch identifier. Faces with the same patch identifier are considered part of the same surface patch. Each of these surface patches (defined as the union of the input faces with a given patch identifier) is expected to be a polygon or a polygon with holes, with coplanar vertices (or nearly coplanar up to the precision of the number type used).The generated triangulation will conform to the faces of the input or to the surface patches described by the face_patch_map property map if provided.

 Conforming_constrained_Delaunay_triangulation_3 ()
 default constructor.
 
template<typename PolygonMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
 Conforming_constrained_Delaunay_triangulation_3 (const PolygonMesh &mesh, const NamedParameters &np=parameters::default_values())
 creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.
 
template<typename PointRange , typename PolygonRange , typename NamedParams = parameters::Default_named_parameters>
 Conforming_constrained_Delaunay_triangulation_3 (const PointRange &points, const PolygonRange &polygons, const NamedParams &np=parameters::default_values())
 creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon soup.
 

Accessors for the Underlying Triangulation

const Triangulationtriangulation () &
 returns a const reference to the underlying triangulation.
 
Triangulation triangulation () &&
 moves and returns the underlying triangulation, then clears the object.
 

Accessors for Constrained Facets

bool is_facet_constrained (typename Triangulation::Facet f) const
 returns if a facet is constrained.
 
bool is_facet_constrained (typename Triangulation::Cell_handle ch, int index) const
 same as is_facet_constrained(f) with f being Triangulation::Facet(ch, index).
 
Triangulation::size_type number_of_constrained_facets () const
 returns the number of constrained facets in the triangulation.
 
Constrained_facets_iterator constrained_facets_begin () const
 returns an iterator to the start of the sequence of constrained facets.
 
Constrained_facets_iterator constrained_facets_end () const
 returns the past-the-end iterator of the sequence of constrained facets.
 
Constrained_facets_range constrained_facets () const
 returns a range of the constrained facets.
 

Member Typedef Documentation

◆ Constrained_facets_iterator

template<typename Traits , typename Tr = CGAL::Default>
using CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::Constrained_facets_iterator = unspecified_type

A bidirectional iterator for visiting all constrained facets of the triangulation.

The value type of this iterator is Triangulation::Facet.

◆ Constrained_facets_range

template<typename Traits , typename Tr = CGAL::Default>
using CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::Constrained_facets_range = CGAL::Iterator_range<Constrained_facets_iterator>

defines a range type for iterating over the constrained facets.

This type is used to iterate through all facets that are constrained. Its iterator type is Constrained_facets_iterator.

Constructor & Destructor Documentation

◆ Conforming_constrained_Delaunay_triangulation_3() [1/3]

template<typename Traits , typename Tr = CGAL::Default>
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::Conforming_constrained_Delaunay_triangulation_3 ( )

default constructor.

This constructor initializes an empty Conforming_constrained_Delaunay_triangulation_3 object.

◆ Conforming_constrained_Delaunay_triangulation_3() [2/3]

template<typename Traits , typename Tr = CGAL::Default>
template<typename PolygonMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::Conforming_constrained_Delaunay_triangulation_3 ( const PolygonMesh &  mesh,
const NamedParameters &  np = parameters::default_values() 
)

creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.

Template Parameters
PolygonMesha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
meshThe polygon mesh representing the constraints.
npAn optional sequence of Named Parameters among those listed below.
Optional Named Parameters
  • A property map associating points with the vertices of mesh.
  • Type: A class model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as the key type and Traits::Point_3 as the value type.
  • Default: boost::get(CGAL::vertex_point, mesh)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.

  • An instance of a geometric traits class.
  • Type: Traits
  • Default: The default constructed traits object Traits{}.

  • A property map associating a patch identifier with each face of mesh.
  • Type: A class model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::face_descriptor as the key type and with any value type that is a regular type (model of Regular).
  • Extra: If this parameter is omitted, each face of the mesh is considered as a separate patch.
  • Extra: Faces with the same patch identifier are considered as part of the same surface patch.

Precondition
The mesh must be free of self-intersections. It can be verified using: CGAL::Polygon_mesh_processing::does_self_intersect(mesh, np) (click on the link for details).

◆ Conforming_constrained_Delaunay_triangulation_3() [3/3]

template<typename Traits , typename Tr = CGAL::Default>
template<typename PointRange , typename PolygonRange , typename NamedParams = parameters::Default_named_parameters>
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::Conforming_constrained_Delaunay_triangulation_3 ( const PointRange &  points,
const PolygonRange &  polygons,
const NamedParams &  np = parameters::default_values() 
)

creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon soup.

Template Parameters
PointRangea model of the concept RandomAccessContainer whose value type is the point type of the polygon soup.
PolygonRangea model of the concept RandomAccessContainer whose value type is a model of the concept RandomAccessContainer whose value type is std::size_t.
NamedParametersa sequence of Named Parameters.
Parameters
pointsa range of points representing the vertices of the polygon soup.
polygonsa range of ranges of indices representing the faces of the polygon soup.
npan optional sequence of Named Parameters among those listed below.
Optional Named Parameters

  • an instance of a geometric traits class.
  • Type: Traits.
  • Default: the default constructed traits object Traits{}.

  • a property map associating a patch identifier with each face of the soup.
  • Type: a class model of ReadWritePropertyMap with std::size_t as the key type and with any value type that is a regular type (model of Regular).
  • Extra: If this parameter is omitted, each face of the polygon soup is considered as a separate patch.
  • Extra: Faces with the same patch identifier are considered as part of the same surface patch.

Precondition
The polygon soup must be free of self-intersections. It can be verified using: CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points, polygons, np) (click on the link for details).

Member Function Documentation

◆ constrained_facets()

template<typename Traits , typename Tr = CGAL::Default>
Constrained_facets_range CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::constrained_facets ( ) const

returns a range of the constrained facets.

Its iterator type is Constrained_facets_iterator.

◆ constrained_facets_begin()

template<typename Traits , typename Tr = CGAL::Default>
Constrained_facets_iterator CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::constrained_facets_begin ( ) const

returns an iterator to the start of the sequence of constrained facets.

This function provides an iterator to the first facet that is constrained within the triangulation. The sequence of constrained facets is in an arbitrary order.

◆ is_facet_constrained()

template<typename Traits , typename Tr = CGAL::Default>
bool CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::is_facet_constrained ( typename Triangulation::Facet  f) const

returns if a facet is constrained.

Parameters
fis a facet of the triangulation, of type Triangulation::Facet, as defined by its triangulation data structure .

◆ triangulation() [1/2]

template<typename Traits , typename Tr = CGAL::Default>
const Triangulation & CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::triangulation ( ) &

returns a const reference to the underlying triangulation.

This allows the use of all non-modifying functions of the base triangulation. See the other overload for a way to move the triangulation out of this object and then modify it.

◆ triangulation() [2/2]

template<typename Traits , typename Tr = CGAL::Default>
Triangulation CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::triangulation ( ) &&

moves and returns the underlying triangulation, then clears the object.

This function allows the underlying triangulation to be moved out of this object. Example usage:

Tr tr = CGAL::convert_to_triangulation_3(std::move(ccdt));
CGAL::Triangulation_3< typename Tr::Geom_traits, typename Tr::Triangulation_data_structure > convert_to_triangulation_3(CGAL::Mesh_complex_3_in_triangulation_3< Tr, CornerIndex, CurveIndex > c3t3, const NamedParameters &np=parameters::default_values())

After calling this function, ccdt will be empty and tr will be move-constructed from the underlying triangulation, avoiding any copy.

Note
This function is available only when the object is an rvalue.
Postcondition
After this function is called, the object is in a state equivalent to that of a default-constructed object.