TriangulationDSVertexBase_2

Definition

The concept TriangulationDSVertexBase_2 describes the requirements for the vertex base class of a Triangulation_data_structure_2<Vb,Fb>.

Note that if the Triangulation_data_structure_2 is plugged into a triangulation class, the vertex base class has additional geometric requirements depending on the triangulation class.

At the base level, provides access to one of its incident face through a Face_handle.

Since the Triangulation_data_structure_2 is the class which defines the handle types, the vertex base class has to be somehow parameterized by the triangulation data structure. But since the Triangulation_data_structure_2 itself is parameterized by the face and vertex base classes, there is a cycle in the definition of these classes. In order to break the cycle, the base classes for faces and vertices which are plugged in to instantiate a Triangulation_data_structure_2 use a void as triangulation data structure parameter. Then, the Triangulation_data_structure_2 uses a rebind mecanism (similar to the one specified in std::allocator) in order to plug itself as parameter in the face and vertex base classes. This mecanism requires that the base class provides a templated nested class Rebind_TDS that itself provides the subtype Rebind_TDS<TDS2>::Other which is the rebound version of the base class. This rebound base class is the class that the Triangulation_data_structure_2 actually uses as a base class for the class of Triangulation_data_structure_2::Vertex.

Types

The concept TriangulationDSVertexBase_2 has to provide the following types.

template <typename TDS2>
TriangulationDSVertexBase_2:: struct Rebind_TDS;
This nested template class has to define a type Other which is the rebound vertex base , where the actual Triangulation_data_structure_2 is plugged in. This type Other will be the actual base of the class Triangulation_data_structure_2::Vertex.

typedef TriangulationDataStructure_2
Triangulation_data_structure;
typedef TriangulationDataStructure_2::Vertex_handle
Vertex_handle;
typedef TriangulationDataStructure_2::Face_handle
Face_handle;

Creation

TriangulationDSVertexBase_2 v;
default constructor.

TriangulationDSVertexBase_2 v ( Face_handle f);
Constructs a vertex pointing to face f.

Access Functions

Face_handle v.face () returns an incident face.

Setting

void v.set_face ( Face_handle c)
Sets the incident face.

Checking

bool v.is_valid ( bool verbose=false)
Performs any desired test on a vertex. Checks that the pointer to an incident face is not NULL.

Various

void * v.for_compact_container ()
void * & v.for_compact_container ()
These member functions are required by Triangulation_data_structure_2 because it uses Compact_container to store its faces. See the documentation of Compact_container for the exact requirements.

I/O

istream& istream& is >> & v
Inputs the non-combinatorial information possibly stored in the vertex.

ostream& ostream& os << v Outputs the non combinatorial operation possibly stored in the vertex.

Has Models

CGAL::Triangulation_ds_vertex_base_2<Tds>
CGAL::Triangulation_vertex_base_2<Traits,Vb>
CGAL::Regular_triangulation_vertex_base_2<Traits,Vb>
CGAL::Triangulation_hierarchy_vertex_base_2<Vb>
CGAL::Triangulation_vertex_base_with_info_2<Info,Traits,vb>

See Also

TriangulationVertexBase_2
TriangulationDSFaceBase_2
TriangulationFaceBase_2
TriangulationDataStructure_2::Vertex
Triangulation_data_structure_2<Vb,Fb>