CGAL 6.1 - 3D Constrained Triangulations
Loading...
Searching...
No Matches
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation > Class Template Reference

#include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>

Definition

template<typename Traits, typename Triangulation>
class CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >

This class template represents a 3D constrained Delaunay triangulation.

It contains a data member of type Triangulation 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.
Triangulationis the underlying triangulation class. It must be 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 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 ()
 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 Triangulation & triangulation () &
 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
 determines if a facet is constrained.
 
bool is_facet_constrained (typename Triangulation::Cell_handle ch, int index) const
 determines if a facet is constrained.
 
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 Triangulation >
using CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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 Triangulation >
using CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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 Triangulation >
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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 Triangulation >
template<typename PolygonMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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.

The polygon mesh represents the polygonal constraints that will be enforced during the triangulation process.

By default, each face of the polygon mesh is considered a polygonal constraint for the triangulation. The named parameter face_patch_map can be used to define larger polygonal constraints, possibly with holes. If used, the argument for this parameter must be a property map that associates each face of the polygon mesh with a patch identifier. Faces sharing the same patch identifier are considered part of the same surface patch. Each of these surface patches (defined as the union of the mesh faces with a given patch ID) is expected to be a polygon or a polygon with holes, having coplanar vertices (or nearly coplanar, up to the precision of the number type used).

The generated triangulation will be constrained to conform to the faces of the polygon mesh or to the surface patches described by the face_patch_map property map, if provided.

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 Triangulation >
template<typename PointRange , typename PolygonRange , typename NamedParams = parameters::Default_named_parameters>
CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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.

The polygon soup represents the polygonal constraints that will be enforced during the triangulation process.

By default, each face of the polygon soup is considered a polygonal constraint for the triangulation. The named parameter face_patch_map can be used to define larger polygonal constraints, possibly with holes. If used, the argument for this parameter must be a property map that associates each face of the polygon soup 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 faces with a given patch ID) is expected to be a polygon or a polygon with holes, having coplanar vertices (or nearly coplanar, up to the precision of the number type used).

The triangulation will be constrained to conform to the faces of the polygon soup or to the surface patches described by the face_patch_map property map, if provided.

Template Parameters
PointRangea model of the concept RandomAccessContainer whose value type is the point type.
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
  • a property map associating points with the elements of the range points.
  • Type: a model of ReadablePropertyMap whose value type is a point type convertible to the point type.
  • Default: CGAL::Identity_property_map.

  • 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 Triangulation >
Constrained_facets_range CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::constrained_facets ( ) const

returns a range of the constrained facets.

Its iterator type is Constrained_facets_iterator.

◆ constrained_facets_begin()

template<typename Traits , typename Triangulation >
Constrained_facets_iterator CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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() [1/2]

template<typename Traits , typename Triangulation >
bool CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::is_facet_constrained ( typename Triangulation::Cell_handle  ch,
int  index 
) const

determines if a facet is constrained.

The facet is identified by a cell handle and an index.

Parameters
chThe cell handle of the facet.
indexThe index of the facet in the cell.

◆ is_facet_constrained() [2/2]

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

determines 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 Triangulation >
const Triangulation & CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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 Triangulation >
Triangulation CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Triangulation >::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 = std::move(ccdt).triangulation();

After calling this function, cdt 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.