TriangulationDataStructure_3::Cell

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 36.1.)

Types

The class TriangulationDataStructure_3::Cell defines the following types.

typedef TriangulationDataStructure_3
Triangulation_data_structure;
typedef TriangulationDataStructure_3::Vertex_handle
Vertex_handle;
typedef TriangulationDataStructure_3::Cell_handle
Cell_handle;

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.

Operations

Access Functions

Vertex_handle c.vertex ( int i) Returns the vertex i of c.
Precondition: i {0, 1, 2, 3}.
int c.index ( Vertex_handle v) Returns the index of vertex v in c.
Precondition: v is a vertex of c.
bool c.has_vertex ( Vertex_handle v) Returns true if v is a vertex of c.
bool c.has_vertex ( Vertex_handle v, int & i)
Returns true if v is a vertex of c, and computes its index i in c.

Cell_handle c.neighbor ( int i) Returns the neighbor i of c.
Precondition: i {0, 1, 2, 3}.
int c.index ( Cell_handle n) Returns the index corresponding to neighboring cell n.
Precondition: n is a neighbor of c.
bool c.has_neighbor ( Cell_handle n) Returns true if n is a neighbor of c.
bool c.has_neighbor ( Cell_handle n, int & i)
Returns true if n is a neighbor of c, and computes its index i in c.

Setting

void c.set_vertex ( int i, Vertex_handle v)
Sets vertex i to v.
Precondition: i {0, 1, 2, 3}.
void c.set_vertices ( Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
Sets the vertex pointers.

void c.set_neighbor ( int i, Cell_handle n)
Sets neighbor i to n.
Precondition: i {0, 1, 2, 3}.
void c.set_neighbors ( Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
Sets the neighbors pointers.

Checking

bool c.is_valid ( bool verbose = false, int level = 0)
User defined local validity checking function.

See Also

TriangulationDataStructure_3::Vertex.