CGAL 5.4.1 - 3D Triangulation Data Structure
TriangulationDataStructure_3::Cell Concept Reference

Definition

The concept TriangulationDataStructure_3::Cell stores four Vertex_handles to its four vertices and four Cell_handles to its four neighbors. The vertices are indexed 0, 1, 2, and 3 in consistent order. The neighbor indexed \( i\) lies opposite to vertex i.

In degenerate dimensions, cells are used to store faces of maximal dimension: in dimension 2, each cell represents only one facet of index 3, and 3 edges \( (0,1)\), \( (1,2)\) and \( (2,0)\); in dimension 1, each cell represents one edge \( (0,1)\). (See also Section Representation.)

Creation

In order to obtain new cells or destruct unused cells, the user must call the create_cell() and delete_cell() methods of the triangulation data structure.

See also
TriangulationDataStructure_3::Vertex
TriangulationDataStructure_3::Cell_data

Types

typedef TriangulationDataStructure_3 Triangulation_data_structure
 
typedef TriangulationDataStructure_3::Vertex_handle Vertex_handle
 
typedef TriangulationDataStructure_3::Cell_handle Cell_handle
 
typedef TriangulationDataStructure_3::Cell_data TDS_data
 

Access Functions

Vertex_handle vertex (int i) const
 Returns the vertex i of c. More...
 
int index (Vertex_handle v) const
 Returns the index of vertex v in c. More...
 
bool has_vertex (Vertex_handle v) const
 Returns true if v is a vertex of c.
 
bool has_vertex (Vertex_handle v, int &i) const
 Returns true if v is a vertex of c, and computes its index i in c.
 
Cell_handle neighbor (int i) const
 Returns the neighbor i of c. More...
 
int index (Cell_handle n) const
 Returns the index corresponding to neighboring cell n. More...
 
bool has_neighbor (Cell_handle n) const
 Returns true if n is a neighbor of c.
 
bool has_neighbor (Cell_handle n, int &i) const
 Returns true if n is a neighbor of c, and computes its index i in c.
 

Setting

void set_vertex (int i, Vertex_handle v)
 Sets vertex i to v. More...
 
void set_vertices (Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
 Sets the vertex pointers.
 
void set_neighbor (int i, Cell_handle n)
 Sets neighbor i to n. More...
 
void set_neighbors (Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
 Sets the neighbors pointers.
 

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.

TDS_datatds_data ()
 
const TDS_datatds_data () const
 

Checking

bool is_valid (bool verbose=false, int level=0) const
 This is a function for debugging purpose. More...
 

Member Function Documentation

◆ index() [1/2]

int TriangulationDataStructure_3::Cell::index ( Vertex_handle  v) const

Returns the index of vertex v in c.

Precondition
v is a vertex of c.

◆ index() [2/2]

int TriangulationDataStructure_3::Cell::index ( Cell_handle  n) const

Returns the index corresponding to neighboring cell n.

Precondition
n is a neighbor of c.

◆ is_valid()

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

This is a function for debugging purpose.

Debugging Support

User defined local validity checking function.

◆ neighbor()

Cell_handle TriangulationDataStructure_3::Cell::neighbor ( int  i) const

Returns the neighbor i of c.

Precondition
\( i \in\{0, 1, 2, 3\}\).

◆ set_neighbor()

void TriangulationDataStructure_3::Cell::set_neighbor ( int  i,
Cell_handle  n 
)

Sets neighbor i to n.

Precondition
\( i \in\{0, 1, 2, 3\}\).

◆ set_vertex()

void TriangulationDataStructure_3::Cell::set_vertex ( int  i,
Vertex_handle  v 
)

Sets vertex i to v.

Precondition
\( i \in\{0, 1, 2, 3\}\).

◆ vertex()

Vertex_handle TriangulationDataStructure_3::Cell::vertex ( int  i) const

Returns the vertex i of c.

Precondition
\( i \in\{0, 1, 2, 3\}\).