Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Definition

A cell of a triangulation gives access to its four vertices indexed 0, 1, 2, and 3 in positive orientation and to its four adjacent cells, also called neighbors. The neighbors are indexed in such a way that neighbor i lies opposite to vertex i.

In degenerate dimensions, cells are used to store faces of maximal dimension: (Section reference).

#include <CGAL/Triangulation_cell_3.h>

Inherits From

Tds::Cell

Types

The class Triangulation_cell_3<Traits,Tds> defines the same types as the Triangulation_vertex_3<Traits,Tds> class.


begin of advanced section

Creation

The user needs to construct cells explicitly only when implementing his own triangulation algorithms. The constructors of a cell do not insert it into any triangulation. To add a cell to a given triangulation, the add_cell() method of the triangulation must be used. Note that a given cell can be inserted into only textitone triangulation.

Triangulation_cell_3<Traits,Tds> c;
Introduces a cell c and initializes all its vertices and neighbors in such a way that tests on the handles for equality with NULL will answer true.


Triangulation_cell_3<Traits,Tds> c ( Vertex_handle v0,
Vertex_handle v1,
Vertex_handle v2,
Vertex_handle v3);
Introduces a cell c, and initializes its vertices. The neighbors are initialized so that tests on the handles for equality with NULL will answer true.


Triangulation_cell_3<Traits,Tds> c ( Vertex_handle v0,
Vertex_handle v1,
Vertex_handle v2,
Vertex_handle v3,
Cell_handle n0,
Cell_handle n1,
Cell_handle n2,
Cell_handle n3);
Introduces a variable c, and initializes its vertices and neighbors.

Setting

void c.set_vertices () Sets all vertices so that tests on the handles for equality with NULL will answer true.
void c.set_vertex ( int i, Vertex_handle v)
Sets vertex i of c to be v.
Precondition: i {0,1,2,3}
void
c.set_vertices ( Vertex_handle v0,
Vertex_handle v1,
Vertex_handle v2,
Vertex_handle v3)
Sets vertices to the given vertices.

void c.set_neighbors () Sets all neighbors so that tests on the handles for equality with NULL will answer true.
void c.set_neighbor ( int i, Cell_handle n)
Sets neighbor i to be n.
Precondition: i {0,1,2,3}.
void
c.set_neighbors ( Cell_handle n0,
Cell_handle n1,
Cell_handle n2,
Cell_handle n3)
Sets neighbors to the given cells.

end of advanced section

Access Functions

Vertex_handle c.vertex ( int i) Returns 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 the index i of the vertex.

Cell_handle c.neighbor ( int i)
Returns 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 the index i of the neighbor.

Cell_handle c.handle () Returns a handle to the cell.


Next: Class declaration of Delaunay_triangulation_3<Traits,Tds>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.