CGAL 5.1 - 3D Triangulation Data Structure
TriangulationDSCellBase_3 Class Reference

#include <Concepts/TriangulationDSCellBase_3.h>

Definition

Refines:
TriangulationDataStructure_3::Cell

The concept TriangulationDSCellBase_3 describes the requirements for the cell base class of a CGAL::Triangulation_data_structure_3<Vb,Cb>.

Note that if the CGAL::Triangulation_data_structure_3 is plugged into a triangulation class, the face base class may have additional geometric requirements depending on the triangulation class.

At the base level (see the Software Design sections of the Chapters Triangulation and Triangulation Datastructure), a cell stores handles to its four vertices and to its four neighbor cells. The vertices and neighbors are indexed 0, 1, 2 and 3. Neighbor i lies opposite to vertex i.

Since the Triangulation data structure is the class which defines the handle types, the cell base class has to be somehow parameterized by the Triangulation data structure. But since it is itself parameterized by the cell and vertex base classes, there is a cycle in the definition of these classes. In order to break the cycle, the base classes for vertex and cell which are given as arguments for the Triangulation data structure use void as Triangulation data structure parameter, and the Triangulation data structure then uses a rebind-like mechanism (similar to the one specified in std::allocator) in order to put itself as parameter to the vertex and cell classes. The rebound base classes so obtained are the classes which are used as base classes for the final vertex and cell classes. More information can be found in Section Software Design.

Has Models:
CGAL::Triangulation_ds_cell_base_3<TDS>
See also
TriangulationDSVertexBase_3
CGAL::Triangulation_data_structure_3<Vb,Cb>

Types

A model of the concept TriangulationDSCellBase_3 has to provide the following types.

template<typename TDS3 >
using Rebind_TDS = unspecified_type
 This template class has to define a type Rebind_TDS<TDS3>::Other which is the rebound cell, that is, the one whose Triangulation_data_structure will be the actually used one. More...
 
typedef TriangulationDataStructure_3 Triangulation_data_structure
 
typedef TriangulationDataStructure_3::Vertex_handle Vertex_handle
 
typedef TriangulationDataStructure_3::Cell_handle Cell_handle
 

Creation

 TriangulationDSCellBase_3 ()
 Default constructor. More...
 
 TriangulationDSCellBase_3 (Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
 Initializes the vertices with v0, v1, v2, v3. More...
 
 TriangulationDSCellBase_3 (Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
 Initializes the vertices with v0, v1, v2, v3 and the neighbors with n0, n1, n2, n3. More...
 

Checking

bool is_valid (bool verbose=false, int level=0) const
 Performs any desired geometric test on a cell. More...
 

Members for Compact_container

Advanced

These member functions are required by CGAL::Triangulation_data_structure_3 because it uses CGAL::Compact_container to store its cells.

See the documentation of CGAL::Compact_container for the exact requirements.

void * for_compact_container () const
 
void *& for_compact_container ()
 

I/O

istream & operator>> (istream &is, TriangulationDSCellBase_3 &c)
 Inputs the possible non combinatorial information given by the cell. More...
 
ostream & operator<< (ostream &os, const TriangulationDSCellBase_3 &c)
 Outputs the possible non combinatorial information given by the cell. More...
 

Member Typedef Documentation

◆ Cell_handle

◆ Rebind_TDS

template<typename TDS3 >
using TriangulationDSCellBase_3::Rebind_TDS = unspecified_type

This template class has to define a type Rebind_TDS<TDS3>::Other which is the rebound cell, that is, the one whose Triangulation_data_structure will be the actually used one.

Rebind_TDS<TDS3>::Other will be the real base class of Triangulation_data_structure_3::Cell.

Note
It can be implemented using a nested template class.
See also
Section Cyclic Dependency

◆ Triangulation_data_structure

◆ Vertex_handle

Constructor & Destructor Documentation

◆ TriangulationDSCellBase_3() [1/3]

TriangulationDSCellBase_3::TriangulationDSCellBase_3 ( )

Default constructor.

◆ TriangulationDSCellBase_3() [2/3]

TriangulationDSCellBase_3::TriangulationDSCellBase_3 ( Vertex_handle  v0,
Vertex_handle  v1,
Vertex_handle  v2,
Vertex_handle  v3 
)

Initializes the vertices with v0, v1, v2, v3.

Neighbors are initialized to the default constructed handle.

◆ TriangulationDSCellBase_3() [3/3]

TriangulationDSCellBase_3::TriangulationDSCellBase_3 ( Vertex_handle  v0,
Vertex_handle  v1,
Vertex_handle  v2,
Vertex_handle  v3,
Cell_handle  n0,
Cell_handle  n1,
Cell_handle  n2,
Cell_handle  n3 
)

Initializes the vertices with v0, v1, v2, v3 and the neighbors with n0, n1, n2, n3.

Member Function Documentation

◆ for_compact_container() [1/2]

void* & TriangulationDSCellBase_3::for_compact_container ( )

◆ for_compact_container() [2/2]

void* TriangulationDSCellBase_3::for_compact_container ( ) const

◆ is_valid()

bool TriangulationDSCellBase_3::is_valid ( bool  verbose = false,
int  level = 0 
) const

Performs any desired geometric test on a cell.

This is a function for debugging purpose.

Debugging Support

When verbose is set to true, messages are printed to give a precise indication of the kind of invalidity encountered. level increases the level of testing.

◆ operator<<()

ostream& TriangulationDSCellBase_3::operator<< ( ostream &  os,
const TriangulationDSCellBase_3 c 
)

Outputs the possible non combinatorial information given by the cell.

◆ operator>>()

istream& TriangulationDSCellBase_3::operator>> ( istream &  is,
TriangulationDSCellBase_3 c 
)

Inputs the possible non combinatorial information given by the cell.