The class Periodic_triangulation_3 represents a 3-dimensional triangulation of a point set in c3.
#include <CGAL/Periodic_3_triangulation_3.h>
The first template argument PT must be a model of the Periodic_3DelaunayTriangulationTraits_3 concept.
The second template argument TDS must be a model of the TriangulationDataStructure_3 concept with some additional functionality in cells and vertices. Its default value is Triangulation_data_structure_3<Triangulation_vertex_base_3<PT,Periodic_3_triangulation_ds_vertex_base_3<>>,Triangulation_cell_base_3<PT,Periodic_3_triangulation_ds_cell_base_3<>>>.
|
|
|
|
|
|
| ||
|
||
| ||
| A type representing an axis-aligned cuboid. It must be a model of PT::Iso_cuboid_3. Used to represent the original domain. | |
|
| Integer triple to store the number of sheets in each direction of space. |
|
|
|
| ||
|
||
| ||
|
||
| ||
|
||
| ||
| Represents a point-offset pair. The point in the pair lies in the original domain. | |
|
|
|
|
|
|
|
|
Only vertices (0-faces) and cells (3-faces) are stored. Edges (1-faces) and facets (2-faces) are not explicitly represented and thus there are no corresponding classes (see Section 39.2).
The vertices and faces of the triangulations are accessed through handles, iterators and circulators. A handle is a type which supports the two dereference operators operator* and operator->. The Handle concept is documented in the support library. Iterators and circulators are bidirectional and non-mutable. The edges and facets of the triangulation can also be visited through iterators and circulators which are bidirectional and non-mutable.
Iterators and circulators are convertible to the corresponding handles, thus the user can pass them directly as arguments to the functions.
To specify which case occurs when locating a point in the triangulation.
|
To specify the behavior of geometric iterators.
|
| |||
Introduces an empty triangulation t with domain as
original domain.
| |||
| |||
Copy constructor. All vertices and faces are duplicated.
|
|
| |
The triangulation tr is duplicated, and modifying the copy after the duplication does not modify the original. The previous triangulation held by t is deleted. | ||
|
| |
The triangulations tr and t are swapped. t.swap(tr) should be preferred to t = tr or to t(tr) if tr is deleted after that. Indeed, there is no copy of cells and vertices, thus this method runs in constant time. | ||
|
| Deletes all vertices and all cells of t. |
| ||
|
| |
Equality operator. Returns true iff there exist a bijection between the vertices of t1 and those of t2 and a bijection between the cells of t1 and those of t2, which preserve the geometry of the triangulation, that is, the points of each corresponding pair of vertices are equal, and the tetrahedra corresponding to each pair of cells are equal (up to a permutation of their vertices). | ||
| ||
|
| |
The opposite of operator==. |
|
| Returns the number of sheets of the covering space the triangulation is currently computed in. |
|
| |
Changes the domain. Note that this function calls clear(), i.e., it erases the existing triangulation. |
The responsibility of keeping a valid triangulation belongs to the user when using advanced operations allowing a direct manipulation of the tds. This method is mainly a help for users implementing their own triangulation algorithms.
|
| Returns a reference to the triangulation data structure. |
|
| |
The current triangulation remains a triangulation in the 1-sheeted covering space even after adding points if this method returns true. This test relies on a heuristic, i.e. if it answers false nothing is known. This test runs in constant-time when not computing in the 1-sheeted covering space. (This test uses the length of the longest edge in the triangulation as a criterion [CT09].) | ||
|
| |
The same as is_extensible_triangulation_in_1_sheet_h1() but with a more precise heuristic, i.e. it might answer true in cases in which is_extensible_triangulation_in_1_sheet_h1() would not. However, it is much less time efficient when not computing in the 1-sheeted covering space. (This test uses the diameter of the largest empty ball in the input point set as a criterion [CT09].) | ||
|
| Returns true if the current triangulation would still be a triangulation in the 1-sheeted covering space, returns false otherwise. |
It is not recommended to interfere with the built-in covering management. Especially a premature conversion to the 1-sheeted covering space might lead to problems when modifying the triangulation later.
|
| |||
Returns the periodic point given by vertex v. If t is represented in the 1-sheeted covering space, the offset is always zero. Otherwise v can correspond to a periodic copy outside domain of an input point. | ||||
|
| |||
If t is represented in the 1-sheeted covering space, this function
returns the periodic point given by the i-th vertex of cell
c, that is the point in the original domain and the offset of
the vertex in c.
If t is represented in the 27-sheeted covering space,
this offset is possibly added to another offset determining the periodic copy.
| ||||
|
| |||
Returns the periodic segment formed by the two point-offset pairs
corresponding to the two vertices of edge (c,i,j).
| ||||
|
| Same as the previous method for edge e. | ||
|
| |||
Returns the periodic triangle formed by the three point-offset pairs
corresponding to the three vertices of facet
(c,i). The triangle is oriented so that its normal points to the
inside of cell c.
| ||||
|
| Same as the previous method for facet f. | ||
|
| |||
Returns the periodic tetrahedron formed by the four point-offset pairs corresponding to the four vertices of c. |
Note that a traits class providing exact constructions should be used in order to guarantee the following operations to be exact (as opposed to computing the triangulation only, which requires only exact predicates).
|
| |||
Tests whether p is a vertex of t by locating p in the triangulation. If p is found, the associated vertex v is given. | ||||
|
| Tests whether v is a vertex of t. | ||
|
| |||
Tests whether (u,v) is an edge of t. If the edge is found,
it gives a cell c having this edge and the indices i
and j of the vertices u and v in c, in this order.
| ||||
|
| |||
Tests whether ((u,offu),(v,offu)) is an edge of
t. If the edge is found, it gives a cell c having this
edge and the indices i and j of the vertices u and
v in c, in this order.
| ||||
|
| |||
Tests whether (u,v,w) is a facet of t. If the facet is found,
it computes a cell c having this facet and the indices i,
j and k of the vertices u, v and w in c,
in this order.
| ||||
|
| |||
Tests whether ((u,offu),(v,offv),(w,offw))
is a facet of t. If the facet is found,
it computes a cell c having this facet and the indices i,
j and k of the vertices u, v and w in c,
in this order.
| ||||
|
| Tests whether c is a cell of t. | ||
|
| |||
Tests whether (u,v,w,x) is a cell of t.
If the cell c is found, the method
computes the indices i, j, k and l of the
vertices u, v, w and x in c, in this
order.
| ||||
|
| |||
Tests whether (u,v,w,x) is a cell of t and computes
this cell c.
| ||||
|
| |||
Tests whether
((u,offu),(v,offv),(w,offv),(x,offx)) is a cell of t.
If the cell c is found, the method
computes the indices i, j, k and l of the
vertices u, v, w and x in c, in this
order.
| ||||
|
| |||
Tests whether
((u,offu),(v,offv),(w,offv),(x,offx)) is a
cell of t and computes this cell c.
|
There is a method has_vertex in the cell class. The analogous methods for facets are defined here.
|
| |
If v is a vertex of f, then j is the index of v in the cell f.first, and the method returns true. | ||
|
| |
Same for facet (c,i). Computes the index j of v in c. | ||
|
| |
|
| |
Same as the first two methods, but these two methods do not return the index of the vertex. |
The following three methods test whether two facets have the same vertices.
|
| |
|
|
|
|
|
The class Periodic_3_triangulation_3<PT,TDS> provides three functions to locate a given point with respect to a triangulation. It provides also functions to test if a given point is inside a face or not. Note that the class Periodic_3_Delaunay_triangulation_3 also provides a nearest_vertex() function.
|
| |||
Returns the cell that contains the query in its interior. If
query lies on a facet, an edge or on a vertex, one of the cells
having query on its boundary is returned. The optional argument start is used as a starting place for the search.
| ||||
|
| |||
The k-face that contains query in its interior is
returned, by means of the cell returned together with lt, which
is set to the locate type of the query (VERTEX, EDGE, FACET, CELL) and two indices li and lj that
specify the k-face of the cell containing query. If the k-face is a cell, li and lj have no meaning; if it is a facet (resp. vertex), li gives the index of the facet (resp. vertex) and lj has no meaning; if it is an edge, li and lj give the indices of its vertices. If there is no vertex in the triangulation yet, lt is set to EMPTY and locate returns the default constructed handle. The optional argument start is used as a starting place for the search.
| ||||
|
| |||
Returns a value indicating on which side of the oriented boundary
of c the point p lies. More precisely, it returns: - ON_BOUNDED_SIDE if p is inside the cell. - ON_BOUNDARY if p on the boundary of the cell. Then lt together with li and lj give the precise location on the boundary. (See the descriptions of the locate methods.) - ON_UNBOUNDED_SIDE if p lies outside the cell.
|
The periodic triangulation class provides several iterators and circulators that allow one to traverse it.
The following iterators allow the user to visit cells, facets, edges and vertices of the stored triangulation, i.e. in case of computing in a multiply sheeted covering space all stored periodic copies of each item are returned. These iterators are non-mutable, bidirectional and their value types are respectively Cell, Facet, Edge and Vertex. They are all invalidated by any change in the triangulation.
|
| |
Iterates over the points of the triangulation. Its behavior is defined by the Iterator_type it as described on . | ||
|
| |
Past-the-end iterator. Note that to match another Periodic_point_iterator both must have the same Iterator_type it. | ||
|
| |
Iterates over the segments of the triangulation. Its behavior is defined by the Iterator_type it as described on . | ||
|
| |
Past-the-end iterator. Note that to match another Periodic_segment_iterator both must have the same Iterator_type it. | ||
|
| |
Iterates over the triangles of the triangulation. Its behavior is defined by the Iterator_type it as described on . | ||
|
| |
Past-the-end iterator. Note that to match another Periodic_triangle_iterator both must have the same Iterator_type it. | ||
|
| |
Iterates over the tetrahedra of the triangulation. Its behavior is defined by the Iterator_type it as described on . | ||
|
| |
Past-the-end iterator. Note that to match another Periodic_tetrahedron_iterator both must have the same Iterator_type it. |
The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed.
|
| Starts at an arbitrary cell incident to e. | ||
|
| |||
As above for edge (i,j) of c. | ||||
|
| |||
Starts at cell start.
| ||||
|
| |||
As above for edge (i,j) of c. | ||||
|
| Starts at an arbitrary facet incident to e. | ||
|
| |||
As above for edge (i,j) of c. | ||||
|
| |||
Starts at facet start.
| ||||
|
| |||
Starts at facet of index f in start. | ||||
|
| |||
As above for edge (i,j) of c. | ||||
|
| |||
As above for edge (i,j) of c and facet (start,f). |
|
| |||
Returns the index of c in its ith neighbor.
| ||||
|
| |||
Returns the vertex of the ith neighbor of c that is opposite to
c.
| ||||
|
| Returns the same facet viewed from the other adjacent cell. |
The responsibility of keeping a valid triangulation belongs to the user when using advanced operations allowing a direct manipulation of cells and vertices. We provide the user with the following methods to help debugging.
|
| |
Checks the combinatorial validity of the triangulation. Checks also the
validity of its geometric embedding (see
Section 39.2). When verbose is set to true, messages describing the first invalidity encountered are printed. | ||
|
| |
Checks the combinatorial validity of the cell by calling the
is_valid method of the Triangulation_data_structure cell
class. Also checks the geometric validity of c, if c is
finite. (See Section 39.2.) When verbose is set to true, messages are printed to give a precise indication of the kind of invalidity encountered. |
|
| |||
Reads a triangulation from is and stores it in t.
| ||||
|
| |||
Writes the triangulation t into os. |
The information in the iostream is:
Periodic_3_Delaunay_triangulation_3