CGAL 6.1 - 3D Constrained Triangulations
|
#include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
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.
Traits | is the geometric traits class and must be a model of ConformingConstrainedDelaunayTriangulationTraits_3 . |
Tr | is 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>> . |
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 | Vertex_handle = typename Triangulation::Vertex_handle |
using | size_type = typename Triangulation::size_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 | |
Input DataThe input data requirements are described in the documentation of the function templates. | |
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, following the same API and requirements as the function template make_conforming_constrained_Delaunay_triangulation_3(). | |
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, following the same API and requirements as the function template make_conforming_constrained_Delaunay_triangulation_3(). | |
Accessors for the Underlying Triangulation | |
const Triangulation & | triangulation () const & |
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 (const typename Triangulation::Facet &f) const |
returns whether a facet is constrained or not. | |
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) . | |
CDT_3_signed_index | face_constraint_index (typename Triangulation::Cell_handle ch, int i) const |
same as face_constraint_index(f) with f being Triangulation::Facet(ch, index) . | |
CDT_3_signed_index | face_constraint_index (const typename Triangulation::Facet &f) const |
returns the index of the constraint that constrains the facet f | |
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. | |
Checking | |
These methods are mainly a debugging help for the users of advanced features. | |
bool | is_valid (bool verbose=false) const |
returns whether the triangulation is valid. | |
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
.
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
.
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.
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_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.
CDT_3_signed_index CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::face_constraint_index | ( | const typename Triangulation::Facet & | f | ) | const |
returns the index of the constraint that constrains the facet f
is_facet_constrained(f)
CDT_3_signed_index CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::face_constraint_index | ( | typename Triangulation::Cell_handle | ch, |
int | i | ||
) | const |
same as face_constraint_index(f)
with f
being Triangulation::Facet(ch, index)
.
is_facet_constrained(f)
bool CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::is_facet_constrained | ( | const typename Triangulation::Facet & | f | ) | const |
returns whether a facet is constrained or not.
f | is a facet of the triangulation, of type Triangulation::Facet , as defined by its triangulation data structure. |
bool CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::is_valid | ( | bool | verbose = false | ) | const |
returns whether the triangulation is valid.
When verbose
is set to true
, messages describing the first invalidity encountered are printed.
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:
After calling this function, ccdt
will be empty and tr
will be move-constructed from the underlying triangulation, avoiding any copy.
const Triangulation & CGAL::Conforming_constrained_Delaunay_triangulation_3< Traits, Tr >::triangulation | ( | ) | const & |
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.
Example usage: