CGAL 4.4 - High-dimension Triangulation
|
Inherited by CGAL::Triangulation_full_cell< TriangulationTraits, Data, TriangulationDSFullCell >.
The concept TriangulationDSFullCell
describes what a full cell is in a model of the concept TriangulationDataStructure
. It sets requirements of combinatorial nature only, as geometry is not concerned here. In the context of triangulation, the term full cell refers to a face of maximal dimension. This maximality characteristic is emphasized by using the adjective full.
A TriangulationDSFullCell
is responsible for storing handles to the vertices of a full cell as well as handles to its neighbors.
CGAL::Triangulation_ds_full_cell<TriangulationDataStructure,DSFullCellStoragePolicy>
CGAL::Triangulation_full_cell<TriangulationTraits, Data, TriangulationDSFullCell>
These operators can be used directly and are called by the I/O operator of class TriangulationDataStructure
.
TriangulationDSVertex
TriangulationDSFace
TriangulationDataStructure
Triangulation
Public Member Functions | |
Vertex_handle | mirror_vertex (const int i, const int cur_dim) const |
Returns a handle to the mirror vertex of the i -th vertex of full cell c . More... | |
Types | |
typedef Hidden_type | Triangulation_data_structure |
typedef Hidden_type | Vertex_handle |
A handle to a vertex. More... | |
typedef Hidden_type | Vertex_handle_iterator |
An iterator over the handles to the vertices of the full cell. More... | |
typedef Hidden_type | Full_cell_handle |
A handle to a full cell. More... | |
typedef TriangulationDataStructure::Full_cell_data | TDS_data |
A data member of this type has to be stored and accessible through access function below. More... | |
template<typename TDS2 > | |
using | Rebind_TDS = unspecified_type |
This nested template class has to define a type Rebind_TDS<TDS2>::Other which is the rebound vertex, that is, the one that will be actually used by Triangulation_data_structure . More... | |
Creation | |
If you want to create a full cell as part of a | |
TriangulationDSFullCell (int dmax) | |
Sets the maximum possible dimension of the full cell. More... | |
TriangulationDSFullCell (const TriangulationDSFullCell &fc) | |
Copy constructor. More... | |
Access functions | |
int | maximal_dimension () const |
Returns one less than the maximum number of vertices that the full cell can store. More... | |
Vertex_handle_iterator | vertices_begin () const |
Returns an iterator to the first Vertex_handle stored in the full cell. More... | |
Vertex_handle_iterator | vertices_end () const |
Returns an iterator pointing beyond the last Vertex_handle stored in the full cell. More... | |
Vertex_handle | vertex (const int i) const |
Returns the i -th vertex of the full cell. More... | |
Full_cell_handle | neighbor (const int i) const |
Returns the full cell opposite to the i -th vertex of the full cell c . More... | |
int | mirror_index (const int i) const |
Returns the index j of the full cell c as a neighbor in the full cell c .neighbor(i); . More... | |
int | index (Full_cell_handle n) const |
Returns the index i such that c .neighbor(i)==n . More... | |
int | index (Vertex_handle v) const |
Returns the index i of the vertex v such that c .vertex(i)==v . More... | |
Internal | |
Advanced These functions are used internally by the triangulation data structure. The user is not encouraged to use them directly as they may change in the future. | |
const TDS_data & | tds_data () const |
Returns the data member of type TDS_data . More... | |
TDS_data & | tds_data () |
Same as above, but returns a reference to a non-const object. More... | |
Update functions | |
void | set_vertex (const int i, Vertex_handle v) |
Sets the \( i\)-th vertex of the full cell. More... | |
void | set_neighbor (const int i, Full_cell_handle n) |
Sets the i -th neighbor of c to n . More... | |
void | set_mirror_index (const int i, const int index) |
Sets the mirror index of the \( i\)-th vertex of c to index . More... | |
void | swap_vertices (int d1, int d2) |
Switches the orientation of the full cell c by swapping its vertices with index d1 and d2 . More... | |
Queries | |
bool | has_vertex (Vertex_handle v) const |
Returns true if the vertex v is a vertex of the full cell c . More... | |
bool | has_vertex (Vertex_handle v, int &ret) const |
Returns true and sets the value of ret to the index of v in c if the vertex v is a vertex of the full cell c . More... | |
bool | has_neighbor (Full_cell_handle n) const |
Returns true if the full cell n is a neighbor of the full cell c . More... | |
bool | has_neighbor (Full_cell_handle n, int &ret) const |
Returns true and sets the value of ret to the index of n as a neighbor of c if the full cell n is a neighbor of the full cell c . More... | |
Validity check | |
bool | is_valid (bool verbose=false) const |
Performs some validity checks on the full cell c . More... | |
Memory management | |
These member functions are required by See the documentation of | |
void * | for_compact_container () const |
void *& | for_compact_container () |
template<class TriangulationDataStructure > | |
std::ostream & | operator<< (std::ostream &os, const Triangulation_ds_full_cell< TriangulationDataStructure > &c) |
template<class TriangulationDataStructure > | |
std::istream & | operator>> (std::istream &is, Triangulation_ds_full_cell< TriangulationDataStructure > &c) |
typedef Hidden_type TriangulationDSFullCell::Full_cell_handle |
A handle to a full cell.
It must be the same as the nested type TriangulationDataStructure::Full_cell_handle
.
using TriangulationDSFullCell::Rebind_TDS = unspecified_type |
This nested template class has to define a type Rebind_TDS<TDS2>::Other
which is the rebound vertex, that is, the one that will be actually used by Triangulation_data_structure
.
The Rebind_TDS<TDS2>::Other
type will be the real base class of Triangulation_data_structure::Full_cell
.
A data member of this type has to be stored and accessible through access function below.
typedef Hidden_type TriangulationDSFullCell::Triangulation_data_structure |
Triangulation_data_structure
in which the TriangulationDSFullCell
is defined/used.Must be a model of the TriangulationDataStructure
concept.
typedef Hidden_type TriangulationDSFullCell::Vertex_handle |
A handle to a vertex.
It must be the same as the nested type TriangulationDataStructure::Vertex_handle
.
typedef Hidden_type TriangulationDSFullCell::Vertex_handle_iterator |
An iterator over the handles to the vertices of the full cell.
TriangulationDSFullCell::TriangulationDSFullCell | ( | int | dmax | ) |
Sets the maximum possible dimension of the full cell.
TriangulationDSFullCell::TriangulationDSFullCell | ( | const TriangulationDSFullCell & | fc | ) |
Copy constructor.
void* TriangulationDSFullCell::for_compact_container | ( | ) | const |
void* & TriangulationDSFullCell::for_compact_container | ( | ) |
bool TriangulationDSFullCell::has_neighbor | ( | Full_cell_handle | n | ) | const |
Returns true
if the full cell n
is a neighbor of the full cell c
.
Returns false
otherwise.
bool TriangulationDSFullCell::has_neighbor | ( | Full_cell_handle | n, |
int & | ret | ||
) | const |
Returns true
and sets the value of ret
to the index of n
as a neighbor of c
if the full cell n
is a neighbor of the full cell c
.
Returns false
otherwise.
bool TriangulationDSFullCell::has_vertex | ( | Vertex_handle | v | ) | const |
Returns true
if the vertex v
is a vertex of the full cell c
.
Returns false
otherwise.
bool TriangulationDSFullCell::has_vertex | ( | Vertex_handle | v, |
int & | ret | ||
) | const |
Returns true
and sets the value of ret
to the index of v
in c
if the vertex v
is a vertex of the full cell c
.
Returns false
otherwise.
int TriangulationDSFullCell::index | ( | Full_cell_handle | n | ) | const |
Returns the index i
such that c
.neighbor(i)==n
.
n
must be a neighbor of c
. int TriangulationDSFullCell::index | ( | Vertex_handle | v | ) | const |
Returns the index i
of the vertex v
such that c
.vertex(i)==v
.
v
must be a vertex of the c
. bool TriangulationDSFullCell::is_valid | ( | bool | verbose = false | ) | const |
Performs some validity checks on the full cell c
.
It must at least check that for each existing neighbor n
, c
is also a neighbor of n
.
Returns true
if all the tests pass, false
if any test fails. See the documentation for the models of this concept to see the additionnal (if any) validity checks that they implement.
int TriangulationDSFullCell::maximal_dimension | ( | ) | const |
Returns one less than the maximum number of vertices that the full cell can store.
This does not return the dimension of the actual full cell stored in c
.
int TriangulationDSFullCell::mirror_index | ( | const int | i | ) | const |
Returns the index j
of the full cell c
as a neighbor in the full cell c
.neighbor(i);
.
If the returned integer is not negative, it holds that c.neighbor(i)->neighbor(j) == c
. Returns -1
if c
has no adjacent full cell of index i
.
maximal_dimension()
. Vertex_handle TriangulationDSFullCell::mirror_vertex | ( | const int | i, |
const int | cur_dim | ||
) | const |
Returns a handle to the mirror vertex of the i
-th vertex of full cell c
.
This function works even if the adjacency information stored in the neighbor full cell *c.neighbor(i)
is corrupted. This is useful when temporary corruption is necessary during surgical operations on a triangulation.
cur_dim
\( \leq \) maximal_dimension()
. Full_cell_handle TriangulationDSFullCell::neighbor | ( | const int | i | ) | const |
Returns the full cell opposite to the i
-th vertex of the full cell c
.
maximal_dimension()
. std::ostream& TriangulationDSFullCell::operator<< | ( | std::ostream & | os, |
const Triangulation_ds_full_cell< TriangulationDataStructure > & | c | ||
) |
c
to the stream os
.std::istream& TriangulationDSFullCell::operator>> | ( | std::istream & | is, |
Triangulation_ds_full_cell< TriangulationDataStructure > & | c | ||
) |
is
the full cell information written by operator<<
.void TriangulationDSFullCell::set_mirror_index | ( | const int | i, |
const int | index | ||
) |
Sets the mirror index of the \( i\)-th vertex of c
to index
.
This corresponds to the index, in c
->neighbor(i)
, of the full cell c
.
Note: a model of this concept may choose not to store mirror indices, in which case this function should do nothing.
maximal_dimension()
. void TriangulationDSFullCell::set_neighbor | ( | const int | i, |
Full_cell_handle | n | ||
) |
Sets the i
-th neighbor of c
to n
.
Full cell n
is opposite to the \( i\)-th vertex of c
.
maximal_dimension()
. void TriangulationDSFullCell::set_vertex | ( | const int | i, |
Vertex_handle | v | ||
) |
Sets the \( i\)-th vertex of the full cell.
maximal_dimension()
. void TriangulationDSFullCell::swap_vertices | ( | int | d1, |
int | d2 | ||
) |
Switches the orientation of the full cell c
by swapping its vertices with index d1
and d2
.
maximal_dimension()
. const TDS_data& TriangulationDSFullCell::tds_data | ( | ) | const |
Returns the data member of type TDS_data
.
It is typically used to mark the full cell as visited during operations on a TriangulationDataStructure
.
TDS_data& TriangulationDSFullCell::tds_data | ( | ) |
Same as above, but returns a reference to a non-const
object.
Vertex_handle TriangulationDSFullCell::vertex | ( | const int | i | ) | const |
Returns the i
-th vertex of the full cell.
maximal_dimension()
. Vertex_handle_iterator TriangulationDSFullCell::vertices_begin | ( | ) | const |
Returns an iterator to the first Vertex_handle
stored in the full cell.
Vertex_handle_iterator TriangulationDSFullCell::vertices_end | ( | ) | const |
Returns an iterator pointing beyond the last Vertex_handle
stored in the full cell.