|
CGAL 4.4 - High-dimension Triangulation
|
Triangulation is used to store and query the full cells and vertices of a triangulationin dimension \( d\)(see the User Manual for a definition of "triangulation"). FullCellData describes the requirements on the type which is used to mark some full cells, during modifications of the triangulation data structure. FullCellData. TriangulationDSFace::set_index is called. Triangulation_data_structure in which the TriangulationDSFace is defined/used. c to the stream os. is the full cell information written by operator<<. Triangulation_data_structure in which the TriangulationDSFullCell is defined/used. v to the stream os. is the vertex information written by operator<<. Triangulation_data_structure in which the TriangulationDSVertex is defined/used. Orientation_d predicate (but not necessarily the one of Point_d). [start, end); the value can be CGAL::POSITIVE, CGAL::NEGATIVE or CGAL::COPLANAR. A simplex having \( d+1 \) vertices is said of dimension \( d \). The simplicial complex is pure if all the maximal simplices have the same dimension.
In the sequel, we will call these maximal simplices full cells. A face of a simplex is a subset of it. A proper face of a simplex is a strict subset of it.A complex has no boundaries if any proper face of a simplex is also a proper face of another simplex. A pure complex is manifold if all faces of dimension \( d-1 \) are proper faces of exactly two simplices.
The class CGAL::Triangulation<TriangulationTraits, TriangulationDataStructure> describes an embedded triangulation that has as vertices a given set of points and which fills the convex hull of these points. Methods are provided for the insertion of points in the triangulation, the traversal of various elements of the triangulation, as well as the localization of a query point inside the triangulation. The convex hull of the points is part of the triangulation, the fact that there is no boundary is ensured by adding an infinite vertex and infinite full cells to triangulate the outside of the convex hull.
See Chapter 3D Triangulations for more details about infinite vertices and cells.
A TriangulationDataStructure has a maximal dimension which is a positive integer equal to the maximum dimension a full cell can have. This maximal dimension can be chosen by the user at the creation of a TriangulationDataStructure and can then be queried using the method tds.maximal_dimension(). A TriangulationDataStructure also knows the current dimension of its full cells, which can be queried with tds.current_dimension(). In the sequel, let us denote the maximal dimension with \( D \) and the current dimension with \( d \). The inequalities \( -2 \leq d \leq D\) and \( 0 \le D\) always hold. The special meaning of negative values for \(d\) is explained below.
Possible values of \(d\) (the current dimension of the triangulation) include
Faces of dimension between 0 and \( d-1 \) can be accessed as subfaces of a full cell.
Template parameters
The default values are
CGAL::Triangulation_ds_vertex<TDS>andCGAL::Triangulation_ds_full_cell<TDS>whereTDSis the current classTriangulation_data_structure<Dimensionality, TriangulationDSVertex, TriangulationDSFullCell>This creates a circular dependency, which we resolve in the same way as in the CGALTriangulation_2andTriangulation_3packages (see Chapters chapterTDS2, chapterTriangulation2, chapterTDS3, and chapterTriangulation3). In particular, models of the conceptsTriangulationDSVertexandTriangulationDSFullCellmust provide a nested templateRebind_TDSwhich is documented in those two concept's reference manual pages. This mechanism can be used to provide a custom vertex or full cell class. The user is encouraged to read the documentation of the CGALTriangulation_2orTriangulation_3package.The class
CGAL::Triangulation<TriangulationTraits, TriangulationDataStructure>maintains a geometric triangulation in Euclidean space. More precisely, it maintains a triangulation (a partition into pairwise interior-disjoint full cells) of the convex hull of the points (the embedded vertices) of the triangulation. A special vertex at infinity is added to the convex hull facets to create infinite full cells and make the triangulation homeomorphic to a sphere of one dimension higher.The ordering of the vertices of a full cell defines an orientation of that full cell. As long as no advanced class method is called, it is guaranteed that all finite full cells have positive orientation. The infinite full cells are oriented as if the infinite vertex have been on the the other side of the hyperplane supported by the convex hull facets that the other points.
The dimension of the predicates provided by
TriangulationTraitsmust match the dimension of theTriangulationDataStructure.The template parameter
TriangulationDataStructuremust be a model of the conceptTriangulationDataStructurewhich provides the triangulation data structure as described in the previous section.(include files
triangulation1.cppandtriangulation2.cppare given and commented below).One important difference between the two examples above is that the first uses little memory but traverses all the full cells, while the second visits only the infinite full cells but stores handles to them into the potentially big array
infinite_full_cells.